Site Search :
Standard Enterprise XML Methodology Pattern Setting Tunning Other
Article Contributors
GuestBook
Javapattern Maven
XSourceGen Dev
JetSpeed Test
JLook Image
jLook Family Site


FOP¸¦ ÀÌ¿ëÇÑ PDF»ý¼º½Ã Çѱۺ¯È¯¹æ¹ý
 
FOP³ª CocoonÀ» »ç¿ëÇÒ¶§ °¡Àå Å« ¹®Á¦Á¡ÀÌ ¹Ù·Î Çѱۿ¡ ´ëÇÑ º¯È¯ÀÌ´Ù. ¿©±â¼­´Â FOP¿¡¼­ PDF·Î º¯È¯µÉ µ¥ÀÌÅÍÀÇ ÇѱÛÀ» ¾î¶»°Ô ó¸®ÇÒ ¼ö ÀÖ´ÂÁö ¿¹Á¦¸¦ ÅëÇÏ¿© »ìÆ캸µµ·Ï ÇÏÀÚ. ( 2003/03/08 ) 142
Written by ienvyou - ÃÖÁö¿õ
1 of 1
 

¢º FOP ÇÑ±Û º¯È¯ »ç¿ë¹æ¹ý

  FOP¸¦ »ç¿ëÇϸé FO ÆÄÀϷκÎÅÍ PDF ÆÄÀÏÀ» ¾òÀ» ¼ö ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¾ÆÆÄÄ¡ XML ÇÁ·ÎÁ§Æ® 
  ȨÆäÀÌÁö¸¦ Âü°íÇϵµ·Ï ÇÑ´Ù. 
  ¿ì¼± FOPÀÇ ÃֽŠ¹öÀüÀ» ¹Þ¾ÆÈ¥´Ù(0.18.1 ÀÌ»ó). FOPµµ ÀÚ¹Ù ÇÁ·Î±×·¥ÀÌÁö¸¸ ½ÇÇàÇϱâ 
  Æí¸®Çϵµ·Ï ¸¸µé¾îÁø batch ÆÄÀÏ°ú ½© ½ºÅ©¸³Æ® ÆÄÀÏÀ» ÇÔ²² ¸¸µéµµ·Ï ÇÏÀÚ.
  ÇÑ±Û PDF¸¦ ¾ò±â À§Çؼ­´Â ÇÑ±Û Æ®·çŸÀÔ ÆùÆ®(.ttf)°¡ ÇÊ¿äÇϸç, WIN2000°°Àº °æ¿ì
  WINNTµð·ºÅ丮 ¹Ø¿¡ Fontsµð·ºÅ丮¿¡ ÆùÆ®µéÀÌ ÁغñµÇ¾î ÀÖ´Â °ÍÀ» º¼ ¼ö ÀÖ´Ù.
  ÆùÆ®°¡ ÁغñµÇ¾úÀ¸¸é ´ÙÀ½°ú °°ÀÌ ÆùÆ®·Î ºÎÅÍ metrics ÆÄÀÏÀ» ¾ò¾î³¾ ¼ö Àִµ¥
  ¾Æ·¡¿Í °°Àº ÀýÂ÷¸¦ ¹âµµ·Ï ÇÏÀÚ.

¾Æ·¡ÀÇ ³»¿ëÀ» fontGen.bat¶õ ÆÄÀÏÀ̸§À¸·Î ÀúÀåÇÑ´Ù

@echo off
set FOP_HOME=D:\XML\fop-0.20.4rc
java -cp %FOP_HOME%\build\fop.jar;%FOP_HOME%\lib\batik.jar;%FOP_HOME%\lib\xalan-2.3.1.jar;
%FOP_HOME%\lib\xercesImpl-2.0.1.jar;%FOP_HOME%\lib\xml-apis.jar;
%FOP_HOME%\lib\avalon-framework-cvs-20020315.jar;%FOP_HOME%\lib\logkit-1.0.jar;
%FOP_HOME%\lib\jimi-1.0.jar org.apache.fop.fonts.apps.TTFReader  %1 %2 %3 %4 %5 %6 %7 %8

 FOPȨÀ» ´ç½ÅÀÇ FOP°¡ ¼³Ä¡µÈ µð·ºÅ丮·Î ¹Ù²Ùµµ·Ï ÇÏ¿©¾ß ÇÔÀº ¹°·ÐÀÌ´Ù

¾Æ·¡¿Í °°ÀÌ ½ÇÇàÀ» Çϵµ·Ï ÇÑ´Ù.

