Unable to update pdf with fast web view as True

Hi Team,

Unable to update existing pdf with fast web view as True.

We have seen code samples for
1.PDFObj.IsLinearized = true;
2.PDFObj.Optimize();

Found the Error message below

  • Message :Object not found

  • (ex.InnerException).Message = “Reference table is not repaired”

  • at . ??( )

  • at .(Int32 , Int32 )

  • at . ??(Int32 , Int32 )

  • at ? . ??()

  • at ? .? ??()

  • at ? . ??()

  • at .()

  • at .( , Boolean )

  • at .( , Boolean )

  • at . ??( , )

  • at . ??()

  • at . ??(Stream )

  • at ? .? ??(Stream )

  • at Aspose.Pdf.Document.Save(Stream output)

@kranthireddyr

Thanks for contacting support.

Would you please share your sample PDF document and complete code snippet. We will test the scenario in our environment and address it accordingly.

@asad.ali

using (Aspose.Pdf.Document documentFast = new Aspose.Pdf.Document(filePath))
{
if (documentFast.Form.Type == FormType.Standard)
{

                                if (documentFast.IsLinearized == false)
                                {
                                    // documentFast.IsLinearized = true;
                                    documentFast.Optimize();
                                }

                            
                                DocumentInfo docInfo = new DocumentInfo(documentFast);
                                docInfo.Author = "";
                                docInfo.Keywords = "";
                                docInfo.ModDate = DateTime.Now;
                                docInfo.Subject = "";
                                docInfo.Title = "";
                         
                                documentFast.Save(filePath);
                            }
                        }

please find the below attachment
sample.pdf (457.1 KB)

@kranthireddyr

Thanks for sharing sample PDF and code snippet.

We have tested the scenario while using Aspose.PDF for .NET 18.7, and were unable to notice any issue while saving the PDF document. For your kind reference, an output PDF Document is also shared. Please try using latest version of API and in case you still face any issue, please feel free to let us know.

samplePDF_out.pdf (59.2 KB)

@asad.ali

Thanks for the info

But we have licence for other version 16.12.0.0
can you check with this version.

image.png (31.1 KB)

@kranthireddyr

Thanks for writing back.

Please note that, issues in older versions of API, are resolved in latest version. Which is why we always recommend to use latest version of the API, because it contains more fixes and enhancements. I am afraid we may not be able to provide support if issue is not occurring with latest version of Aspose.PDF for .NET. We request you to please upgrade your license, and use latest release of the API. In case of any issue, please feel free to let us know.