Embedded fonts missing in PDF/A documents

1 Answer 16 Views
PdfProcessing
Alain
Top achievements
Rank 1
Alain asked on 06 Nov 2025, 05:35 PM | edited on 06 Nov 2025, 05:39 PM

Hi,

We are trying to merge an existing PDF (not /A) into a PDF/A.

Target file is generated successfully but veraPDF validator (and others) is complaining because it cannot find embedded fonts.

We read the following articles : PDF/A standard and Register fonts . But no luck.

Part of the code is available below.

Do you know why fonts are not embedded ?

Thanks for your help.

Alain.

 

public static void MergeInNewFile(string sourceFile, string outputFilePath, bool registerFonts)
{
    RadFixedDocument resultFile = new RadFixedDocument();

    Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider pdfFormatProvider = new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider();

    pdfFormatProvider.ExportSettings.FontEmbeddingType = FontEmbeddingType.Full;

    PdfExportSettings settings = new PdfExportSettings();
    pdfFormatProvider.ExportSettings = settings;

    settings.ComplianceLevel = PdfComplianceLevel.PdfA3B;
    settings.TaggingStrategy = TaggingStrategyType.UseExisting;
    settings.FontEmbeddingType = FontEmbeddingType.Full;

    if (registerFonts)
    {
        RegisterFont("Helvetica");
        RegisterFont("Helvetica-Bold");
        RegisterFont("Helvetica-Oblique");
    }

    // Merge source in new file
    using (Stream stream = File.OpenRead(sourceFile))
    {
        resultFile = pdfFormatProvider.Import(stream, TimeSpan.FromSeconds(100));
        resultFile.Merge(resultFile);
    }

    // Export new file
    File.Delete(outputFilePath);
    using (Stream output = File.OpenWrite(outputFilePath))
    {
        pdfFormatProvider.Export(resultFile, output, TimeSpan.FromSeconds(10));
    }
}

private static void RegisterFont(string fontName)
{
    byte[] fontData = File.ReadAllBytes(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ressources", $"{fontName}.ttf"));
    System.Windows.Media.FontFamily fontFamily = new System.Windows.Media.FontFamily(fontName);
    FontsRepository.RegisterFont(fontFamily, System.Windows.FontStyles.Normal, System.Windows.FontWeights.Bold, fontData);
}


 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Nov 2025, 02:53 PM

Hi, Alain,

Your question has already been answered in the support thread (1703096) you have opened on the same topic. However, I am posting the answer here as well in order the community to benefit from it:

"Based on your scenario, the VeraPDF validation failure is likely due to how fonts are embedded during the PDF/A-2u conversion. I noticed that the document is using standard fonts, e.g. Helvetica. The PDF/A standard requires all fonts used in a document to be embedded. Prior to Q3 2025, the 14 standard fonts were not embedded in the file, which caused the document to be non-compliant. As of Q3 2025, these standard fonts are automatically embedded when PDF/A compliance is enabled. 

This may affect strict tools like VeraPDF to fail validation. I would like to note that the PAC (PDF Accessibility Checker) tool successfully validates the fonts embedding in the generated PDF document. Please refer to the GH issue: Embedded Type1 fonts not recognized as such.

Our testing shows that with non-standard fonts embedding, the Vera PDF tool doesn't fail. As to the standard fonts, we already have a feature request for changing the standard fonts which is expected to have a positive impact on the scenario you need to cover.  You can cast your vote for the item, track its progress, subscribe for status changes, and add your comments on the following link: 

PdfProcessing: Provide a mechanism for changing the Standard font when exporting PDF/A Complienced document"

We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread. 

Thank you for your understanding. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PdfProcessing
Asked by
Alain
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or