Page 1 of 1

DOCX to PDF - The document has no pages

PostPosted: Fri Jul 09, 2010 3:54 am
by sparkynarf2003
I'm getting an error when converting my docx file created in Word 2007 to pdf and using the viaIText solution.
The error i get is java.IOException: The document has no pages.

Please can anyone point me in the right direction. :?:

I have a few problems which i'm sure are all related to this page thing.

In my DOCX file i copied the first page text to a second page so that there are two identical pages in it with mail merge fields. When i substitute the mail merge fields with values programatically it doesn't substitute them on the first page it just adds the values as null but it does then do it properly on the second page.

I'm not quite sure what to look for but is there a way to say get the amount of pages or to at least check whether the code picks up that there are two pages in this docx file?

Thanks in advance
Sean

Re: DOCX to PDF - The document has no pages

PostPosted: Fri Jul 09, 2010 10:55 am
by jason
With the changes to your code I suggested in response to your other post, the PDF generates fine via XSL FO and via iText.

I couldn't see any field code stuff in your code, so if problems still remain relating to that, feel free to post again...

Re: DOCX to PDF - The document has no pages

PostPosted: Fri Jul 09, 2010 10:54 pm
by sparkynarf2003
Hi Jason,

This has been resolved thanks to your input regarding the header and footer issues i had as well as suggesting using the new libraries as well as viaXSLFO instead of IText.

Regards
Sean