Hello!
I try to convert PDF document to PDF/A which normally works fine.
But if the document uses the font Akagi (Akagi Pro Book, Akagi Pro Bold), embedding of the font during the pdf/a conversion seems to make problems:
- The document is not pdf/a conform afterwards
- Log: Font “AkagiPro-Book” contains table “LINO” which can’t be used in this PDF format
- Acrobat Reader shows a problem when the document is opened
Is there any possibility to to convert pdf documents which use this font to pdf/a?
Attached is the converted pdf: akagi.pdf (113.3 KB)
Kind regards!
@dvtdaten
In which ABA variant are you converting the document?
What do you mean by “ABA variant”?
Here is the code of the conversion, which produces the pdf of my first post, which is not pdf/a conform:
Document document = new Document(new ByteArrayInputStream(content));
PdfFormatConversionOptions options = new PdfFormatConversionOptions(PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
options.setTransparencyAction(ConvertTransparencyAction.Default);
options.setConvertSoftMaskAction(ConvertSoftMaskAction.ConvertToStencilMask);
document.setDisplayDocTitle(true);
document.convert(options);
I then tried to convert it to PDF_A_2A, which reaches pdf/a conformity, but the embedded Akagi font is not used in the pdf:
akagi.pdf.pdf (4.1 MB)
I also tried some optimizing
options.setOptimizeFileSize(true);
OptimizationOptions o = new OptimizationOptions();
o.setSubsetFonts(true);
o.setRemoveUnusedStreams(true);
o.setRemoveUnusedObjects(true);
document .optimizeResources(o);
With this settings, the resulting pdf is pdf/a conform and uses the Akagi font, but the text in the document looks strange (in the bottom half of the pdf):
akagi.pdf.pdf (98.8 KB)
Kind regards!
@dvtdaten
I apologize for the typo - I wanted to know which version of the PDF/A is being converted to.
I reproduced the problem related to the fact that the file does not pass verification after conversion to PDF_A_1B and will create a task for the development team.
@dvtdaten
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFNET-55740
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@dvtdaten
I check issue for packet version 23.12 with following code:
var document = new Document(dataDir + "akagi.pdf");
var options = new PdfFormatConversionOptions(PdfFormat.PDF_A_1B, ConvertErrorAction.Delete)
{
TransparencyAction = ConvertTransparencyAction.Default,
ConvertSoftMaskAction = ConvertSoftMaskAction.ConvertToStencilMask
};
FontRepository.Sources.Add(new FolderFontSource(dataDir + "Fonts")); // If font installed in system this line don't need.
document.DisplayDocTitle = true;
document.Convert(options);
document.Save(dataDir + "akagi-out.pdf");
In the dataDir + “Fonts” directory I placed the font files (AkagiPro-Bd.otf and AkagiPro-Bk.otf taken from the relaited issue PDFNET-55870, file akagi.zip).
If the system has a font installed, then this line is not needed.
The resulting document is validated by Adobe Preflight.
image.png (63.8 KB)