View Single Post
Old 08-25-2021, 10:10 AM   #1885
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,303
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
MarjaE — try using -idpi -1 — that will force the input and output dpi to remain the same and thus k2pdfopt will not change the resolution of your .png file:

k2pdfopt -mode copy -idpi -1 myfile.png

By default, the input dpi is 2x the output dpi (-idpi -2), which results in k2pdfopt resampling your image at half the resolution if supplied with a .png file unless you are careful to specify output resolution, width, and height all together.

If you specify -odpi on the above command also, it will set the size of the PDF page.
willus is offline   Reply With Quote