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

Free Support Forum - aspose.com

‘System.OutOfMemoryException’ in while using Aspose.PDF

Hi,
I have the same issue creating a PDF file using HtmlLoadOptions.
‘System.OutOfMemoryException’ in Aspose.Pdf.dll
Below is the VB.NET code snippet that casued the error

pdfDocument = New Aspose.Pdf.Document(CStr(TransformXmltoHtml(sXML, sXSL)), options)

@nvamshi

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input PDF document.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

@nvamshi

We have tested the scenario using the latest version of Aspose.PDF for .NET 22.9 and have not found the shared issue. So, please sue Aspose.PDF for .NET 22.9.

@tahir.manzoor
Thanks for your response
We are currently using version of the Aspose.Pdf.dll
image.png (44.5 KB)
Let me know if we have to use an upgraded version to resolve this issue

@nvamshi

You are using very old version of Aspose.PDF for .NET. Please use Aspose.PDF for .NET 22.9 to avoid this issue. You can get 30 days temporary license and apply it before importing PDF into DOM.

@tahir.manzoor ,
I was able to download the latest version but cannot get a temporary license. It throws an error (related to Email Address) from the Checkout page after I put in the contact details. I have used my company email address but no luck. Can you share a temporary license for the PDF component?

thanks

never mind. looks like we have a license and that worked!
thanks

@nvamshi

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.PDF, we will be happy to help you.

@tahir.manzoor
When using the new component it is not generating the PDF like before
as shown in the attachment, header section doesn’t use full width of the page (like before)
Capture.GIF (36.7 KB)

Attached is the html that was used to generate the PDF
data_xml.zip (860 Bytes)

Below is the code snippet used

options = New Aspose.Pdf.HtmlLoadOptions()

options.PageInfo.Margin.Bottom = 10
options.PageInfo.Margin.Top = 20
options.PageInfo.Margin.Left = 20
options.PageInfo.Margin.Right = 20
options.PageInfo.IsLandscape = True

options.PageInfo.Width = PageSize.PageLetter.Width
options.PageInfo.Height = PageSize.PageLetter.Height
options.PageLayoutOption = HtmlPageLayoutOption.ScaleToPageWidth

pdfDocument = New Aspose.Pdf.Document(CStr(TransformXmltoHtml(sXML, sXSL)), options)

Let me know how it can be corrected

thanks

@nvamshi

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input HTML/PDF document.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.