karnac2020
asked on
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
<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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I mean to your website ;o)
ASKER
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
Mark
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
So basically, your pdf is responsive.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER