Remove Unused Fonts from PDF File Very Slow

Hi Edie,

Thanks for your feedback. Please note we have two queues, one for normal support and other is paid support queue. Your issue has high priority in normal support queue. Our product team has started the your issue investigation and we will update you with the findings/ETA as soon as it is completed.

Best Regards,

Thanks! Actually I was willing to upgrade myself to join the premium support to get higher priority even on the paid support queue. But I was not notified with this option. Anyways, wishfully this issue could be handled.

Hi Edie,


Thanks for your feedback. Anyhow as stated above our product team has scheduled the issue investigation and we will keep you updated about the issue resolution progress.

Thanks for your patience and cooperation.

Best Regards,

Hi! Is the progress positive???

Hi Edie,


Thanks for your inquriy. I am afraid the issue investigation is not completed yet. We will update you as soon as our team completes the investigation and share some update.

Thanks for your patience and cooperation.

Best Regards,

May I know is there any update on this performance issue?

Hi Edie,


We are sorry for the inconvenience. I am afraid the performance issue is more completed than expected. Our product team is working over the issue and we cannot give any promise about ETA at the moment. We will notify you as soon as we get any further update regarding this issue.

Thanks for your patience and cooperation.

Best Regards,

Hi,


Still have no updates on this issue?

Hi Edie,


We are sorry for the inconvenience. Our product team is working over the issue but I am afraid it is more complex than expected. We will notify you as soon as some update is available.

Thanks for your patience and cooperation.

Best Regards,

Hello,

Is there any update, thanks?

@echu,
Thank you for the inquiry. The linked ticket ID PDFNET-39720 is not resolved yet. It is a complex task and taking more time than usual. It is on the high priority list under the Free support model and we will notify you once it is fixed.

Best Regards,
Imran Rafique

Hello,

Is there any update, thanks?

@echu,

The linked ticket ID PDFNET-39720 is not resolved yet. It is a complex task and has low priority among other high priority tickets. We recommend our clients to post their critical issues in the paid forums. In order to escalate the priority, you can post this ticket in the paid support forum. Please refer to this help topic: Aspose - Paid Support Helpdesk

The issues you have found earlier (filed as PDFNET-39720) have been fixed in Aspose.PDF for .NET 18.3. This message was posted using BugNotificationTool from Downloads module by asad.ali

@echu

Adding more to above notification, we have investigated the issue and found source of performance loss in this scenario. The point is that changing font for multitude (~ 3500) text fragments invokes a number of checking and text state restore operations. They are essential in the scenarios where not all text fragment change their state. But in this scenario they are redundant.

Therefore we have implemented several new methods in the TextFragmentAbsorber class to perform some massive operations with (all absorbed) text fragments.

Please consider the following code:

// Load source PDF file
doc = new Document(inputFile);

absorber = new TextFragmentAbsorber(new TextEditOptions(TextEditOptions.FontReplace.RemoveUnusedFonts));
doc.Pages.Accept(absorber);

// Perform mass operation
absorber.ApplyForAllFragments(FontRepository.FindFont("Courier New"));

// Save updated document
doc.Save(GetOutputPath("39720_out_mass_op.pdf"));

Above code snippet produces output visually identical with output generated by your code snippet. But it works more than 2 times faster. In case of any further assistance, please feel free to contact us.

Thanks for your reply,

I already try sample code that you are provided. However, seems the Font style(bold, italic) is missing after “ApplyForAllFragments”.

Is it a bug or any solution to fix this problem?

@echu

Thanks for contacting support.

We have also observed the issue in generated output PDF and for the sake of correction, we have logged it as PDFNET-44473 in our issue tracking system. We will further investigate the reasons behind this issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

the thread was opened at Nov, 2015.

How come the issue has not been fixed yet!!!

@echu

Thanks for your inquiry.

Please note that earlier issue (PDFNET-39720) was logged regarding slow performance of the API while removing unused fonts from PDF document and that was fixed in Aspose.PDF for .NET 18.3 release. However it was found later that new introduced method (i.e ApplyForAllFragments) did not retain the font style (e.g Bold/Italic) while processing the text fragments and new issue (i.e PDFNET-44473) was logged in order to rectify this behavior.

Concerning to the new logged issue, we will definitely let you know once we make any significant progress towards its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.