Page 1 of 1

docx to pdf - horizontal line

PostPosted: Mon May 30, 2011 2:04 pm
by cairokl
hi,

my docx file's header consists a small logo at left and a word at right and a separate horizontal line, after converted the file to pdf by using viaXSLFO, the generated pdf presented the logo at left, the word at right and the separately line is missing

please tell me what can I do to generate a correct pdf file

Re: docx to pdf - header presented incorrectly

PostPosted: Mon May 30, 2011 8:13 pm
by tosswang
cairokl wrote:hi,

my docx file's header consists a small logo at left and a word at right and a separate horizontal line, after converted the file to pdf by using viaXSLFO, the generated pdf presented the logo at left, the word at right and the separately line is missing

please tell me what can I do to generate a correct pdf file


i'm facing the same question……

Re: docx to pdf - header presented incorrectly

PostPosted: Tue May 31, 2011 1:21 am
by jason
docx4j would need to translate:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
   <w:pict>
        <v:line id="Line 2" o:spid="_x0000_s4097" style="position:absolute;z-index:251657728;visibility:visible" from="-3.75pt,.4pt" to="484.35pt,.4pt" o:gfxdata="UEsDBBQA...BQAAAAA=&#xA;" strokecolor="navy"/>
      </w:pict>
 
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


to XSL FO. http://xmlgraphics.apache.org/fop/fo.html#fo-lines suggests 3 XSL FO structures which may be suitable:

1 Horizontal lines can be drawn using fo:leader.
2 Use a solid border on a suitable fo:block. This will work for horizontal and vertical lines only.
3 Insert a graphic. GIF, PNG SVG, whatever.


See further http://oreilly.com/catalog/xslfo/chapter/ch06.pdf pp117-119

You should be able to add basic support easily enough using the fo:leader approach, by modifying docx2fo.xslt

Give it a try, and pls contribute a patch if you get it working.

Re: docx to pdf - horizontal line

PostPosted: Tue May 31, 2011 4:14 pm
by cairokl
okay, i will give it a try

Re: docx to pdf - horizontal line

PostPosted: Sat Jan 07, 2012 3:41 am
by sureshbabubv
Hi cairokl ,

Can you please share me the code, the u used for generating the docx and pdf files.

my email id is venkatasureshbabub@gmail.com

Thanks & Regards,
B.V.Suresh Babu.