EmptyDocumentException:

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for Java (v4)  /  EmptyDocumentException:

DynamicPDF Generator for Java (v4) Forum

 Jan 10 2008 1:40 PM
HI I have a licensed copy of Dynamic Pdf Generator. When I run it on test machine  it works fine but when I run it on our production boxes I get an EmptyDocumentException .I get this exception when I about to call document.drawToWeb method .

Any suggestions ???

Thanks
 Jan 10 2008 4:43 PM
Posted by a ceTe Software moderator
By design, the only reason that this exception is ever through is if a Document containing no Pages is attempted to be drawn (using the Draw or DrawToWeb method).  A Document with no Pages is not a valid Document and will always throw this error.

The logic within your application must be allowing for the creation of Document that is not having any pages to it.  You may consider either modifying your logic to prevent this case from ever happening or doing a check on the Document object before you draw it to verify the Document has pages.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 1:54 AM.