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

Free Support Forum - aspose.com

Issue when calling close

We are using Aspose.PDF version 7.6.0 within a SharePoint 2010 solution mening that we are depending on .Net 3.5. We are facing issues for some items when we call Aspose.Pdf.Generator.Pdf.Close(), where it fails with:

Message: Length cannot be less than zero.\r\nParameter name: length
StackTrace: at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at .„.€(– , String , Single , Int32 , Single , Boolean )
at ..(Text text, Pdf doc, – tempGen, Single maxSizeWithoutInline, › assignInfo, Cell cell, Section currentPart, Table table, Int32 index, Segment currentSegment, Single textHeightByNow, Int32 font, Boolean& isFirstLine, Single bakcurpos, Int32& startSegIndex, Single& maxSize, Boolean& needReprocessForPageNumber, Row row, Single descender, Int32 breakSegIndex, Int32 wrapCount)
at ..(Text , Pdf , – , Single , › , Cell , Single , Section , Table , Int32 , Segment , Segment , Single , Int32 , Boolean& , Single& , String , e , String , Boolean , Single , Int32& , Single& , Boolean& , Row , Single , Int32 , Int32 )
at ..€(Pdf , Section , Table , Row , Cell , Text , › , , Boolean )
at ..(Pdf , Section , HeaderFooter , Table , Row , Cell , Text , › , , Boolean )
at ..(Section , Paragraph )
at Aspose.Pdf.Generator.Pdf.Close()

We do have a License for free upgrade that goes to 2013

Please advise on how to come by this issue.

@jensballing

We are afraid that you are using quite old version of the API which used Aspose.Pdf.Generator model. Please note that this old approach has been deprecated and we are not providing any support or resolving issues related to it. New/latest version of the API follows DOM (Document Object Model) approach and is recommended.

We request you to please try using latest version of the API and in case you still face any issue please let us know by sharing complete sample code snippet along with sample input PDF. We will test the scenario in our environment and address it accordingly.