Exemplo n.º 1
0
        public virtual void SetCreatorInfoAndLanguage()
        {
            String      outPdf = destinationFolder + "setCreatorInfoAndLanguage.pdf";
            String      cmpPdf = sourceFolder + "cmp_setCreatorInfoAndLanguage.pdf";
            PdfDocument pdfDoc = new PdfDocument(new PdfWriter(outPdf));
            PdfFont     font   = PdfFontFactory.CreateFont();
            PdfLayer    layer  = new PdfLayer("CreatorAndLanguageInfo", pdfDoc);

            layer.SetCreatorInfo("iText", "Technical");
            // australian english
            layer.SetLanguage("en-AU", true);
            PdfCanvas canvas = new PdfCanvas(pdfDoc.AddNewPage());

            canvas.SetFontAndSize(font, 14);
            PdfLayerTestUtils.AddTextInsideLayer(layer, canvas, "Some technical data in English.", 30, 530);
            pdfDoc.Close();
            PdfLayerTestUtils.CompareLayers(outPdf, cmpPdf);
        }