Mobile app version of vmapp.org
Login or Join
Hamaas979

: Who is responsible for shrinking an image within a PDF, or to shrink or not to shrink I create PDFs width wkhtmltopdf tool (renders HTML to PDF) This PDFs are intended to be used for (semi)

@Hamaas979

Posted in: #ImageQuality #Pdf

I create PDFs width wkhtmltopdf tool (renders HTML to PDF)

This PDFs are intended to be used for (semi) professional printing.

So lets say the printing quality should be 300dpi, and a user places a 3 inch by 3 inch Picture on this page. The uploaded picture is lets say 3000x3000 (10MB)

If my logic is correct picture size of 900x900 would be best (is this correct?)

So I see two possibilities


put the full image into PDF and getting a size of at least 10MB, hoping that the printing company makes the best out of it


and


resize (shrink) it to the 900x900 local on my server (imagemagick) with best quality I can get - getting a PDF size around 1MB


If my logic is correct then the second one is the correct answer.

Is it correct? If not why?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas979

2 Comments

Sorted by latest first Latest Oldest Best

 

@Kimberly620

Ok, while you certainly can down sample the image. And that works. there area a few possible caveats to consider. Remember i know next to nothing with your aims and what your software is doing. Problems that may arise:


The image in question is not photographic, but relies on say some vector content like text. Now text printed at 300 DPI is a bit smudgy as itsusually rasterized at higher resolution than photographic content. In any case a samrt user may try to circumvent this fact with bigger images.

This may be misusing, or then not. But you need to decide whether this is really the case.
Smaller image != smaller file. Certainly in the case of 30000 vs 900 the game is clear. But what really matters is how much entropy is in the image. Therefore naively just scaling is not necessarily the best strategy for bandwidth allocation.

You could adopt a strategy where you attempt to compress if the size of the image is beyond a certain size threshold instead. As then you would reward those that can do the job themselves.
Scaling your application after the fact is not possible. If somebody decides to do something with the image data later to up sell something then it might not work out so well. Although 150 PPI may be acceptable in many cases.


The printer wont likely do anything to the images, unless they are absolutely enormous. As the work to do this is often not worth it, and their rip may decide whats best anyway.

10% popularity Vote Up Vote Down


 

@Deb5748823

Your logic's correct in terms of a 3in x 3in picture at 300dpi needing to be 900px x 900px. Any dimensions beyond this are superfluous, in theory.

I say in theory because real world practice sometimes shows that having to physically shrink a large compressed before printing can give a better quality 900px x 900px image being printed than a compressed 900px x 900px image being printed.

This would be negligible in jpegs with light compression and a good resampling algorithm in imagemagick, but worth raising in a professional environment. Sounds like you should be ok storing 900px x 900px.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme