Varra, Mamatha | 1 Jul 2010 11:41
Favicon

Images not found!!!

Hi All,
 
we are upgrading the FOP 0.25 to 0.95. We did all the necessary changes to the java code to convert XML to PDF. We modified the xls for empty cells and tested few xsl. The xsls which doesn't have images are printing fine. The ones which have the images are not printing properly i mean we are getting blank space in place of image. We checked the url path where the images are placed in our server..looks fine.
 
We replaced the fop driver and configuration settings(fop 0.95) with fopFactory and foUserAgent(fop 0.95).
 
At some place in our code we were using the below statement,
configuration.put("dir", url);
 
now we replaced the above file with
 
fopfactory.setBaseURL(url);
 
i think its causing problem but i am not sure... we are trying to figure out ...
 
the exact error is "org.apache.fop.fo.flow.ExternalGraphic bind Image not found: images/emptybox.jpg".
 
can anyone know about this issue ... pls help me.
 
Thanks,
Mamatha.
Mario Madunic | 1 Jul 2010 16:13

FOP trunk error message when run from ant

While running the trunk via ANT the build fails. The error message is at the bottom.

Pieces I'm using
Java 1.6.0_16
ANT 1.8.1 (just started using it today, was using 1.7 and received same error)
Windows XP SP3

I executed the build by just typing ant in a cmd prompt.

In the config file I added the font metrics for the time being from my 0.94 config file, as it still seems to be
valid. Example below
<font metrics-url="fontsForFOP/arial.xml" kerning="yes" embed-url="file:///c:/Windows/fonts/ARIAL.TTF">
  <font-triplet name="Arial" style="normal" weight="normal"/>
</font>

At the moment still trying to figure out the new method for calling fonts. (want to use Helvetica and
encoding utf-8)

Line 46 mentioned below of the build file (partsToPDF.xml) is
<fop format="application/pdf" fofile="output/tempFilesDelete/SR_TEST_Parts.fo"
outfile="output/SR_TEST_Parts.pdf" messagelevel="info"
userconfig="fopConfig/fopNewFlyer-trunk.xconf" force="true" />
(I receive the same error when using absolute paths, in case that makes a difference)

Any help appreciated.

Thanks

BUILD FAILED
c:\ publishingWorkflow\antTargets\partsToPDF.xml:46: java.lang.NoSuchMethodError: org.apache.xmlgraphics.java2d.GraphicContext.<init>(Lorg/apache/xmlgraphics/java2d/GraphicContext;)V
  at org.apache.fop.render.intermediate.IFGraphicContext.<init>(IFGraphicContext.java:50)
  at org.apache.fop.render.intermediate.IFGraphicContext.clone(IFGraphicContext.java:56)
  at org.apache.fop.render.intermediate.IFRenderer.saveGraphicsState(IFRenderer.java:632)
  at org.apache.fop.render.intermediate.IFRenderer.startViewport(IFRenderer.java:885)
  at org.apache.fop.render.intermediate.IFRenderer.startVParea(IFRenderer.java:878)
  at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:289)
  at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:731)
  at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:249)
  at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:230)
  at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:580)
  at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:114)
  at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:312)
  at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:167)
  at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.makeNewPage(AbstractPageSequenceLayoutManager.java:284)
  at org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:526)
  at org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:429)
  at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:547)
  at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:497)
  at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:308)
  at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:450)
  at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
  at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
  at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
  at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
  at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
  at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
  at net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:391)
  at net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:213)
  at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:447)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
  at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
  at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
  at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
  at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
  at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:397)
  at net.sf.saxon.event.Sender.send(Sender.java:182)
  at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32)
  at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
  at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.renderInputHandler(Fop.java:657)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:680)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.run(Fop.java:539)
  at org.apache.fop.tools.anttasks.Fop.execute(Fop.java:368)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:390)
  at org.apache.tools.ant.Target.performTasks(Target.java:411)
  at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
  at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
  at org.apache.tools.ant.Main.runBuild(Main.java:801)
  at org.apache.tools.ant.Main.startAnt(Main.java:218)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or material transmitted
with this communication) is confidential, may be privileged and is intended only for the use of the
intended recipient. If you are not the intended recipient, any review, retransmission, circulation,
distribution, reproduction, conversion to hard copy, copying or other use of this communication,
information or material is strictly prohibited and may be illegal. If you received this communication in
error or if it is forwarded to you without the express authorization of New Flyer, please notify us
immediately by telephone or by return email and permanently delete the communication, information and
material from any computer, disk drive, diskette or other storage device or media. Thank you.
Eric Douglas | 1 Jul 2010 20:06
Favicon

