Discussion:
[iText-questions] Embedde Font
Reischl Michel
2015-01-14 12:21:17 UTC
Permalink
Hello there,

I need to write a text in a PDF and embed the used font.

How can I embed the used font using iTextSharp?

Here is my sourcecode. In my example I need to embed the font "Calibri".

We need this because the output goes to the print office and the machines there need an embedded font to print the pdf in the right way.

canvas = stamper.GetOverContent(1);
iTextSharp.text.Font f = FontFactory.GetFont("Calibri", "", true, 13);
ColumnText ct = new ColumnText(canvas);
ct.SetSimpleColumn(new Phrase("2122-222", f), 75, 242, 140, 262, 15, Element.ALIGN_LEFT);
ct.Go();

If we open the PDF from the sample above with Adobe Photoshop the software told me that the font is not embedded.

Thank you in advanced and best regards,
Michel Reischl

Loading...