Android Question Center image in PDF with Printing

vecino

Well-Known Member
Licensed User
Longtime User
Hi, creating a pdf file with the “Printing” library, I can't find an example of how to center an image horizontally.
Should I take the width of the image (in dip) and subtract the width of the pdfdocument (not measured in dip) and divide by 2?
Thank you very much.
 

vecino

Well-Known Member
Licensed User
Longtime User
Yes, it works fine, I have tested it with images of different sizes and they are displayed correctly centered.
Thank you very much.
 
Upvote 0
Top