Configuring PDF viewer

Q&A about the latest versions
Post Reply
JSchrader
Posts: 141
Joined: Sat Nov 28, 2015 2:26 pm

Is there a way to alter the appearance of a PDF in the viewer inside a browser?

For PDFs opening in Acrobat one can use a few specific settings how the document will appear upon opening.
I wonder if there is any such thing for a PDF in a HTML document in an iframe.

For example I want the document to open without any borders and scaled to a size that the first page always will completely fit into the opened window.
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi J,

Update: Fixed the links for the sample page and the video :-P

I can't remember if you are on a PC or Mac. I'm on a Mac so I can only offer suggestions relating to that platform.

After opening a PDF file in Adobe Acrobat you can ⌘D to open Document Properties. Under the "Initial View" tab you can select a number of Magnification options including; Fit Page, Fit Visible etc. There are also window options; Resize window to initial page, Center Window on screen and Open in Full Screen mode.

I comped up a sample page https://rebrand.ly/scaling-pdf to test out how it would work in an iFrame in a text box with percentages for Height and Width. When you load the page the PDF scales to fit the text box size if it's in the same ratio as the pdf page.

Here's a link to a video showing what happens when you open the page and when you scale it. https://youtu.be/AYmx0wZNVUo

You can see that Safari and Firefox deal with the scaling of the pdf quite well and as you resize the window the pdf scales to accommodate the text box size. Chrome however requires you to select the fit screen option before you get the same result.

Unfortunately I don't know if there is a way to make a dynamic text box that retains a fixed ratio, this would solve the problem of the pdf being cut off when the browser window is scaled to a point where the Height and Width percentages don't match the fixed ratio of the pdf page.

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
JSchrader
Posts: 141
Joined: Sat Nov 28, 2015 2:26 pm

Thank you Tony.
Yes, that's what i also had found.
Unfortunately most of the PDF options only will work in the native Acrobat viewer.
But as far as I can see this is my best bet. At least configuring the size of the box may help a bit.
Luckily the display of PDFs in tours works quite well, in this case it's just the specific customer request that rises the issue.
Post Reply