RE: FOP trunk error message when run from ant

Do you have the xmlgraphics-commons-1.4svn.jar in your trunk lib path?

New method for calling fonts?  Is this on embedding code or just on
running from a command line?
I'm using the FOP classes with embedded code and my custom fonts are
working nicely. 

-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic <at> newflyer.com] 
Sent: Thursday, July 01, 2010 10:13 AM
To: fop-users <at> xmlgraphics.apache.org
Subject: FOP trunk error message when run from ant

While running the trunk via ANT the build fails. The error message is at
the bottom.

Pieces I'm using
Java 1.6.0_16
ANT 1.8.1 (just started using it today, was using 1.7 and received same
error) Windows XP SP3

I executed the build by just typing ant in a cmd prompt.

In the config file I added the font metrics for the time being from my
0.94 config file, as it still seems to be valid. Example below <font
metrics-url="fontsForFOP/arial.xml" kerning="yes"
embed-url="file:///c:/Windows/fonts/ARIAL.TTF">
  <font-triplet name="Arial" style="normal" weight="normal"/> </font>

At the moment still trying to figure out the new method for calling
fonts. (want to use Helvetica and encoding utf-8)

Line 46 mentioned below of the build file (partsToPDF.xml) is <fop
format="application/pdf"
fofile="output/tempFilesDelete/SR_TEST_Parts.fo"
outfile="output/SR_TEST_Parts.pdf" messagelevel="info"
userconfig="fopConfig/fopNewFlyer-trunk.xconf" force="true" /> (I
receive the same error when using absolute paths, in case that makes a
difference)

Any help appreciated.

Thanks

BUILD FAILED
c:\ publishingWorkflow\antTargets\partsToPDF.xml:46:
java.lang.NoSuchMethodError:
org.apache.xmlgraphics.java2d.GraphicContext.<init>(Lorg/apache/xmlgraph
ics/java2d/GraphicContext;)V
  at
org.apache.fop.render.intermediate.IFGraphicContext.<init>(IFGraphicCont
ext.java:50)
  at
org.apache.fop.render.intermediate.IFGraphicContext.clone(IFGraphicConte
xt.java:56)
  at
org.apache.fop.render.intermediate.IFRenderer.saveGraphicsState(IFRender
er.java:632)
  at
org.apache.fop.render.intermediate.IFRenderer.startViewport(IFRenderer.j
ava:885)
  at
org.apache.fop.render.intermediate.IFRenderer.startVParea(IFRenderer.jav
a:878)
  at
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRend
erer.java:289)
  at
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRen
derer.java:731)
  at
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.
java:249)
  at
org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:
230)
  at
org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java
:580)
  at
org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:114)
  at
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(Ab
stractPageSequenceLayoutManager.java:312)
  at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequen
ceLayoutManager.java:167)
  at
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.makeNewPage(A
bstractPageSequenceLayoutManager.java:284)
  at
org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:5
26)
  at
org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:429)
  at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:5
47)
  at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:4
97)
  at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:308)
  at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:4
50)
  at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
  at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSe
quenceLayoutManager.java:107)
  at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java
:238)
  at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:12
0)
  at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.j
ava:349)
  at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
  at
net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.ja
va:391)
  at
net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:213
)
  at
net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHa
ndler.java:447)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
  at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
  at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
  at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
  at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
  at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:397)
  at net.sf.saxon.event.Sender.send(Sender.java:182)
  at
net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32)
  at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
  at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
  at
org.apache.fop.tools.anttasks.FOPTaskStarter.renderInputHandler(Fop.java
:657)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:680)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.run(Fop.java:539)
  at org.apache.fop.tools.anttasks.Fop.execute(Fop.java:368)
  at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:1
06)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:390)
  at org.apache.tools.ant.Target.performTasks(Target.java:411)
  at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
  at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
  at org.apache.tools.ant.Main.runBuild(Main.java:801)
  at org.apache.tools.ant.Main.startAnt(Main.java:218)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all
information or material transmitted with this communication) is
confidential, may be privileged and is intended only for the use of the
intended recipient. If you are not the intended recipient, any review,
retransmission, circulation, distribution, reproduction, conversion to
hard copy, copying or other use of this communication, information or
material is strictly prohibited and may be illegal. If you received this
communication in error or if it is forwarded to you without the express
authorization of New Flyer, please notify us immediately by telephone or
by return email and permanently delete the communication, information
and material from any computer, disk drive, diskette or other storage
device or media. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org
Mario Madunic | 1 Jul 2010 20:26

RE: FOP trunk error message when run from ant

Thanks Eric,

I removed the following jar from my ant181/lib xmlgraphics-commons-1.3.1 and copied over the 1.4
version. The graphic error msg is gone but now have an id reference error. Will work on this one before
posting if I make no head way. I'll start a new message on how to get Helvetica recognized. I was unable to
create an XML metric file for it with the method for 0.94.

Once again thanks Eric for your quick and knowledgeable reply.

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: Eric Douglas [mailto:edouglas <at> blockhouse.com] 
Sent: Thursday, July 01, 2010 1:07 PM
To: fop-users <at> xmlgraphics.apache.org
Subject: RE: FOP trunk error message when run from ant

Do you have the xmlgraphics-commons-1.4svn.jar in your trunk lib path?

New method for calling fonts?  Is this on embedding code or just on
running from a command line?
I'm using the FOP classes with embedded code and my custom fonts are
working nicely. 

-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic <at> newflyer.com] 
Sent: Thursday, July 01, 2010 10:13 AM
To: fop-users <at> xmlgraphics.apache.org
Subject: FOP trunk error message when run from ant

While running the trunk via ANT the build fails. The error message is at
the bottom.

Pieces I'm using
Java 1.6.0_16
ANT 1.8.1 (just started using it today, was using 1.7 and received same
error) Windows XP SP3

I executed the build by just typing ant in a cmd prompt.

In the config file I added the font metrics for the time being from my
0.94 config file, as it still seems to be valid. Example below <font
metrics-url="fontsForFOP/arial.xml" kerning="yes"
embed-url="file:///c:/Windows/fonts/ARIAL.TTF">
  <font-triplet name="Arial" style="normal" weight="normal"/> </font>

At the moment still trying to figure out the new method for calling
fonts. (want to use Helvetica and encoding utf-8)

Line 46 mentioned below of the build file (partsToPDF.xml) is <fop
format="application/pdf"
fofile="output/tempFilesDelete/SR_TEST_Parts.fo"
outfile="output/SR_TEST_Parts.pdf" messagelevel="info"
userconfig="fopConfig/fopNewFlyer-trunk.xconf" force="true" /> (I
receive the same error when using absolute paths, in case that makes a
difference)

Any help appreciated.

Thanks

BUILD FAILED
c:\ publishingWorkflow\antTargets\partsToPDF.xml:46:
java.lang.NoSuchMethodError:
org.apache.xmlgraphics.java2d.GraphicContext.<init>(Lorg/apache/xmlgraph
ics/java2d/GraphicContext;)V
  at
org.apache.fop.render.intermediate.IFGraphicContext.<init>(IFGraphicCont
ext.java:50)
  at
org.apache.fop.render.intermediate.IFGraphicContext.clone(IFGraphicConte
xt.java:56)
  at
org.apache.fop.render.intermediate.IFRenderer.saveGraphicsState(IFRender
er.java:632)
  at
org.apache.fop.render.intermediate.IFRenderer.startViewport(IFRenderer.j
ava:885)
  at
org.apache.fop.render.intermediate.IFRenderer.startVParea(IFRenderer.jav
a:878)
  at
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRend
erer.java:289)
  at
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRen
derer.java:731)
  at
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.
java:249)
  at
org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:
230)
  at
org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java
:580)
  at
org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:114)
  at
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(Ab
stractPageSequenceLayoutManager.java:312)
  at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequen
ceLayoutManager.java:167)
  at
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.makeNewPage(A
bstractPageSequenceLayoutManager.java:284)
  at
org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:5
26)
  at
org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:429)
  at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:5
47)
  at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:4
97)
  at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:308)
  at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:4
50)
  at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
  at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSe
quenceLayoutManager.java:107)
  at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java
:238)
  at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:12
0)
  at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.j
ava:349)
  at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
  at
net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.ja
va:391)
  at
net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:213
)
  at
net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHa
ndler.java:447)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
  at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
  at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
  at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
  at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
  at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:397)
  at net.sf.saxon.event.Sender.send(Sender.java:182)
  at
net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32)
  at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
  at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
  at
