Page 1 of 1

Convert docx to pdf viaXSLFO - Page orientation

PostPosted: Fri Jul 30, 2010 3:24 am
by ditch182
Hello all,
I've just started using docx4j and I am highly impressed. My application edits a .docx template, and I would like to convert the edited result to pdf. I can edit the template just fine, and I've even gotten the conversion to work using org.docx4j.convert.out.pdf.viaXSLFO.Conversion. However, my .docx orientation is Landscape and the pdf conversion keeps coming out Portrait. I've found the enum STPageOrientation in the JavaDocs, but I can't figure out where or how to set it for the conversion. I'm essentially using CreatePdf.java from the samples. So, my question is: How do I set the page orientation while converting from .docx to .pdf using viaXSLFO?

Thanks in advance

Re: Convert docx to pdf viaXSLFO - Page orientation

PostPosted: Fri Jul 30, 2010 8:19 am
by jason
If you use the latest code from svn (ie more recent than 2.5.0), landscape orientation in PDF output should just work.

I'll post a new 'nightly' build tomorrow.

Re: Convert docx to pdf viaXSLFO - Page orientation

PostPosted: Fri Jul 30, 2010 8:30 am
by ditch182
Thanks Jason,
I'm checking out the latest rev right now.

Re: Convert docx to pdf viaXSLFO - Page orientation

PostPosted: Sat Jul 31, 2010 11:01 pm
by ditch182
I tried it with the latest nightly build. Works perfectly. Thanks for the help.

Re: Convert docx to pdf viaXSLFO - Page orientation

PostPosted: Sun Aug 01, 2010 10:35 pm
by jason
Great, thanks for the confirmation.