Fonts are not loading while concatenate pdf

Hello,

We are converting different Excel to PDF using Aspose.Cells and then concatenating generated pdf using Aspose.PDF. After concatenation, fonts are getting changed and are converted to default Arial. What could be the issue here? Please let us know. We are using Aspose license version 21.3.0 and below is our code to concatenate the files.

            Aspose.Pdf.License licenseKey = new Aspose.Pdf.License();
            licenseKey.SetLicense("Aspose.Total.lic");
            PdfFileEditor pfe = new PdfFileEditor();
            pfe.Concatenate(inputFiles, outputFile);
            //Deleting blank pages
            Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(outputFile);
            int i = 0;
            foreach (Aspose.Pdf.Page page in pdfDocument.Pages)
            {
                i = i + 1;
                bool value = page.IsBlank(0.01d);
                if (value)
                {
                    pdfDocument.Pages.Delete(i);
                }
            }

            pdfDocument.Save(outputFile);

Input file is having the fonts Angsana but after executing above code, fonts are getting changed to Arial.

Please find Original Excel, converted and merged pdf in attachment.Files.zip (377.7 KB)

@Vaidehi123

We have tested the scenario using the latest version of Aspose.PDF for .NET 22.2 with following code example and have not found the shared issue. So, please use Aspose.PDF for .NET 22.2.

PdfFileEditor pfe = new PdfFileEditor();
pfe.Concatenate(new string[] { MyDir + "ExcelToPdfConvertedFile.pdf" }, MyDir + "22.2.pdf");

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(MyDir + "22.2.pdf");
int i = 0;
foreach (Aspose.Pdf.Page page in pdfDocument.Pages)
{
    i = i + 1;
    bool value = page.IsBlank(0.01d);
    if (value)
    {
        pdfDocument.Pages.Delete(i);
    }
}

pdfDocument.Save(MyDir + "22.2.pdf");
1 Like