Page 1 of 1

Checkboxes not converting to PDF

PostPosted: Mon Oct 20, 2014 2:00 pm
by javasol
I'm trying to convert a docx to PDF and the checkboxes are showing up as # instead of the box. I have searched the forums and tried multiple suggestions but it's still not working. I don't have control over the contents of the docx, I don't even know 100% which font it's using to create those checkboxes.

I'm using docx4j 3.2.1

Re: Checkboxes not converting to PDF

PostPosted: Mon Oct 20, 2014 6:42 pm
by jason
In your docx, there were 2 instances of 1 checkbox char which didn't render correctly;

https://github.com/plutext/docx4j/commi ... d79dad8365

fixes this.

Re: Checkboxes not converting to PDF

PostPosted: Tue Oct 21, 2014 6:31 am
by javasol
Thank you for the (really) fast reply!

Being new to docx4j I'm not sure what that means. Does that mean that I should get that version of the code and do a build on my own? If yes what happens in future releases?

Re: Checkboxes not converting to PDF

PostPosted: Tue Oct 21, 2014 12:45 pm
by javasol
Never mind, I figured out how to fork and import from github.

I now have the same issue for different checkboxes, I'm not sure why the person that created the .docx is using different checkboxes but I am not allowed to change it. I uploaded the .docx with the fixed checkboxes and the problematic ones.

As an aside, how can I fix this so that I don't have to bother anyone? Is there a way to figure out which character it is?

Re: Checkboxes not converting to PDF

PostPosted: Tue Oct 21, 2014 8:39 pm
by jason
Works for me.

If you look at the intermediate fo file, it uses font-family="Segoe UI Symbol"

But your copy of ConvertOutPdf specifies a regex which excludes that font. If in doubt, don't restrict fonts by regex.