• Resolved danielmelnechuk

    (@danielmelnechuk)


    Hi,

    Using the following shortcode on this page https://walthamlandtrust.org/trail-guides/ that is working to show large previews of PDFs using this awesome plugin:

    [mla_gallery attachment_category=trailmap link=file mla_target="_blank" mla_viewer=true columns=2 orderby=title size=large post_mime_type="application/pdf" post_parent=all mla_caption="{+title+}" ]

    Using the following shortcode on this page https://watchcdc.org/letters-in-english/ that is not working to show large previews of PDFs – no matter what size= setting i choose (“full” or “large”) always looks the same and is not as large as the working page above:

    [mla_gallery attachment_category=letters-english link=file mla_target="_blank" mla_viewer=true columns=2 orderby=title size=large post_mime_type="application/pdf" post_parent=all mla_caption="{+title+}" ]

    I did just turn on “imagick” in my cPanel PHP selections page to get previews working on the problematic size= site which is running php 7.0.

    Any thoughts on how to get the larger previews working?

    Peace,
    Dan

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter danielmelnechuk

    (@danielmelnechuk)

    Hey, solved it. First i set the medium and large Media sizes to what i wanted in Settings->Media; not sure i needed to do this.

    Then i deleted all the PDFs as they had NO previews; then i uploaded all the PDFs again and then they had image previews in Media Library. I had uploaded the PDFs before imagick had been turned on in PHP.

    Now the “size=large” setting in the shortcode works! And i can change to “medium” and the preview image gets smaller on the page.

    Case closed.

    Peace,
    Dan

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your question and for the links to your two test pages; very helpful. Thanks as well for pressing on and finding a solution that works for your application. I am adding these additional notes to the topic for the benefit of other MLA users that may learn from them.

    I had a look at the two sites you gave and discovered, as you did, that the first site was using the WordPress “PDF Thumbnails” for the display, while the second site used MLA’s generated thumbnails because the documents on that site had no “PDF Thumbnails”.

    The MLA generated thumbnails (mla_viewer=true) do not look at the intermediate sizes (e.g., “large”) to determine their size. That’s an interesting idea for a future MLA enhancement. You can, however, use the mla_viewer_width parameter (and a few other parameters) to get larger images. For example, mla_viewer_width=450 gives a much larger thumbnail image. You can find more information in the “Thumbnail Substitution Support, mla_viewer” section of the Settings/Media Library Assistant Documentation tab.

    You solved your problem by deleting and re-uploading your documents to generate WordPress PDF thumbnails. An easier way to do that is to use MLA’s Thumbnail Generation feature, available as a Bulk Action on the Media/Assistant submenu screen. You can find more information on that alternative by pulling down the Help menu in the upper-right corner of that screen and looking at the “Thumbnail Generation” tab in the help menu.

    I am marking this topic resolved, but please update it if you have any problems or further questions about generating and using PDF thumbnails with [mla_gallery] Thanks for your interest in the plugin.

    Plugin Author David Lingren

    (@dglingren)

    As suggested by this topic I have added support for the size parameter to supply viewer width and height when mla_viewer=true.

    I have uploaded a new Development Version dated 20180816 that contains this enhancement. If you want to try the Development Version you can follow the instructions in this earlier topic:

    PHP Warning on media upload with Polylang

    Thanks for inspiring this new feature.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘size=large not working on one site, on another it does’ is closed to new replies.