Excuse me if I re-open this post… what kind of optimization do the Optimize() and OptimizeResource() performs? I’ve got a file, after optmizing it it’s bigger then the source… doing a Adobe -> Save as creates a smaller file…
Thanks
Hi Paolo,
ok splendid… I’ve got also a file that when I do a OptimizeResource it throws an exception with Object not set to an instance of an object…if there a way of providing you further information? don’t know maybe via tracing/debug version of the aspose pdf dll?
Hi Paolo,
can you provide me a pvt mail address where I can send it?
Excuse me is there a place where I can look at the status of PDFNEWNET-35227 ?
just to understand do you plan to release a new version of Aspose.Pdf in a short?
Thanks
pponzano:
can you provide me a pvt mail address where I can send it?
pponzano: Excuse me is there a place where I can look at the status of PDFNEWNET-35227 ?
Hi Paolo,
As soon as we have made some progress towards the resolution of this issue, we will keep you updated on the status of correction within this forum thread. Please be patient and spare us little time. Your patience and comprehension is greatly appreciated in this regard.
pponzano: just to understand do you plan to release a new version of Aspose.Pdf in a short?
We do have a plan to release a new version of Aspose.Pdf for .NET in current week. However since we recently have been able to notice this issue, so the development team requires little time to investigate and figure out the actual reasons of this problem. I am afraid the resolution of PDFNEWNET-35227 will not be included in the upcoming release. We are sorry for this inconvenience.
The issues you have found earlier (filed as PDFNEWNET-35227) have been fixed in Aspose.Pdf for .NET 9.3.0.
Blog post for this release can be viewed over this link
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Paolo,
Thanks for your patience. We have investigated the issue and found that document optimized by Aspose contains embedded fonts. Whereas Adobe Distiller un-embeds these embedded fonts, this explains the difference in document size.
In order to provide the same ability to optimize the document, a new feature, un-embedFonts
property, is added to OptimizeResources in the upcoming release 9.3.0. When the un-embedFonts
flag is set in Document.OptimizationOptions
, all fonts in the document will be un-embedded.
Document doc = new Document("35227.pdf");
Document.OptimizationOptions opt = new Document.OptimizationOptions();
opt.UnembedFonts = true;
doc.OptimizeResources(opt);
doc.Save("35227-out.pdf");
You may also un-embed some particular fonts with the following code:
Font.IsEmbedded = false;
For example:
foreach (Aspose.Pdf.Text.Font font in page.Resources.Fonts)
{
font.IsEmbedded = false;
}
But this may be incorrect for some types of fonts, for example, for CID Fonts.
Please feel free to contact us for any further assistance.
Best Regards,