Page 1 of 1

Not able to convert form elements checkbox in docx into PDF

PostPosted: Wed May 15, 2013 9:39 pm
by anurags
Hi

I am trying to convert docx to pdf using ConvertOutPDF sample. We have many form elements in docx file like checkbox, dropdown,radio, form text..etc these are not able to convert into pdf

When it is converted into PDF I get following message in converted pdf

Is docx4j support form element? If yes please suggest how we can configure


Error message in generated PDF
no support for fields (except PAGE numbering)
except PAGE numbering) no support for fields (except PAGE numbering)


Thanks in advance

-Harshit

Re: Not able to convert form elements checkbox in docx into

PostPosted: Wed May 15, 2013 10:22 pm
by jason
Hello Harshit

There is no support for form elements checkbox, dropdown, radio in PDF output yet.

Maybe LibreOffice PDF output would do a better job?

If not, you are welcome to implement support in docx4j, and we'd welcome that as a contribution.

cheers .. Jason

Re: Not able to convert form elements checkbox in docx into

PostPosted: Fri May 17, 2013 6:52 pm
by anurags
Thanks Jason

Is there any other tool /library which support this kind of requirement ??
not sure iText / iTextSharp/POI support it…I guess docx4j use iText to convert into PDF


if you are aware any of other open source ..please suggest

Regards,
Harshit

Re: Not able to convert form elements checkbox in docx into

PostPosted: Fri May 17, 2013 11:42 pm
by jason
Actually, docx4j uses XSLFO + FOP as its primary means of PDF output.

So implementing support for a form field is a matter of recognising it in the XSLT stylesheet, then doing the right thing with it.

Currently we support several field types including MERGEFIELD and DOCPROPERTY field. For these, we resolve the data, and format it as specified.

Support could be developed for form field types; those fields have a w:calcOnExit element, which could be tricky to support.

Do you also use ActiveX form fields?

As per my earlier post, I'd suggest trying LibreOffice/OpenOffice to create PDF, which you can run via JODConverter. I did a quick test with a docx with form fields in it, and LibreOffice was able to output that to PDF.

Re: Not able to convert form elements checkbox in docx into

PostPosted: Sat May 18, 2013 2:22 am
by anurags
Thanks once again Jason

I Google for OpenOffice… it require open ofiice must be install first and some service need to start to convert into PDF,The files need to be available in the same machine where the service is running. In other words, the service is capable of converting only the local files..

Are you aware any licensed product can fulfill such requirement of converting form elements and also support non English fonts like Spanish, Chinese..etc

Regards,
Harshit

Re: Not able to convert form elements checkbox in docx into

PostPosted: Sat May 18, 2013 9:24 am
by jason
Out of interest, I just tried Ecrion XF Ultrascale, but it doesn't render legacy form fields or activex controls.

So, I still think OpenOffice or LibreOffice is your best bet (short of Microsot Word itself)

Yes, you do need to install OpenOffice or LibreOffice on your server. But if you use JODConverter, you can have a web service which accepts a docx and returns a PDF. (I have previously done this for binary doc to docx conversion)

Alternatively, you could try a Microsoft solution. Maybe you could use http://blogs.technet.com/b/office_resou ... erver.aspx or, if you have SharePoint, see http://www.wictorwilen.se/

cheers .. Jason

ps in docx4j PDF output, the first step to using non-English characters, is to use an appropriate font.