org.apache.fop.tools.anttasks.FOPTaskStarter.renderInputHandler(Fop.java
:657)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:680)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.run(Fop.java:539)
  at org.apache.fop.tools.anttasks.Fop.execute(Fop.java:368)
  at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:1
06)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:390)
  at org.apache.tools.ant.Target.performTasks(Target.java:411)
  at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
  at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
  at org.apache.tools.ant.Main.runBuild(Main.java:801)
  at org.apache.tools.ant.Main.startAnt(Main.java:218)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all
information or material transmitted with this communication) is
confidential, may be privileged and is intended only for the use of the
intended recipient. If you are not the intended recipient, any review,
retransmission, circulation, distribution, reproduction, conversion to
hard copy, copying or other use of this communication, information or
material is strictly prohibited and may be illegal. If you received this
communication in error or if it is forwarded to you without the express
authorization of New Flyer, please notify us immediately by telephone or
by return email and permanently delete the communication, information
and material from any computer, disk drive, diskette or other storage
device or media. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org

--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or material transmitted
with this communication) is confidential, may be privileged and is intended only for the use of the
intended recipient. If you are not the intended recipient, any review, retransmission, circulation,
distribution, reproduction, conversion to hard copy, copying or other use of this communication,
information or material is strictly prohibited and may be illegal. If you received this communication in
error or if it is forwarded to you without the express authorization of New Flyer, please notify us
immediately by telephone or by return email and permanently delete the communication, information and
material from any computer, disk drive, diskette or other storage device or media. Thank you.
Eric Douglas | 1 Jul 2010 20:41
Favicon

RE: FOP trunk error message when run from ant

I'm not sure what you mean by id reference error.  If you're talking
about another build error, they're obvious to fix if you have the
details with a class reference like your previous error.

I don't remember how to create a metrics file but there's instructions
on the site (http://xmlgraphics.apache.org/fop/0.95/fonts.html).  I did
have to create one for each ttf file I'm using for custom embedded
fonts.  I used the 0.95 to create.  I don't know if that changed any
from 0.94.  I'm using some TrueType fonts which should be found in the
Windows fonts folder (ie lucon.ttf).  I'm using embedded code to create
FOP objects and specify all the needed classes and methods to set it up,
so I don't know much about running from a command line.

-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic <at> newflyer.com] 
Sent: Thursday, July 01, 2010 2:26 PM
To: fop-users <at> xmlgraphics.apache.org
Subject: RE: FOP trunk error message when run from ant

Thanks Eric,

I removed the following jar from my ant181/lib xmlgraphics-commons-1.3.1
and copied over the 1.4 version. The graphic error msg is gone but now
have an id reference error. Will work on this one before posting if I
make no head way. I'll start a new message on how to get Helvetica
recognized. I was unable to create an XML metric file for it with the
method for 0.94.

Once again thanks Eric for your quick and knowledgeable reply.

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries
Jayant Ghagre | 1 Jul 2010 20:39
Favicon

RE: FOP trunk error message when run from ant

Mario,

Here's how I am using custom fonts.

In my application folder I have created a folder "MyAppFonts" and copied
all custom fonts in that folder. You can either refer to operating systems
folder such as c:\windows\fonts.

Copy fop.xconf file to your application folder and then rename to
YourAppNameConfig.xml

Open the YourAppNameConfig.xml in any editor and add you MyAppFonts folder
as shown below

      <fonts>
        <!-- embedded fonts -->
                    <!-- register all the fonts found in a directory -->
                    <directory>.\MyAppFonts</directory>

                    <!-- register all the fonts found in a directory
                         and all of its sub directories (use with care)
        -->
                    <directory recursive="true">.\MyAppFonts</directory>

                    <!-- automatically detect operating system installed
fonts
                    <auto-detect/>
        -->
      </fonts>

Sample java code

            // configure fopFactory as desired
            FopFactory fopFactory = FopFactory.newInstance();

            fopFactory.setUserConfig(new File( YourAppNameConfig.xml ));

            FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

I am using custom font in this manner.

I hope this information helps.

Regards,
Jayant

|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"Mario Madunic" <Mario_Madunic <at> newflyer.com>                                                                                                      |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |<fop-users <at> xmlgraphics.apache.org>                                                                                                                |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |07/01/2010 02:19 PM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |RE: FOP trunk error message when run from ant                                                                                                     |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|

Thanks Eric,

