printing a jpg file on a pdf document is getting unexpected results

Started by Shawn@EVENT, May 01, 2020, 09:48:06 AM

Previous topic - Next topic

Shawn@EVENT

Hi.
I'm trying to print a QR code on a pdf and I'm getting an unexpected result.  The image is displaying on the pdf as three small QR codes instead of one larger one

I created the QR code in linux using the command 'qrencode' which generates a .png file.

I then convert the file to jpg using the imagemagick convert command 'convert file.png file.jpg'

I am printing the jpg image on the pdf using:
PRINT (pdf_file) 'PICTURE'(x,y,x,y,"file.jpg",5),

If I convert the .png file to .jpg using windows paint and print the jpg file using the code above, the QR code prints correctly.

Attached are images of what I'm experiencing.

Has anyone experienced this before and have any suggestions?

Devon Austen

Printing a PNG to a PDF is supported in Linux PxPlus as of PxPlus 2019. If using PxPlus 2019 you can skip the conversion.

If you open the converted .jpg before printing it to the PDF does it look correct?
Principal Software Engineer for PVX Plus Technologies LTD.

Shawn@EVENT

Thanks for the quick response Devon

Yes I knew the the most recent version allows .png files without conversion.  The client is using v15.10 though.

Yes the .jpg file looks ok when I open it in paint

attached is the actual jpg file if that helps

Mike King

What mode are you specifying on the 'PICTURE' mnemonic? 

It likely should be 5 or 6 (top left aligned or centered, scaled maintaining aspect ratio)
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com


Shawn@EVENT

FYI I figured out a resolution to this issue.

When I convert the file to jpg using the imagemagick convert command, I used 'convert -quality 100 -type TrueColor file.png file.jpg'

The resulting jpeg file printed correctly when using the 'PICTURE'(x,y,x,y,"file.jpg",5), command