I'm new to PDFlib. when use PDFlib to create PDF.I find that the dpi of the page(paper) was 72.and I want to set the dpi to 300 for print use,but i dont know how to use PDFlib to set. enter image description here
as flomei already mentioned the PDF format itself do not have any kind of resolution. For placing the content or specifying the page dimension PDFlib use the PDF’s default coordinate system, which use the DTP points as unit. From the PDFlib 9.2 Tutorial, chapter 3.2.1.
PDF’s default coordinate system is used within PDFlib. The default coordinate system (or default user space) has the origin in the lower left corner of the page, and uses the DTP point as unit:
1 pt = 1/72 inch = 25.4/72 mm = 0.3528 mm
When you want to address the positions with a different unit, you can scale the coordinate system. Please check out the same PDFlib Tutorial chapter, section "Using metric coordinates":
p.scale(28.3465, 28.3465);
After this call PDFlib will interpret all coordinates (except for interactive features, see below) in centimeters since 72/2.54 = 28.3465.
of course you can use further scale values.