breakfastco / embed-pdf-gravityforms

WordPress plugin. Add-on for Gravity Forms. Provides a PDF Viewer field.
GNU General Public License v3.0
0 stars 0 forks source link

Landscape oriented PDF files #9

Open filpet opened 2 months ago

filpet commented 2 months ago

Thanks for this great plugin, it is really helpful to us! However, would it be possible to add support for landscape oriented PDF files? At the moment they are cut off. Thanks a lot, Peter

csalzano commented 2 months ago

I find landscape orientation files are shown the same way as portrait--the viewer is always tall enough to accommodate the page, and a horizontal scroll bar appears at the bottom of the page when the width of the viewer is less than that of the page.

Have you tried decreasing the Initial Scale setting to show the document at a smaller size initially? Your users should have zoom in and zoom out buttons to prevent or allow the horizontal scroll bar.

filpet commented 2 months ago

Thanks for your quick replay! At least in Safari landscape orientation files are cut(!) off at the width of portrait oriented files with no horizontal scrollbar. Changing the scale factor doesn’t change a thing, the horizontal scrollbar appears but the documents are still cut off at portrait mode width.

Am 28.08.2024 um 04:36 schrieb Corey Salzano @.***>:

I find landscape orientation files are shown the same way as portrait--the viewer is always tall enough to accommodate the page, and a horizontal scroll bar appears at the bottom of the page when the width of the viewer is less than that of the page.

Have you tried decreasing the Initial Scale setting to show the document at a smaller size initially? Your users should have zoom in and zoom out buttons to prevent or allow the horizontal scroll bar.

— Reply to this email directly, view it on GitHub https://github.com/breakfastco/embed-pdf-gravityforms/issues/9#issuecomment-2313980234, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE443AJRMXDOF3445UKSHXDZTUZSXAVCNFSM6AAAAABM7PGRMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJTHE4DAMRTGQ. You are receiving this because you authored the thread.

csalzano commented 2 months ago

Can you link me to a page with this behavior? Can you find the horizontal scroll bar on the demo here? The document is portrait, but the concept is the same. https://breakfastco.xyz/embed-pdf-gravityforms/

On my mac, holding shift and using the mouse wheel operates horizontal scroll bars. Visually, the scrollbar appears below the document, inside the light grey frame, and just above the "I see the embedded PDF above" checkbox. I see similar behavior on Firefox and Safari.

filpet commented 2 months ago

Thanks for the reply! Like I tried to explain before, the problem is not with the scroll bar or zoom. This all works fine with your form as well as with our form, depending on the initial zoom factor. The problem seems to be with how the file itself is handled by your plugin, they are just cut off at portrait mode width. Scrolling and zooming all works fine depending on initial zoom, but the files are cut off when in landscape.

Thanks a lot!

Am 30.08.2024 um 03:07 schrieb Corey Salzano @.***>:

Can you link me to a page with this behavior? Can you find the horizontal scroll bar on the demo here? The document is portrait, but the concept is the same. https://breakfastco.xyz/embed-pdf-gravityforms/

On my mac, holding shift and using the mouse wheel operates horizontal scroll bars. Visually, the scrollbar appears below the document, inside the light grey frame, and just above the "I see the embedded PDF above" checkbox. I see similar behavior on Firefox and Safari.

— Reply to this email directly, view it on GitHub https://github.com/breakfastco/embed-pdf-gravityforms/issues/9#issuecomment-2319600393, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE443APSJS3X3OZPV3D44KLZT7ATVAVCNFSM6AAAAABM7PGRMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJZGYYDAMZZGM. You are receiving this because you authored the thread.

csalzano commented 2 months ago

Please experiment with initial scale setting values less than 1.

.5 is 50%.

I believe you're asking for a "Shrink to fit" feature so the document always fits in the size of the frame. The initial scale setting allows you to set the document's initial size before the zoom controls are used.

filpet commented 2 months ago

Hello again! I‘m not sure if we may be a little bit lost in translation or so?I already changed initial scale, tried zooming in and out to even the tiniest size, and horizontal scrollbar is working fully normal. The plugin just cuts off the landscape pdf at width of portrait mode files. Am 30.08.2024 um 15:57 schrieb Corey Salzano @.***>: Please experiment with initial scale setting values less than 1. .5 is 50%. I believe you're asking for a "Shrink to fit" feature so the document always fits in the size of the frame. The initial scale setting allows you to set the document's initial size before the zoom controls are used.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

csalzano commented 2 months ago

I can't reproduce the behavior. Can you link me to where I can see it?