I need to amend an existing PDF document.
When I like to add new texts, I am unable to use a font already existing in current PDF.
Unfortunately your documentation is lacking any info here, as it only consists of some tutorials and sample code.
I can see a lot of PdfUsedFonts in UsedFonts Property of document (all the same btw). But I cannot find any way to use one of these to draw text with given font.
I've tried to do it the way your code sample suggests:
- Code: Select all
//True type font - embedded
System.Drawing.Font font = new System.Drawing.Font("CUSTOMFONTNAME", 15f, FontStyle.Bold);
PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font);
I tried to figure the name by getting name from FindAllText
- Code: Select all
doc.Pages[0].FindAllText().Finds[0].OriginalFontName
I tried to use name derived from UsedFonts:
- Code: Select all
doc.UsedFonts[0].Name
Nothing works, could you kindly provide a working sample? Or is it impossible, which would render your product really useless for us.
regards
J.