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

Free Support Forum - aspose.com

Aspose.PDf error : "The rectangle size can not be larger page size Parameter name: rectangle"

Hi,



I used the DOM approach to create a PDF file from a Html string and the things worked great for small size HTML strings where the content of the html can fit in a single Page of the PDF file.



Now, I have a large HTML string. when instantiated the HtmlFragment with this large html string, add this to collection of Page and save. Throws the error “The rectangle size can not be larger page size

Parameter name: rectangle”



The detailed error message is

at ‰.‹ž…ctor(Page , RectangleF , Boolean )

at Aspose.Pdf.Page.Accept(•– , RectangleF , Boolean , Boolean )

at ‰.Ž.Process()

at Aspose.Pdf.Page.(Page )

at Aspose.Pdf.Page.‡Š()

at Aspose.Pdf.Document.‡Š()

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

at Aspose.Pdf.Document.Save(String outputFileName)



Can you Please help me to resolve this error.



Looks to be the page is not sufficient to fit the data in a single Page.



below is the code snippet:

----------------------------

string html="";



Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();

Aspose.Pdf.License license = new Aspose.Pdf.License();

license.SetLicense(“Aspose.Pdf.lic”);

Document doc1 = new Document();



// Add a page to pages collection of PDF file

Page page = doc1.Pages.Add();



// Instantiate HtmlFragment with HTML contnets

HtmlFragment htmlfrag = new HtmlFragment(html);





// Add HTML Fragment to paragraphs collection of page

page.Paragraphs.Add(htmlfrag);



doc1.Save(@filelocation);





I am using Aspose.Pdf version - 9.7.0.0



Attached is the Html string that is input to HtmlFragment.



Please help me to resolve this error.







Thanks,

Uma.A

Hi Uma,

Thanks for your inquiry. In your another post, we have replicated the issue and logged issue as PDFNEWNET-37693 in our issue tracking system for resolution. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-37693) have been fixed in Aspose.Pdf for .NET 9.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hello Aspose,

Thanks for your updated version!!

I am also facing the same issue which is mentioned by Uma. Now we have updated the version to 9.8.0

I am passing the HTML code (which displays content more than one pages in PDF) into HTMLfragment.

In before version it was throwing above mentioned error. But now it is not producing the PDF and it is not throwing any error. It is keep on in the running state until we close it manually.

Could you please help us!

Thanks in Advance.

--Dinesh R

I tried with the new Aspose.PDF 9.8.0.0.The PDF file is not created and the program just struck, no response when run with new Aspose.

Hello team,

The fix to display html code in contiguous pages is not working. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

If it is a big html code covering multiple pages is passed, a 0KB file is created and it gets hanged. We have to close it manually.

It would be of great help if you fix the problem of a big html page not getting converted to continuous pdf pages.

btw - If we send section by section, then each section gets displayed in separate pages with the rest of the page being blank...

Please help!!

- Vishaka

Dinesh_Rathinam:
I am also facing the same issue which is mentioned by Uma. Now we have updated the version to 9.8.0

I am passing the HTML code (which displays content more than one pages in PDF) into HTMLfragment.

In before version it was throwing above mentioned error. But now it is not producing the PDF and it is not throwing any error. It is keep on in the running state until we close it manually.

Hi Dinesh,

Thanks for contacting support.

Can you please share your HTML and code snippet which you are using so that we can test the scenario in our environment. We are sorry for this inconvenience.

Uma Annareddy:
I tried with the new Aspose.PDF 9.8.0.0.The PDF file is not created and the program just struck, no response when run with new Aspose.
Hi Uma,

The problem PDFNEWNET-37693 was logged against the exception being generated when trying to parse HTML contents inside PDF document. However, I am able to reproduce the process hang problem when trying to convert same HTML contents. I have separately logged it as PDFNEWNET-37824 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time.
Vishaka_R:
The fix to display html code in contiguous pages is not working.

If it is a big html code covering multiple pages is passed, a 0KB file is created and it gets hanged. We have to close it manually.

It would be of great help if you fix the problem of a big html page not getting converted to continuous pdf pages.

btw - If we send section by section, then each section gets displayed in separate pages with the rest of the page being blank...

Hi Vishaka,

As requested earlier, please share the resource HTML so that we can test the conversion in our environment. Furthermore, please note that by default, each section should be displayed/rendered in a separate page.

Hello Aspose,

Could you please tell us when this issue will be resolved?

Thanks,

Dinesh R

Hi Diensh,


Thanks for your inquiry. I am afraid the reported issue is not resolved due to other the other issues, already under investigation/resolution. However we have asked for an ETA and will update you as soon as we get a feedback.

Thanks for your patience and cooperation.

Best Regards,

Hi Diensh,


After discussing the status of PDFNEWNET-37824, the development team has shared an ETA of Aspose.Pdf for .NET 10.1.0, which is planned to release in February-2015. However its not a promise but we will try our level best to get the problem fixed by said time. Please be patient and spare us little time.

Thank You Tilal and Nayyer...!

Thanks for your extensive help :)

The issues you have found earlier (filed as PDFNEWNET-37824) have been fixed in Aspose.Pdf for .NET 10.0.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan