I've been struggling for a while now trying to add a good looking background to my PDF created using the FPDF class. I tried a ph开发者_JAVA百科otoshop document based on international A4 paper, but this was too big. Also converting it from 300dpi to 72dpi (as it's said in the manual) is not good, it just looks pixelated now.
I found various settings on the net (~1062px width), but that's too wide and when testing with something that should match up just creates a pixelated version instead of a good background image.
Thanks in advance.
Remember that 'dpi' is just a conversion factor. it's not a measurement in-and-of-itself. The size of the background image will depend on what kind of medium you're planning on the PDF being displayed on.
If it's intended for screen display, which is generally 72-100dpi (let's split the difference and go with 86dpi). A4 paper is 210x297mm, or 8.27x11.7 inches, which means you need a background image of 711x1006 so it wouldn't get scaled.
If you're going for a 300dpi target, which is your average generic laser printer, then you'd need 2481x3510, and for 600dpi target, double again to 4962x7020
精彩评论