dbarra / xdocreport

Automatically exported from code.google.com/p/xdocreport
1 stars 0 forks source link

Not able to convert form elements checkbox in docx into PDF #260

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Hi

i used the sample ConvertDocxBigToPDF to try PDF conversion from docx
but i am not able to convert Form elements 
We have many form elements in docx file like checkbox, dropdown, radio, form 
text..etc these are not able to convert into pdf 
and all non English font e.g Spanish, Chinese characters are converted to ????

i am using the Version 3,of xdocreport on Windows platform

Attached, sample file and out put file for your reference 

can you please suggest how can I resolve this problem 

Thanks in advance 
Harshit

Original issue reported on code.google.com by har.shu...@gmail.com on 17 May 2013 at 11:52

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Harshit,

> checkbox, dropdown, radio, form text..etc these are not able to convert into 
pdf 
I don't know if it's easy to do that, but It should be cool if converter 
manages that. I will study that when I will have time. Any contribution are 
welcome!

> all non English font e.g Spanish, Chinese characters are converted to ????
For Chinese characters, I have not found a clean solution except to hard coded 
the font. See my comment at 
https://code.google.com/p/xdocreport/issues/detail?id=81#c8

For Spanish characters, perhaps it's the same problem or perhaps you have not 
the installed font in your platform (it's a iText problem).

Regards Angelo

Original comment by angelo.z...@gmail.com on 17 May 2013 at 12:12

GoogleCodeExporter commented 8 years ago
Hi Angelo,

Checkboxes and model boolean properties for toggling would be great...

3 month passed in the meanwhile, did you found some time for investigations or 
somebody?

Kind regards,
Andreas

Original comment by nieme...@googlemail.com on 13 Aug 2014 at 8:17

GoogleCodeExporter commented 8 years ago
Hi Andreas,

I'm very busy, so nothing was done.

Regard's Angelo

Original comment by angelo.z...@gmail.com on 13 Aug 2014 at 11:24

GoogleCodeExporter commented 8 years ago
Hi,

I know I asked recently :-) 
I would like to use your model processing so much, but that desired checkbox 
functionality is a blocking point for now...
Any news in implementing or planning?

Kind regards,
Andreas 

Original comment by nieme...@googlemail.com on 10 Sep 2014 at 9:11

GoogleCodeExporter commented 8 years ago
No sorry, I have no time to do that.

Any contrubution are welcome!

Original comment by angelo.z...@gmail.com on 10 Sep 2014 at 10:47

GoogleCodeExporter commented 8 years ago
Not suprised... where to put some bucks in your pocket? ;-)

It's the same to me unfortunately. 

Could you outline in tiny therms what steps to do to add such checkbox 
functionality and how much time it would cost?

Original comment by nieme...@googlemail.com on 10 Sep 2014 at 12:27

GoogleCodeExporter commented 8 years ago
> Could you outline in tiny therms what steps to do to add such checkbox 
functionality?

To support that, we need understand : 

 * how to ooxml (docx) manage that
 * how to retrieve checkbox from POI
 * how to generate a checkbox with iText

> and how much time it would cost?

I don't know without studying those 3 steps.

Original comment by angelo.z...@gmail.com on 10 Sep 2014 at 7:55

GoogleCodeExporter commented 8 years ago
I did some research and think I go for docx4j for the checkbox processing part 
and use a commercial converter, no conversion is needed at this point. (Btw I 
tried Docmosis also for the doctype conversion process and the quality of some 
of our very complex DocX templates is not as good as it should be; next step 
here is to evaluate a pdf-tools converter) 

The POI XWPF doesn't look too promising and I found some examples for docx4j 
and the project seems to be much more powerful in general.  

I suppose it might be the better choice for the core model processing as the 
base framework instead of POI.

Maybe someone will reply on my ask question in the POI group how to address the 
checkbox issue:

http://apache-poi.1045710.n5.nabble.com/XWPF-and-DocX-template-processing-with-C
heckboxes-toggling-td5716572.html

Here some relevant docx4j links: 

http://www.docx4java.org/trac/docx4j
http://java.dzone.com/articles/create-complex-word-docx
http://www.docx4java.org/forums/data-binding-java-f16/set-checkbox-values-and-te
xt-values-using-docx4j-t1584.html
http://stackoverflow.com/questions/15763778/docx4j-checking-checkboxes

Kind regards,
Andreas

Original comment by nieme...@googlemail.com on 10 Sep 2014 at 10:07

GoogleCodeExporter commented 8 years ago
> I did some research and think I go for docx4j for the checkbox processing 
part 

You mean convert checkbox to PDF or manage selection of checkbox with Java code?

If it's second case, it's an other issue for XDocReport (managing checkbox with 
IContext)

> use a commercial converter

At first you can read an article I had written at 
http://angelozerr.wordpress.com/2012/12/06/how-to-convert-docxodt-to-pdfhtml-wit
h-java/

The conversion is the very hard task. We provide a docx->pdf converter based on 
POI + iText. When you wish to convert a generated docx report to PDF you can 
use this converter, but as XDOcReport converter is modular you can use any 
converter. We provide too a docx->pdf based on docx4j + FOP (provided by 
docx4j).

> I suppose it might be the better choice for the core model processing as the 
base framework instead of POI.

If I understand you want to give up XDocReport to use docx4j or POI to create 
your docx because XDocReport doesn't support management of checkbox for docx 
report generation?

Original comment by angelo.z...@gmail.com on 11 Sep 2014 at 7:13

GoogleCodeExporter commented 8 years ago

> The conversion is the very hard task. 
I noticed, learned and can confirm!

> If I understand you want to give up XDocReport to use docx4j or POI to create 
your 
> docx because XDocReport doesn't support management of checkbox for docx 
report 
> generation?

No, not giving up, your concept and the framework is ingenious and only for the 
checkbox functionality I plan to do the processing with DocX4J to cut the 
corner for now. 

Original comment by nieme...@googlemail.com on 11 Sep 2014 at 7:30

GoogleCodeExporter commented 8 years ago
If I understand you have 2 problems with XDocReport : 

1) in report step :  managing checkbox with IContext to  check/uncheck checbox 
with Java model.
2) in conversion step : convert docx checkbox to PDF.

This issue is about 2) . The 1) is an other issue.

Original comment by angelo.z...@gmail.com on 11 Sep 2014 at 7:34

GoogleCodeExporter commented 8 years ago
> 1) in report step :  managing checkbox with IContext to  check/uncheck 
checbox with Java model.

Yes, that is needed

> 2) in conversion step : convert docx checkbox to PDF.

Out of scope for the main reason that the quality of the pdf is not good 
enough; nevertheless for less complex docx templates it might be good. 

I'm only facing item 1.  

Original comment by nieme...@googlemail.com on 11 Sep 2014 at 7:43