Aspose Pdf uses two ways to optimize PDF file size

@sumeetm

We have generated following tickets for the issues which have been observed in Aspose.PDF for Java 20.9:

PDFJAVA-39801

PDFJAVA-39802

We will further check them in details and keep you posted with the status of their rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi @asad.ali,
Seems like this issue was opened in public, Can you please make it private?

@sumeetm

Would you please explain what do you mean by making the issue private? Do you want us to make attachments private or complete thread?

Complete thread.

@sumeetm

We have marked this whole thread as private now.

Hi @asad.ali,
Can we have an update on this issue?

Thanks,
Avinash.

@sumeetm

The tickets were logged recently in our issue management system and we are afraid that they are pending for analysis. We will surely investigate and resolve them on first come first serve basis. We will inform you as soon as we have additional updates in this regard. Please give us some time.

We apologize for the inconvenience.

Hi @asad.ali,

Can we have an update on this issue?

Thanks,
Avinash.

@sumeetm

We are afraid that no updates are available regarding tickets resolution. We will let you know within this forum thread as soon as we have some news about their fix.

We apologize for the inconvenience.

Hi @asad.ali,
Any update on this issue?

Thanks,
Avinash.

@sumeetm

Regretfully, the tickets have not been completely investigated yet. As soon as analysis is completed, we will share updates with you within this forum threads. Please spare us some time.

We apologize for the inconvenience.

Hi @asad.ali,
Please share the status of the issue.

@sumeetm

We regret to inform that no update is available at the moment regarding ticket(s) resolution. As shared earlier, we will surely inform you once they are completely investigated and rectified. We highly appreciate your patience and cooperation in this matter. Please give us some time.

We really apologize for the inconvenience and delay.

Hi @asad.ali,

Can you please check engineering team and provide us an update on this issue?

Thanks

@sumeetm

We would like to share with you that both tickets have been scheduled for fix in 21.4 version of the API which will be released in April 2021. We will post a notification in this thread as soon as the fixed-in version is available.

We apologize for the delay and inconvenience faced.

@rnara

We have investigated the logged ticket PDFJAVA-39802. Regretfully, we do not have a way to convert a CFF font with a negative glyph width from PDF to a Subset TrueType font at the moment.
The same problem was tested for the same input file in another issue PDFJAVA-39405. Please do not use the following option if document uses CFF font with a negative glyph width:

optimizationOptions.setSubsetFonts(true); 

Hi @asad.ali,

Do we have any update on this?

@rnara

We are afraid that the ticket PDFJAVA-39801 is not yet resolved. It is under the phase of investigation and as soon as we have additional updates regarding its resolution, we will share with you. Please give us some time.

We are sorry for the inconvenience.

Hi @asad.ali,

We are implementing the shared code now with exposing option to enable/disable the functionalities like SetSubsetFonts, SetRemoveUnusedStream, RemoveUnusedObjects.

Earlier I raised a query asking about functionality of each of the mentioned parameters. As it was mentioned by you earlier that OptimizeFileSize and OptimizationOptions.SubsetFonts has same functionality i.e applying font subsets to fonts used in the doc.
So, I tried testing the shared code, once with only PdfFormatConversionOptions.optimizeFileSize(true) and got this result :OptimizeFileSize.pdf (1.1 MB) where texts are scattered and are not in actual place.

for second time I tried with enabling only OptimizationOptions.setSubsetFont(true) and output was fine. SetSubsetFonts.pdf (1.1 MB)

Also, Output file sizes are different for both of them.

  1. Can you please explain the reason behind the difference?
  2. And, is there any dependency of one on the another?

Thanks,
Avinash.

@rnara

Can you please also share the respective source PDF document with us so that we can test the scenario in our environment and address it accordingly.