PDF/A font embed

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v8)  /  PDF/A font embed

DynamicPDF CoreSuite for .NET (v8) Forum

 Apr 08 2015 2:24 AM
I have template PDF with Acro Forms fields which I need to fill. After that I want to create PDF/A file from this document.
But to do that, I am required to embed fonts to pdf file. I have these fonts, but how can I embed it? Since I don't add any Label to document, I can't use ceTe.DynamicPDF.Text.OpenTypeFont.Embed property.
 Apr 08 2015 3:44 PM
Posted by a ceTe Software moderator
Hello,

If the template PDF is not PDF/A compliant then it is not possible to create a PDF/A compliant document using Merger. With our product you can add new content that is PDF/A compliant to an existing PDF/A document and preserve its PDF/A compliance or create a new PDF/A compliant document from scratch. Please refer to the documentation on this topic http://www.dynamicpdf.com/Support/NET_Help_Library_15_01/PDFA.html.
 
Regarding embedding the font while filling form fields, you can actually assign an OpenTypeFont object to the form field itself as shown below:

           OpenTypeFont otfFont = new OpenTypeFont(@"Path for TTF or OTF font file");
            otfFont.Embed = true;
            otfFont.Subset = false;
            PdfDocument pdf = new PdfDocument(@"path for the input PDF");
            MergeDocument document = new MergeDocument(pdf);
            document.Form.Fields["form field name"].Font = otfFont;
            document.Form.Fields["form field name"].Value = "ceTe Software";
            document.Draw(@"C:\Temp\MyDocument.pdf");


Thanks,
ceTe Software Support Team.
 May 12 2015 2:44 AM
Thank you for answer. At the end I resigned to font embedding since we use Helvetica font which should be pretty common and embedded fonts makes final pdf file much bigger.

Right now I am having another issue. I have PDF documents with Acro form fields which I need to populate with UTF8 strings (like "ěčřžýé"). Problem is, that some of these characters are not displayed - for example when value "ĚŠČŘŽÝÁÍÚŮ" is assinged to field, only "ÝÁÍÚ" string is visible.
However if I click into field to edit its value, the whole string appears suddenly.

When I try to populate Acro fields in Adobe reader, everything works as supposed.

Do I have to specify encoding for fields somehow?
 May 12 2015 10:15 AM
Posted by a ceTe Software moderator
Hello,

Yes, increase in the output PDF file after embedding the font fully by setting the Embed property to true and Subset property to false is expected behavior as the whole font is added to the PDF.

Can you please send over the following details to support@cete.com so that we can look into it further?

1.Code sample using which we can recreate the behavior.
2.Exact version and build number of the DynamicPDF DLL file. You can get this information in DL references properties (Version and Description fields) in Visual Studio.
3.Input PDF used for merging and filling.
4.Font file used.
5.Output PDF.
6.Name and version of the PDF reader used to view the PDF.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 11:41 PM.