Hey guys. I need to zoom my outputted PDF to HTML conversion. It’s done with pdf2htmlEX software. Adjusting the CSS I don’t think is an option as it is far too complicated. Zoom 1.25 seems to work just perfect. SO… If I wanted to zoom the entire layout what would you suggest targeting? @viewport, body, html, or other? Thanks.
As an aside, I believe everyone plays nice with zoom except firefox. If I apply -moz zoom to Firefox on the body it disappears. Applying it to the main div works but then it’s not aligned correctly.
Remember that Firefox has two Zoom modes, Normal zoom like other browsers and Zoom Text Only. You will have to be in the “normal” zoom mode to compare FF’s behavior to that of other browsers.
The zoom property in CSS allows you to scale your content. It is non-standard, and was originally implemented only in Internet Explorer. Although several other browsers now support zoom, it isn’t recommended for production sites.
Yes the default is center but if you zoom the body then you will cut off the left side and probably the top which is why you need left top as in my example.
You could zoom the body as per my example but perhaps if you have a whole page container then perhaps zoom that instead.
You may just have to try it and see what works best for the job in hand.
Thanks guys your the best. Fun to be using my brain again… working out some cobwebs. There is a page container but when I added zoom to it it when off to the right. And the code is like 100 pages long and so confusing it would take me a life time to figure out. So I happy these simple alts
Here is what I found… transform scale on the body makes it all disappear even with origin set to 0 0. Putting transform on the page container works (getting it centered would take some work). But transform unfortunately basically seems to blow up an image of the original. So the lines and text get blury and slight scale deviations. Whereas zoom simply zooms pixel perfect the original. I think I am going to stick with zoom.
I closed the tabs already or Id take a screenshot. But yeah Im positive. I went back and forth obsessively from tab to tab with my eyes 6 inches from the screen to see the dif. Wasn’t huge but it was very noticeable when being compared to zoom. Lots of the pdf conversions are complicated table set ups where pixel perfect would be important. Transform moved each line 1 or 2px up down or left or right too.
Im sure. I had the zoom tab open and with origin made it so the transform one the page container was in the exact pixel place as the zoom one. So I could see changes from tab to tab.
Edit - this was in Safari on mac mind you where transform blurred the lines and etc. I didnt test it side by side in any other browser.