Change existing PDF font with different font

i am using Aspose.pdf for .Net 4.0 - version 24.2.0.0 (Evaluation version)

There are some issues i have idendified.

  1. Some words are getting overlapped.
  2. Only few words are converted to specific font(is this due to Evaluation version)
  3. is it possible to change the font with different font style (Bold, Light) in a single document
  4. Is there any limitation base on file size or number of pages

Following are the code snippet

Document doc = new Document(@“D:\Tests\SampleReport.pdf”);

        string ret = string.Empty;

        FontRepository.Sources.Clear();

        // add font folder path
        String fontFolderPath = @"C:\Windows\Fonts\";
        FolderFontSource fs = new FolderFontSource(fontFolderPath);
        FontRepository.Sources.Add(fs);

        TextFragmentAbsorber absorber = new TextFragmentAbsorber(new TextEditOptions(TextEditOptions.FontReplace.RemoveUnusedFonts));
         Aspose.Pdf.Text.Font font = Aspose.Pdf.Text.FontRepository.FindFont("Mulish-Black");

        for (int i = 1; i <= doc.Pages.Count; i++)
        {
            doc.Pages[i].Accept(absorber);
            foreach (TextFragment textFragment in absorber.TextFragments)
            {

                textFragment.TextState.Font = font;

            }

        }


        // Save document
        if (File.Exists(@"D:\Tests\output.pdf"))
        {
            File.Delete(@"D:\Tests\output.pdf");
        }

        doc.Save(@"D:\Tests\output.pdf");

@KiranNarkhede
Could you please attach your input document so we can investigate your issue?

Please find the documents required
Original File
Original_SampleReport.pdf (31.9 KB)

Outputfile
SampleReportoutput.pdf (137.0 KB)

@KiranNarkhede
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-56766

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.

As I understood from investigation
1.That seems like a bug, I added new task for development team to investigate and fix
2.Yes, that is limitation of evaluation mode
4.Limitation is tied to number of items in every collection - you can change 4 items in total for every collection so in case of pages you are restricted to 4 pages
3. Do you mean applying both Bold and Italic to a single text fragment ?
If that’s the case then you should try do something following:

doc.Pages[i].Accept(absorber);
foreach (TextFragment textFragment in absorber.TextFragments)
 {
 textFragment.TextState.Font = font;
textFragment.TextState.FontStyle = FontStyles.Bold |FontStyles.Italic;
}