I removed the following jar from my ant181/lib xmlgraphics-commons-1.3.1
and copied over the 1.4 version. The graphic error msg is gone but now have
an id reference error. Will work on this one before posting if I make no
head way. I'll start a new message on how to get Helvetica recognized. I
was unable to create an XML metric file for it with the method for 0.94.

Once again thanks Eric for your quick and knowledgeable reply.

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: Eric Douglas [mailto:edouglas <at> blockhouse.com]
Sent: Thursday, July 01, 2010 1:07 PM
To: fop-users <at> xmlgraphics.apache.org
Subject: RE: FOP trunk error message when run from ant

Do you have the xmlgraphics-commons-1.4svn.jar in your trunk lib path?

New method for calling fonts?  Is this on embedding code or just on
running from a command line?
I'm using the FOP classes with embedded code and my custom fonts are
working nicely.

-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic <at> newflyer.com]
Sent: Thursday, July 01, 2010 10:13 AM
To: fop-users <at> xmlgraphics.apache.org
Subject: FOP trunk error message when run from ant

While running the trunk via ANT the build fails. The error message is at
the bottom.

Pieces I'm using
Java 1.6.0_16
ANT 1.8.1 (just started using it today, was using 1.7 and received same
error) Windows XP SP3

I executed the build by just typing ant in a cmd prompt.

In the config file I added the font metrics for the time being from my
0.94 config file, as it still seems to be valid. Example below <font
metrics-url="fontsForFOP/arial.xml" kerning="yes"
embed-url="file:///c:/Windows/fonts/ARIAL.TTF">
  <font-triplet name="Arial" style="normal" weight="normal"/> </font>

At the moment still trying to figure out the new method for calling
fonts. (want to use Helvetica and encoding utf-8)

Line 46 mentioned below of the build file (partsToPDF.xml) is <fop
format="application/pdf"
fofile="output/tempFilesDelete/SR_TEST_Parts.fo"
outfile="output/SR_TEST_Parts.pdf" messagelevel="info"
userconfig="fopConfig/fopNewFlyer-trunk.xconf" force="true" /> (I
receive the same error when using absolute paths, in case that makes a
difference)

Any help appreciated.

Thanks

BUILD FAILED
c:\ publishingWorkflow\antTargets\partsToPDF.xml:46:
java.lang.NoSuchMethodError:
org.apache.xmlgraphics.java2d.GraphicContext.<init>(Lorg/apache/xmlgraph
ics/java2d/GraphicContext;)V
  at
org.apache.fop.render.intermediate.IFGraphicContext.<init>(IFGraphicCont
ext.java:50)
  at
org.apache.fop.render.intermediate.IFGraphicContext.clone(IFGraphicConte
xt.java:56)
  at
org.apache.fop.render.intermediate.IFRenderer.saveGraphicsState(IFRender
er.java:632)
  at
org.apache.fop.render.intermediate.IFRenderer.startViewport(IFRenderer.j
ava:885)
  at
org.apache.fop.render.intermediate.IFRenderer.startVParea(IFRenderer.jav
a:878)
  at
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRend
erer.java:289)
  at
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRen
derer.java:731)
  at
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.
java:249)
  at
org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:
230)
  at
org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java
:580)
  at
org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:114)
  at
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(Ab
stractPageSequenceLayoutManager.java:312)
  at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequen
ceLayoutManager.java:167)
  at
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.makeNewPage(A
bstractPageSequenceLayoutManager.java:284)
  at
org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:5
26)
  at
org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:429)
  at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:5
47)
  at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:4
97)
  at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:308)
  at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:4
50)
  at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
  at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSe
quenceLayoutManager.java:107)
  at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java
:238)
  at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:12
0)
  at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.j
ava:349)
  at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
  at
net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.ja
va:391)
  at
net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:213
)
  at
net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHa
ndler.java:447)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
  at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
  at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
  at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
  at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
  at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
  at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:397)
  at net.sf.saxon.event.Sender.send(Sender.java:182)
  at
net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32)
  at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
  at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
  at
org.apache.fop.tools.anttasks.FOPTaskStarter.renderInputHandler(Fop.java
:657)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:680)
  at org.apache.fop.tools.anttasks.FOPTaskStarter.run(Fop.java:539)
  at org.apache.fop.tools.anttasks.Fop.execute(Fop.java:368)
  at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:1