Fop> fopGen NGULIM.TTF ngulim.xml

  ÇÑ±Û Æ®·çŸÀÔ ÆùÆ®·ÎºÎÅÍ ¸¸µé¾îÁø metrics ÆÄÀÏ¿¡´Â ÆùÆ®ÀÇ À̸§ ºÎºÐ¿¡ �°ú
  °°Àº ¹®ÀÚµéÀÌ Æ÷ÇԵǾîÁú ¼ö Àִµ¥ À̺κÐÀ»  Á÷Á¢ ÆíÁý±â·Î ¿­¾î¼­ ÇØ´çºÎºÐÀÇ ³»¿ëÀ» 
  Áö¿öÁÖ¾î¾ß ÇÑ´Ù.

  ÀÌÁ¦ FOP/conf/userconfig.xml ÆÄÀÏÀ» ÆíÁýÇÑ´Ù. ´ÙÀ½°ú °°ÀÌ ÆùÆ®¿Í ÇØ´ç metrics ÆÄÀÏÀÇ °æ·Î, 
  ÆùÆ® À̸§À» Á¤È®È÷ Àû¾îÁÖ¾î¾ß ÇÑ´Ù.

<fonts>
 <font metrics-file="ngulim.xml" kerning="yes"
                                        embed-file="c:\WINNT\Fonts\NGULIM.TTF">
    <font-triplet name="NewGulim" style="normal" weight="normal"/>
    <font-triplet name="Times Roman" style="italic" weight="normal"/>
    <font-triplet name="Times Roman" style="normal" weight="bold"/>
    <font-triplet name="Helvetica" style="normal" weight="normal"/>
    <font-triplet name="Helvetica" style="italic" weight="normal"/>
    <font-triplet name="Helvetica" style="normal" weight="bold"/>
    <font-triplet name="Courier" style="normal" weight="normal"/>
    <font-triplet name="Courier" style="italic" weight="normal"/>
    <font-triplet name="Courier" style="normal" weight="bold"/>
    <font-triplet name="monospace" style="normal" weight="normal"/>
    <font-triplet name="monospace" style="italic" weight="normal"/>
    <font-triplet name="monospace" style="normal" weight="bold"/>
  </font>
</fonts> 

  ÀÌ·¸°Ô ÇÏ¸é ¸ðµç °æ¿ì¿¡ ÇÑ°¡Áö ÆùÆ®¸¸ »ç¿ëÇÏ°Ô µÇ¸ç, Times RomanÀ̳ª Helvetica ȤÀº italicÀ̳ª 
  bold¿¡ °¢°¢ ´Ù¸¥ ÆùÆ®¸¦ ´ëÀÀ½ÃÅ°¸é ¿©·¯ ÆùÆ®¸¦ ¾µ ¼ö ÀÖ°Ô µÈ´Ù.

¾Æ·¡ÀÇ ¿¹°¡ ±× °æ¿ìÀÌ´Ù.

<fonts>
  <font metrics-file="\fop\A.xml" kerning="yes"
                                        embed-file="\fop\A.ttf">
    <font-triplet name="Times Roman" style="normal" weight="normal"/>
    <font-triplet name="Times Roman" style="italic" weight="normal"/>
    <font-triplet name="Times Roman" style="normal" weight="bold"/>
  </font>
  <font metrics-file="\fop\B.xml" kerning="yes"
                                        embed-file="\fop\B.ttf">
    <font-triplet name="Helvetica" style="normal" weight="normal"/>
    <font-triplet name="Helvetica" style="italic" weight="normal"/>
    <font-triplet name="Helvetica" style="normal" weight="bold"/>
  </font>
  <font metrics-file="\fop\C.xml" kerning="yes"
                                        embed-file="\fop\C.ttf">
    <font-triplet name="Courier" style="normal" weight="normal"/>
    <font-triplet name="Courier" style="italic" weight="normal"/>
    <font-triplet name="Courier" style="normal" weight="bold"/>
    <font-triplet name="monospace" style="normal" weight="normal"/>
    <font-triplet name="monospace" style="italic" weight="normal"/>
    <font-triplet name="monospace" style="normal" weight="bold"/>
  </font>
</fonts> 

ÀÌÁ¦ FOP·Î FOÆÄÀÏÀ» PDF·Î º¯È¯Çغ¸ÀÚ. -c ¿É¼ÇÀ¸·Î userconfig.xml ÆÄÀÏÀ» Àû¿ë½ÃÄÑ¾ß ÇÑ´Ù.

> FOP -c /fop/conf/userconfig.xml -fo test.fo -pdf test.pdf

FOP¿¡´Â xerces¿Í xalanµµ Æ÷ÇԵǾî À־ ´ÙÀ½°ú °°ÀÌ Çϸé Çѹø¿¡ XML ÆÄÀϷκÎÅÍ 
PDF ÆÄÀÏÀ» ¾òÀ» ¼ö ÀÖÀ» °ÍÀÌ´Ù.

> FOP -c /fop/conf/userconfig.xml -xml resume.xml -xsl resume.xsl -pdf resume.pdf

Written by carouser : 2002-10-08
 
1
References
 
http://xml.apache.org
Copyright ¨Ï 2003 www.javapattern.info & www.jlook.com, an jLOOK co.,LTD