We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Reload pdf file by Aspose.Pdf.Pdf object

I am trying to reload and then linearize existing pdf file by Aspose.Pdf.Pdf object.

First, load pdf file by constructor Pdf(Stream) from filestream;

Then set Linearized to true;

Finally Close Pdf.Pdf object.

Keep getting error saying "The number of pages less than 3 , document can not to be linearized !".

Is there any solution for this? Or it's not doable at all?

Added: the existing file is created by Aspose.Pdf.Kit, I just wanna linearize it.

Hi Jason,

It looks like you’re trying to load the PDF file using Aspose.Pdf. I would like to share with you that an existing file can’t be loaded using Aspose.Pdf, rather you’ll have to use Aspose.Pdf.Kit. As far as the linearization is concerned, this feature is currently not supported, however a request as PDFKITNET-10185 is already logged to provide this feature in our future versions.

We’re sorry for the inconvenience.