06)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:390)
  at org.apache.tools.ant.Target.performTasks(Target.java:411)
  at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
  at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
  at org.apache.tools.ant.Main.runBuild(Main.java:801)
  at org.apache.tools.ant.Main.startAnt(Main.java:218)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all
information or material transmitted with this communication) is
confidential, may be privileged and is intended only for the use of the
intended recipient. If you are not the intended recipient, any review,
retransmission, circulation, distribution, reproduction, conversion to
hard copy, copying or other use of this communication, information or
material is strictly prohibited and may be illegal. If you received this
communication in error or if it is forwarded to you without the express
authorization of New Flyer, please notify us immediately by telephone or
by return email and permanently delete the communication, information
and material from any computer, disk drive, diskette or other storage
device or media. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org

--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information
or material transmitted with this communication) is confidential, may be
privileged and is intended only for the use of the intended recipient. If
you are not the intended recipient, any review, retransmission,
circulation, distribution, reproduction, conversion to hard copy, copying
or other use of this communication, information or material is strictly
prohibited and may be illegal. If you received this communication in error
or if it is forwarded to you without the express authorization of New
Flyer, please notify us immediately by telephone or by return email and
permanently delete the communication, information and material from any
computer, disk drive, diskette or other storage device or media. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org
Eric Douglas | 1 Jul 2010 22:18
Favicon

RE: FOP trunk error message when run from ant

That doesn't seem right at all.  You explain how to get the fonts into
the xconf reference path then show an embedded example.  If you're using
the classes and embedding the code you don't need that.

I pull in fonts like this:
1) Create a TTFFontLoader using the font file name with URI path and a
DefaultFontResolver
2) If it's one font per file just use getFont() to create a CustomFont,
if you need to query any font details from the file
3) Build a new FontTriplet and add it into a Java ArrayList
4) Create a new EmbedFontInfo object using the FOP generated metrics
file (URI), the KerningEnabled value (can be queried from CustomFont),
the font triplet array, the font file (URI), and the sub font name (may
be null)
5) Create another Java ArrayList and add in the EmbedFontInfo
6) Generate a Renderer and pass the font ArrayList to setFontList()
7) Put the Renderer into the UserAgent (setRendererOverride)
Then you shouldn't even need the xconf file.

I suggest never referring to fonts as files which should be installed on
the client OS.  We had a program years ago running on Windows 98
referencing a Courier font that didn't come out right because somehow
the same font file had a different looking font in it on different
clients.  I avoid that problem now pulling the font from the server.

-----Original Message-----
From: Jayant Ghagre [mailto:Jayant.Ghagre <at> ambest.com] 
Sent: Thursday, July 01, 2010 2:40 PM
To: fop-users <at> xmlgraphics.apache.org
Subject: RE: FOP trunk error message when run from ant

Mario,

Here's how I am using custom fonts.

In my application folder I have created a folder "MyAppFonts" and copied
all custom fonts in that folder. You can either refer to operating
systems folder such as c:\windows\fonts.

Copy fop.xconf file to your application folder and then rename to
YourAppNameConfig.xml

Open the YourAppNameConfig.xml in any editor and add you MyAppFonts
folder as shown below

      <fonts>
        <!-- embedded fonts -->
                    <!-- register all the fonts found in a directory -->
                    <directory>.\MyAppFonts</directory>

                    <!-- register all the fonts found in a directory
                         and all of its sub directories (use with care)
        -->
                    <directory recursive="true">.\MyAppFonts</directory>

                    <!-- automatically detect operating system installed
fonts
                    <auto-detect/>
        -->
      </fonts>

Sample java code

            // configure fopFactory as desired
            FopFactory fopFactory = FopFactory.newInstance();

            fopFactory.setUserConfig(new File( YourAppNameConfig.xml ));

            FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

I am using custom font in this manner.

I hope this information helps.

Regards,
Jayant
Julian Reschke | 2 Jul 2010 11:59
Picon
Picon

line height defaulting (0.20 vs 0.95)

Hi,

I'm helping a customer upgrading from 0.20.4 to 0.95, and we discovered 
a difference in line-height defaulting.

It appears that even when line-height is set explicitly, FOP 0.95 makes 
the inter line space *slightly* bigger. I'll assume that 0.95's behavior 
is the correct one, but I wonder

- what exactly is going on, and

- whether there's another property that could be set to get identical 
results (which would be good during a transition period).

