Exemplo n.º 1
0
        public virtual void ZoomNotOnPanel()
        {
            String      outPdf = destinationFolder + "zoomNotOnPanel.pdf";
            String      cmpPdf = sourceFolder + "cmp_zoomNotOnPanel.pdf";
            PdfDocument pdfDoc = new PdfDocument(new PdfWriter(outPdf));
            PdfFont     font   = PdfFontFactory.CreateFont();
            PdfLayer    zoom   = new PdfLayer("Zoom 0.75-1.25", pdfDoc);

            zoom.SetOnPanel(false);
            zoom.SetZoom(0.75f, 1.25f);
            PdfCanvas canvas = new PdfCanvas(pdfDoc.AddNewPage());

            canvas.SetFontAndSize(font, 14);
            PdfLayerTestUtils.AddTextInsideLayer(zoom, canvas, "Only visible if the zoomfactor is between 75 and 125%"
                                                 , 30, 530);
            pdfDoc.Close();
            PdfLayerTestUtils.CompareLayers(outPdf, cmpPdf);
        }