[cairo] Pdf ppi and printer dpi

Arjen Nienhuis a.g.nienhuis at gmail.com
Sat Oct 1 06:43:28 PDT 2011


On Oct 1, 2011 1:12 PM, "jaaf64" <jaaf.forums at zoraldia.com> wrote:
>
> hi,
> I am new to cairo and to graphics in general.
> I have trouble understanding the fact that PdfSurface or (PsSurface) is
only 72 points per inch.
> Does this mean that I cannot benefit from the printer s'capability (300 or
600 dpi per inch) ?
>

There's four different issues:

1: measuring distances. This is where 72 comes from. Initially a PdfSurface
measures everything in points (1/72th of an inch or 0.3(?) mm). You can use
more precise sizes by using floats or change the scale with ctx.scale().

2: Vector images. These are sent as-is to your printer or your printer
driver. The RIP in the printer or the driver will determine the resolution
of lines and text. You can use the same PDF for different devices.

3: images. Images are stored in their original resolution: scaling a
1000x1000 px image to 1x1 inch will lead to a portion of the PDF to be
1000ppi. Using the same image as 2x2 inch makes that part 500ppi.

4: fallback images. some operations in cairo can not be saved as simple PDF
commands. Cairo generates images and saves them in the PDF file. The
resolution of these images can be set with set_fallback_resolution() and are
300ppi by default.

Met vriendelijke groet,
Arjen Nienhuis
On Oct 1, 2011 1:12 PM, "jaaf64" <jaaf.forums at zoraldia.com> wrote:
> hi,
> I am new to cairo and to graphics in general.
> I have trouble understanding the fact that PdfSurface or (PsSurface) is
> only 72 points per inch.
> Does this mean that I cannot benefit from the printer s'capability (300
> or 600 dpi per inch) ?
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20111001/abba3637/attachment.html>


More information about the cairo mailing list