Embedded fonts in PDF/A

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
DanielLW
Posts: 22
Joined: Tue Sep 01, 2015 2:42 pm

Embedded fonts in PDF/A

Post by DanielLW » Fri Oct 09, 2015 11:37 am

Hello,

when converting pdf-files to the pdf/a-format, on some pdfs i get a NotSupportedException, message "Convert font to embedded font is not supported now (for PDF/A).".

Code: Select all

            Vintasoft.Imaging.Pdf.PdfDocument pdfConvert;
            Vintasoft.Imaging.Pdf.PdfDocument pdfSource;

            pdfSource = new Vintasoft.Imaging.Pdf.PdfDocument(@"D:\test.pdf");

            pdfConvert = new Vintasoft.Imaging.Pdf.PdfDocument(Vintasoft.Imaging.Pdf.PdfFormat.Pdf_A);

            foreach (Vintasoft.Imaging.Pdf.Tree.PdfPage pPage in pdfSource.Pages)
            {
                pdfConvert.Pages.Add(pPage);
            }

            pdfConvert.Save(@"d:\testpdfa.pdf");

            pdfSource.Dispose();
            pdfConvert.Dispose();
I assume that embedding fonts to pdf is not supported by VintaSoft PDF, is it? Can you say, if and when this will be supported?

To workaround this, i have to convert the pdf pages to images/bitmaps, and add them to the new pdf/a-pdf, right?

Is there a way to determine, if a pdf file can be converted to pdf/a without the embedding fonts problem?

Thank you for your support!

Yuri
Posts: 56
Joined: Wed Jul 23, 2008 2:47 pm

Re: Embedded fonts in PDF/A

Post by Yuri » Fri Oct 09, 2015 5:31 pm

Hello,

Yes, the embedding of fonts into pdf is not supported at this time. This opportunity would be added in next version 8.3 coming soon, but the ability to check whether the embedded font is compliant with PDF/A standard would be implemented later.

When copying each page separately the common resources of page (if any) will be duplicated. To avoid this is necessary to convert the document at once, using this code:

Code: Select all

 using(Vintasoft.Imaging.Pdf.PdfDocument pdfSource = new Vintasoft.Imaging.Pdf.PdfDocument(@"D:\test.pdf"))
 {
     pdfSource.Pack(@"d:\testpdfa.pdf", Vintasoft.Imaging.Pdf.PdfFormat.Pdf_A);
 }
 
To check whether a font is embedded please use PdfFont.IsFullyDefined property. To get all fonts please use PdfDocument.GetFonts() method.

Rasterization of document undoubtedly removes all fonts, however this mean that your document becomes a fully rasterized one, i.e. it won't be possible to select and extract text from it and all vector graphics will be rasterized with specified resolution.

--
Kind regards,
Yuri

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: Embedded fonts in PDF/A

Post by Alex » Fri Jan 22, 2016 9:49 am

Hello Daniel,

Since version 8.3 SDK allows to embed TrueType fonts into PDF document.

Best regards, Alexander

DanielLW
Posts: 22
Joined: Tue Sep 01, 2015 2:42 pm

Re: Embedded fonts in PDF/A

Post by DanielLW » Wed Feb 03, 2016 11:12 am

Hello Alex,

great news, thank you!

DanielLW
Posts: 22
Joined: Tue Sep 01, 2015 2:42 pm

Re: Embedded fonts in PDF/A

Post by DanielLW » Thu Feb 04, 2016 5:12 pm

Hello Alex,

happy too early, with vintasoft.imaging.dll, version 8.3.5.1 and vintasoft.imaging.pdf.dll, version 5.3.5.1, i got the error:

PDF/A-compatible font embedding is not supported now.

at Vintasoft.Imaging.Pdf.PdfDocument.(PdfFormat )
at Vintasoft.Imaging.Pdf.PdfDocument.(Stream , Boolean )
at Vintasoft.Imaging.Pdf.PdfDocument.Save(Stream stream)
at Vintasoft.Imaging.Pdf.PdfDocument.Save(String filename)

Code is the same as before.

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: Embedded fonts in PDF/A

Post by Alex » Fri Feb 05, 2016 2:39 pm

Hello Daniel,
happy too early, with vintasoft.imaging.dll, version 8.3.5.1 and vintasoft.imaging.pdf.dll, version 5.3.5.1, i got the error:
PDF/A document must have embedded fonts only. SDK does not embed fonts into PDF document automatically and you need to do this in your code.

You need modify your code and do the following tasks:
  • Embed fonts into PDF document before saving PDF document
  • Save PDF document as PDF/A document
Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests