Issue with font substitution after concatenating PDF even with embedding fonts

Hi there

We’re encountering an issue with font substitution when editing a PDF created by Aspose in Acrobat Pro. Please see attached PDF sample (concat-font-issue.pdf). When attempting to edit the text (“As of 12/30/2016…”, the text is garbled due to what I assume is font substitution. I’ve included the source documents that were used by Aspose to concat into one single document. And also the code to locate the font and embed it.

Here is the code used to concatenate.

var docStream = new FileStream(@“C:\temp\font issue.pdf”, FileMode.Open);
var docStream2 = new FileStream(@“C:\temp\newpage.pdf”, FileMode.Open);
var outputStream = new MemoryStream();
var pdfEditor = new PdfFileEditor();

pdfEditor.Concatenate(docStream, docStream2, outputStream);

var doc = new Aspose.Pdf.Document(outputStream);

doc.Save(@“C:\Temp\concat-font-issue.pdf”);

Code to loop through pages, and embed each font fully

foreach (Aspose.Pdf.Page page in doc.Pages)
{
if (page.Resources.Fonts != null)
{
foreach (Aspose.Pdf.Text.Font pageFont in page.Resources.Fonts)
{
// Check if the font is embedded
if (!pageFont .IsEmbedded)
pageFont .IsEmbedded = true;
}

Thanks in advanced for your help.


Hi Abby,


Thanks for contacting support.

We are looking into the scenario and will get back to you shortly. Please be patient.


Best Regards,

Hi Abby,


I have tested the scenario and have managed to reproduce the problem that when you open the concatenated PDF file in Adobe Acrobat and attempt to edit the text in Adobe Acrobat Pro, and it becomes garbled. For the sake of correction, I have logged a ticket PDFNET-42540 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of its resolution within this forum thread. Please be patient and spare us little time. We are sorry for this inconvenience.

Best Regards,