Ktam3874/pitx software guide, The time has come to explain the pdf, postscript, For example if you want to use the postscript – Kontron KTAM3874-pITX User Manual
Page 155: And svg

KTD-S0057-I
Page 151 Linux® Programming Examples (DebianTM)
KTAM3874/pITX Software Guide
When using static libraries there is one limitation: the gradient feature does not work.
The time has come to explain the PDF, PostScript
®
and SVG-file surface programming. It would seem that
the Include-file selection will have a special significance. The following table gives an overview:
Surface
Only use the Include-file
X11
TM
cairo/cairo.h
cairo/cairo-pdf.h
PostScript
®
cairo/cairo-ps.h
SVG-file
cairo/cairo-svg.h
For example if you want to use the PostScript
®
surface and you only integrate the cairo.h file the appli-
cation generates an empty PS-file (however, the header part is present). The demonstration program also
involves the X Server
TM
for color definition but without displaying a window on the monitor. Another major
difference affects the surface size. The X11
TM
environment needs the use of pixel, but PDF, PostScript
®
and
SVG
1/72
inch (72 DPI). Within the Cairo sourcecode package you can find the following extract:
static const cairo_page_standard_media_t _cairo_page_standard_media[] =
{
{ "A0",
2384, 3371 },
{ "A1",
1685, 2384 },
{ "A2",
1190, 1684 },
{ "A3",
842, 1190 },
{ "A4",
595, 842 },
{ "A5",
420, 595 },
{ "B4",
729, 1032 },
{ "B5",
516, 729 },
{ "Letter",
612, 792 },
{ "Tabloid",
792, 1224 },
{ "Ledger",
1224, 792 },
{
"Legal",
612, 1008 },
{ "Statement",
396, 612 },
{ "Executive",
540, 720 },
{ "Folio",
612, 936 },
{ "Quarto",
610, 780 },
{ "10x14",
720, 1008 },
};
Calculation example for A4 format (1 inch = 25,4 mm):
(595 / 72) * 25.4 = 209.903 [mm]
(842 / 72) * 25.4 = 297,04 [mm]
Following sourcecode generates a PDF file (A4 format) with two pictures: