Beispiel #1
0
 public static void ShowCairoPDFPage(WFCairoGraphics dg)
 {
     System.Diagnostics.Debug.Assert(dg.Target is Cairo.PdfSurface);
     dg.ShowPage();
 }
Beispiel #2
0
 public static void SetCairoPDFSurfaceSize(WFCairoGraphics dg, DPoint pgSzMM)
 {
     System.Diagnostics.Debug.Assert(dg.Target is Cairo.PdfSurface);
     //  Convert page size in MM to cairo pdf points (1/72 inch , http://cairographics.org/manual/cairo-PDF-Surfaces.html#cairo-pdf-surface-set-size)
     double width = (pgSzMM.X / PageTools.MMPerInch) * 72;
     double height = (pgSzMM.Y / PageTools.MMPerInch) * 72;
     ((Cairo.PdfSurface)dg.Target).SetSize(width, height);
 }