어쩌다가 휴식 중

Apache FOP example : Generate a PDF

정보기술

 

name2fo.xsl

<?xml version="1.0" encoding="utf-8"?>

<name>Frank</name>

 

name.xml

<?xml version="1.0" encoding="utf-8"?>

           <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

           <xsl:output method="xml" indent="yes"/>

           <xsl:template match="/">

                     <fo:root>

                                <fo:layout-master-set>

                                          <fo:simple-page-master master-name="A4-portrait" page-height="29.7cm" page-width="21.0cm" margin="2cm">

                                                     <fo:region-body/>

                                          </fo:simple-page-master>

                                </fo:layout-master-set>

                                <fo:page-sequence master-reference="A4-portrait">

                                          <fo:flow flow-name="xsl-region-body">

                                                     <fo:block>

                                                     Hello, <xsl:value-of select="name"/>!

                                                     </fo:block>

                                          </fo:flow>

                                </fo:page-sequence>

                     </fo:root>

           </xsl:template>

</xsl:stylesheet>

 

generate.cmd

@REM  Apache FOP (ver 1.0/1.1)

c:\FOP\fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf

 

 

'정보기술' 카테고리의 다른 글

VIM 7.4(WIN32) VIM(WIN64) gvim  (0) 2014.02.15
프로그래머(Programmer)와 사용자(User)가 바라보는 상대방  (0) 2013.12.13
Apache FOP example : Generate a PDF  (0) 2013.10.29
NoFlo : Flow-Based Programming  (0) 2013.08.14
tor browser download  (0) 2012.11.06
NetMon, NEWT  (0) 2012.10.04