Upgrading to the latest XOJO release i was looking forward to the new PDF-Class.
I was generating an invoice form where everything works fine, beside the company-Logo which is drawn in a very poor quality and invers. It happens with .png and also .jpg
On the same invoice form is a barcode generated with the Monkeybread-Plugin. This graphic is also in very poor quality.
Displaying the code in a canvas both the logo and the barcode are lookin good.
By the way… the same problems happens with the invoice example from the examples/PDF-folder.
Anybody else with the same problem, or even better with a solution?
its not about loss quality because jpeg, it was about hires get lores so images looks 1/4 size in quality for some reason. i guess that was the meaning of his wroting “very poor quality”
it could maybe the picture settings VerticalResolution of 72 dpi by default and printer use 300,600,1200 dpi.
good pictures drawn in pdf preview at window looks like they have a poor quality.
with Monkeybread plugin and qr code i have no issue, it looks good.
its not about loss quality because jpeg, it was about hires get lores so images looks 1/4 size in quality for some reason.
Yes Markus, as been told in other threads about this same topic (and you probably know), PDF has not notion of “resolution” on any of the objects used in the document; that is because it is resolution independent. Thus, currently the images are stored always at 75 dpi (you can’t set the “output” dpi for images in a PDF). The loss of quality is because the compression.
Probably other solutions are storing images without compression of the data.
I can’t believe that is required by the PDF spec because I see plenty of PDF’s with what look to have significantly higher resolution embedded pictures (both on screen or printed), including some I create in Xojo with a plugin.
Unless changed the standard coordinate system is 72 dpi for points.
We have a function to change that in case you need more than 65535 * 2.54 / 72 = 1857 cm big pages.
If you place an image with MBS Xojo DynaPDF Plugin, you can put in pictures with any resolution.
Usually we scale them down to 150 dpi, unless you call SetResolution or ask for pass through mode. Then you can of course get 600 dpi or more.
Minimum “image print quality” is 300DPI. If you want to force it to the limit of the low quality you can reach 150 for a pixelated result. 75 you are playing in the field of the useless content. Please reconsider your options.
At 300DPI even a lossy JPEG well calibrated can render good results. Maybe even barcodes aren’t affected, they need to study the combinations. An XObject (PDF content, in this case, image content) can be compressed lossy or lossless (DCTEncode or LZWEncode), and even the lossy option can be adjusted to near to lossless quality. Some images, like barcodes, must have a very good fidelity.
how it looks at my windows 10 pc. (look at 1:1 on monitor that source code looks clear)
at least i expect it looks at screen almost same as the screenshot taken before and not so much blurry.
this blurry effect came after an xojo update in 2020.