Quote:
Originally Posted by killout
Hello, Willus.
So this is what I executed:
./k2pdfopt -mode fitwidth -ls- -w 2048 -h 1536 -dpi 264 ansible-for-devops-sample.pdf
And in the attach is what I got. They output does has proportions,what I want, width: 2048, height: 1536, so I can read on ipad in landscape mode.The thing is large white margins, which I would like to get rid of, by enlarging content to the size of ipad screen, so desired output pdf is 2048*1534, but with no margins. Is it possible to do?
|
Yes, you can eliminate the margins. Just make the -dpi value larger, e.g. -dpi 400. At -dpi 264, you are telling k2pdfopt that your device screen is 2048/264 = 7.75 inches wide, whereas your source PDF is only 7 inches wide, so k2pdfopt does not magnify it. It displays it on your iPad so that the page width will physically be 7 inches if you measure it with a ruler--to match the source document size. By specifying -dpi 400, you essentially tell k2pdfopt to magnify the source file. I.e. you are telling k2pdfopt that your device is 2048/400 = about 5 inches wide (even though in reality it is 7.75 inches wide). Now that the "width" of your device (5 inches) is
less than the source text width, k2pdfopt will fit the text to your screen, with no margins (assuming you specify -mode fitwidth).