Best regards, Julian
Attachment (test095.pdf): application/pdf, 5984 bytes
Attachment (test0205.pdf): application/pdf, 1987 bytes
Attachment (test.fo): text/xml, 3633 bytes

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org
Pascal Sancho | 2 Jul 2010 13:20
Picon
Favicon

Re: line height defaulting (0.20 vs 0.95)

Hi Julian,

You are right, Fop 0.95 does a more precise job, while Fop 0.2x was
buggy in computing block-progression-dimensions.
You can easily check that by measuring 10 text lines on a Pdf print
(with a 1:1 print ratio and using an easy-to-use font-size/line-height
couple).

Pascal

Le 02/07/2010 11:59, Julian Reschke a écrit :
> Hi,
>
> I'm helping a customer upgrading from 0.20.4 to 0.95, and we discovered 
> a difference in line-height defaulting.
>
> It appears that even when line-height is set explicitly, FOP 0.95 makes 
> the inter line space *slightly* bigger. I'll assume that 0.95's behavior 
> is the correct one, but I wonder
>
> - what exactly is going on, and
>
> - whether there's another property that could be set to get identical 
> results (which would be good during a transition period).
>
> Best regards, Julian
>   
Jayant Ghagre | 2 Jul 2010 14:21
Favicon

RE: FOP trunk error message when run from ant

Eric,

In our case, we get data from database as XML, apply the reports specific
xsl-fo template (.xsl file) and generate a PDF report. That's our
requirement and the solution I mentioned works very well for us.

All we need is create FOP Factory instance, specify the configuration file
location, specify transformer (XSLT), provide source XML file and we have
what we need a PDF report.

Also we keep our application related fonts in a separate folder than
windows folder.

Regards,
Jayant

|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"Eric Douglas" <edouglas <at> blockhouse.com>                                                                                                          |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |<fop-users <at> xmlgraphics.apache.org>                                                                                                                |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |07/01/2010 04:12 PM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |RE: FOP trunk error message when run from ant                                                                                                     |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|

That doesn't seem right at all.  You explain how to get the fonts into
the xconf reference path then show an embedded example.  If you're using
the classes and embedding the code you don't need that.

I pull in fonts like this:
1) Create a TTFFontLoader using the font file name with URI path and a
DefaultFontResolver
2) If it's one font per file just use getFont() to create a CustomFont,
if you need to query any font details from the file
3) Build a new FontTriplet and add it into a Java ArrayList
4) Create a new EmbedFontInfo object using the FOP generated metrics
file (URI), the KerningEnabled value (can be queried from CustomFont),
the font triplet array, the font file (URI), and the sub font name (may
be null)
5) Create another Java ArrayList and add in the EmbedFontInfo
6) Generate a Renderer and pass the font ArrayList to setFontList()
7) Put the Renderer into the UserAgent (setRendererOverride)
Then you shouldn't even need the xconf file.

I suggest never referring to fonts as files which should be installed on
the client OS.  We had a program years ago running on Windows 98
referencing a Courier font that didn't come out right because somehow
the same font file had a different looking font in it on different
clients.  I avoid that problem now pulling the font from the server.

-----Original Message-----
From: Jayant Ghagre [mailto:Jayant.Ghagre <at> ambest.com]
Sent: Thursday, July 01, 2010 2:40 PM
To: fop-users <at> xmlgraphics.apache.org
Subject: RE: FOP trunk error message when run from ant

Mario,

Here's how I am using custom fonts.

In my application folder I have created a folder "MyAppFonts" and copied
all custom fonts in that folder. You can either refer to operating
systems folder such as c:\windows\fonts.

Copy fop.xconf file to your application folder and then rename to
YourAppNameConfig.xml

Open the YourAppNameConfig.xml in any editor and add you MyAppFonts
folder as shown below

      <fonts>
        <!-- embedded fonts -->
                    <!-- register all the fonts found in a directory -->
                    <directory>.\MyAppFonts</directory>

                    <!-- register all the fonts found in a directory
and all of its sub directories (use with care)
        -->
                    <directory recursive="true">.\MyAppFonts</directory>

                    <!-- automatically detect operating system installed
fonts
                    <auto-detect/>
        -->
      </fonts>

Sample java code

            // configure fopFactory as desired
            FopFactory fopFactory = FopFactory.newInstance();

            fopFactory.setUserConfig(new File( YourAppNameConfig.xml ));

            FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

I am using custom font in this manner.

I hope this information helps.

Regards,
Jayant

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help <at> xmlgraphics.apache.org

Gmane