You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Afshartous, Nick" <ni...@proactcorp.com> on 2003/04/01 21:36:52 UTC
RE: page number alignment in TOC
> Afshartous, Nick wrote:
> > I know that the issue of right-justifying
> > page numbers in a TOC is a documented
> > limitation
> >
> > http://xml.apache.org/fop/faq.html#page_number_align
> >
> > but I was wondering if anyone has managed to work
> > around this. In other words has anyone found
> > a technique for making the page numbers
> > look right-justified in a TOC ? Thanks
> > for any info.
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
> This is fixed in CVS.
I built a JAR using xml-fop_20030401173520.tar.gz
but then got the exception below. The only change
was to add the call to Driver.initialize)).
This error did not occur with fop-0.20.4.jar.
Please advise, thanks.
Nick
java.lang.NullPointerException
at org.apache.fop.pdf.PDFDocument.outputHeader(PDFDocument.java:849)
at
org.apache.fop.render.pdf.PDFRenderer.startRenderer(PDFRenderer.java:297)
at
org.apache.fop.apps.LayoutHandler.startDocument(LayoutHandler.java:182)
at
org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:182)
at
org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:459)
at org.apache.fop.apps.Driver.render(Driver.java:617)
at org.apache.fop.apps.Driver.run(Driver.java:664)
at com.proactcorp.docgen.DocGen.fo2pdf(DocGen.java:98)
at com.proactcorp.docgen.DocGen.main(DocGen.java:74)
Exception in thread "main"
private static ByteArrayOutputStream fo2pdf(Document foDocument) {
DocumentInputSource fopInputSource = new DocumentInputSource(
foDocument);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Driver driver = new Driver(fopInputSource, out);
driver.initialize();
driver.setRenderer(Driver.RENDER_PDF);
try {
driver.run();
}
catch (java.io.IOException e) {
System.out.println("DocGen: IOException");
}
catch (org.apache.fop.apps.FOPException e) {
System.out.println("DocGen: FOPException");
}
return out;
}
Re: fix for page number alignment in TOC
Posted by Jeremias Maerki <de...@greenmail.ch>.
Hmm, yes. See the download page I mentioned: http://xml.apache.org/fop/download.html
The tag is: fop-0_20_2-maintain
On 01.04.2003 23:29:15 Afshartous, Nick wrote:
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
>
> > You're out of luck. The snapshots represent the development
> > code for the
> > upcoming FOP 1.0. You need to download the code from CVS.
>
> Thanks, I downloaded the latest code from CVS and got the same
> error. Should I be referencing a tag/version ?
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: page number alignment in TOC
Posted by Jeremias Maerki <de...@greenmail.ch>.
You're out of luck. The snapshots represent the development code for the
upcoming FOP 1.0. You need to download the code from CVS. I've just
updated the information on the download page, but it'll take a while
until the changes will be online.
On 01.04.2003 21:36:52 Afshartous, Nick wrote:
>
> > Afshartous, Nick wrote:
> > > I know that the issue of right-justifying
> > > page numbers in a TOC is a documented
> > > limitation
> > >
> > > http://xml.apache.org/fop/faq.html#page_number_align
> > >
> > > but I was wondering if anyone has managed to work
> > > around this. In other words has anyone found
> > > a technique for making the page numbers
> > > look right-justified in a TOC ? Thanks
> > > for any info.
>
> > From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
> > This is fixed in CVS.
>
> I built a JAR using xml-fop_20030401173520.tar.gz
> but then got the exception below. The only change
> was to add the call to Driver.initialize)).
>
> This error did not occur with fop-0.20.4.jar.
>
> Please advise, thanks.
>
> Nick
>
> java.lang.NullPointerException
> at org.apache.fop.pdf.PDFDocument.outputHeader(PDFDocument.java:849)
> at
> org.apache.fop.render.pdf.PDFRenderer.startRenderer(PDFRenderer.java:297)
> at
> org.apache.fop.apps.LayoutHandler.startDocument(LayoutHandler.java:182)
> at
> org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:182)
> at
> org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:459)
> at org.apache.fop.apps.Driver.render(Driver.java:617)
> at org.apache.fop.apps.Driver.run(Driver.java:664)
> at com.proactcorp.docgen.DocGen.fo2pdf(DocGen.java:98)
> at com.proactcorp.docgen.DocGen.main(DocGen.java:74)
> Exception in thread "main"
>
>
> private static ByteArrayOutputStream fo2pdf(Document foDocument) {
>
> DocumentInputSource fopInputSource = new DocumentInputSource(
> foDocument);
> ByteArrayOutputStream out = new ByteArrayOutputStream();
> Driver driver = new Driver(fopInputSource, out);
> driver.initialize();
> driver.setRenderer(Driver.RENDER_PDF);
>
> try {
>
> driver.run();
>
> }
> catch (java.io.IOException e) {
> System.out.println("DocGen: IOException");
> }
> catch (org.apache.fop.apps.FOPException e) {
> System.out.println("DocGen: FOPException");
> }
>
> return out;
>
> }
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org