Responsive pdf files

I am building a Wordpress website. When I link to an image file, I can get it to shrink according to the browser viewpoint by using:

<a href="file.jpg"><img style="float:left; max-width:100%;" alt="" src="displayphoto.jpg" /></a>

However, when I use the same type of statement to link to a pdf file, the pdf file display (using Adobe Reader) is NOT responsive. I am using the following HTML:

<a href="file.pdf"><img style="float:left; max-width:100%" alt="" src="displayphoto.jpg" /></a>

(I am using float:left because I have 4 picture links next to each other and as the browser window shrinks, I want the number of columns of displayed photos to decrease so it looks good on a smartphone.)

Can anyone provide the correct HTML to make linking to a pdf produce an Adobe Reader image of the pdf that shrinks according to the browser size so that it formats correctly on a smartphone without having to scroll?

Thanks in advance.

Mark
karnac2020Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Is there a link to the page.
0
karnac2020Author Commented:
Yes, the "link" is the picture (displayphoto.jpg) that you click to produce the pdf file.
0
GaryCommented:
I mean to your website ;o)
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

karnac2020Author Commented:
Ah, no i am just developing it locally. But if you need a live version, I will work on publishing it so you can view it.

Mark
0
karnac2020Author Commented:
Gary,

I put the site up on the web. You can get to the page via the URL: http://FirstUMCSB.michianait.net

The last menu item is called "pdftest." This page has two copies of the same image. You will see that this page and the images are responsive as you narrow the browser window down. However, when you click the second image you will see a pdf come up and if you now narrow the browser window, the pdf file definitely does not shrink as the browser window does. I would like the pdf to display in a very readable form on a smartphone, but maybe what I am looking for is impossible and I need to convert the pdf file to an HTML page. I just don't know.

Any advice would be appreciated.

Thanks,

Mark
0
Dave BaldwinFixer of ProblemsCommented:
PDFs are displayed by a PDF reader, not by the browser, and the PDF reader knows nothing about your 'responsive design'.  It is not controlled or affected by your CSS and page code.  However, in Firefox and Chrome, their built-in PDF readers shrink the PDF page to the window if you shrink the window.  The page does not display in IE8 on my computer.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
COBOLdinosaurCommented:
Plus the way a PDF is displayed by a given user is determine by what they use to view it and they control settings not you.

PDF is a great format for printing, but they have limited value for browser presentation, and are very much not appropriate in something that needs to be responsive.  Use an image if you want responsive.

Cd&
0
GaryCommented:
That pdf shrinks and expands fine for me.  There is nothing programmable you can do to affect its resizing - that is done automatically by Acrobat (maybe there is a way to stop but I'm not familiar enough)

So basically, your pdf is responsive.
0
captainCommented:
You can set initial display options for PDFs in the document properties in Acrobat, File>Properties then go to the Initial View tab and specify your magnification and page layout options.

This should allow you to fine tune your opening options. Also remember as the smartphone is fixed size, "dynamic" is not a major concern as long as the pdf opens 100% on the screen...

hth
capt.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.