You are not logged in.

#1 2008-04-07 12:15:30

tlaloc
Member
From: Lower Saxony
Registered: 2006-05-12
Posts: 359

[solved] asciidoc --> pdf/roff

Hi,
I am playing around with asciidoc, and already can convert some stuff to html, but not to pdf/roff. This is done by a script called a2x. According to the manpage, this requires:

- xsltproc (presumably named libxslt in Arch)

- DocBook XSL Stylesheets (docbook-xsl)

- FOP (for PDF file generation)

- Lynx (for text file generation)

fop is from AUR, and I to had rename /usr/bin/fop (a simple link to the file in /var/abs/local) to /usr/bin/fop.sh. But still, I get errors like this:

[tlaloc@archbox ~]$ a2x -f pdf TODOS2.txt
Making portrait pages on A4 paper (210mmx297mm)
07.04.2008 13:43:21 org.apache.fop.cli.Main startFOP
SCHWERWIEGEND: Exception
javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: file:/home/tlaloc/./TODOS2.fo:1:25385: Error(1/25385): No element mapping definition found for (Namespace URI: "http://xml.apache.org/fop/extensions", Local Name: "destination")
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:166)
        at org.apache.fop.cli.Main.main(Main.java:197)

---------

javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: file:/home/tlaloc/./TODOS2.fo:1:25385: Error(1/25385): No element mapping definition found for (Namespace URI: "http://xml.apache.org/fop/extensions", Local Name: "destination")
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:166)
        at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: org.apache.fop.apps.FOPException: file:/home/tlaloc/./TODOS2.fo:1:25385: Error(1/25385): No element mapping definition found for (Namespace URI: "http://xml.apache.org/fop/extensions", Local Name: "destination")
        at org.apache.fop.fo.ElementMappingRegistry.findFOMaker(ElementMappingRegistry.java:143)

<snip> 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

<snip>

---------
org.apache.fop.apps.FOPException: file:/home/tlaloc/./TODOS2.fo:1:25385: Error(1/25385): No element mapping definition found for (Namespace URI: "http://xml.apache.org/fop/extensions", Local Name: "destination")
        at org.apache.fop.fo.ElementMappingRegistry.findFOMaker(ElementMappingRegistry.java:143)
        at org.apache.fop.fo.FOTreeBuilder.findFOMaker(FOTreeBuilder.java:214)

<snip>

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 
<snip>

a2x: failed: fop.sh "./TODOS2.fo" "./TODOS2.pdf"
[tlaloc@archbox ~]$

Does anyone has more insight to /experience with this.

Best regards,
Matt

Last edited by tlaloc (2008-05-05 11:50:26)

Offline

#2 2008-04-11 15:18:53

tlaloc
Member
From: Lower Saxony
Registered: 2006-05-12
Posts: 359

Re: [solved] asciidoc --> pdf/roff

Hey, I need this stuff for some Arch-related project (and yes, I know that Stefan claimed from the beginning that it would not work in asciidoc - I still try to prove him wrong). Moreover, I do not expect any big applause or laurels over here - I just would like get it up and running. Maybe I am just too silly or stupid along the line of this. But ANY KIND of comment would be appreciated, alright?

Offline

#3 2008-05-04 14:59:55

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: [solved] asciidoc --> pdf/roff

tlaloc wrote:

ANY KIND of comment would be appreciated, alright?

I am in the same situation as you : I cannot make the PDF generation work.
I will put an update if i succeed.

Offline

#4 2008-05-04 15:52:02

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: [solved] asciidoc --> pdf/roff

I have made a new PKGBUILD for fop using version 0.20.5 (as recommended here).
It worked with a2x.

# Contributor: Mildred <silkensedai@online.fr>
# Mantainer: Andres Blanc <andresblanc@gmail.com>
pkgname=fop
pkgver=0.20.5
pkgrel=1
pkgdesc="XSL-FO Apache processor. Transform XSL-FO documents into various formats like PDF, PS, SVG and more"
arch=(i686)
url="http://xmlgraphics.apache.org/fop/"
license=('APACHE')
depends=('java-runtime')
source=("http://archive.apache.org/dist/xml/fop/binaries/fop-$pkgver-bin.tar.gz")
md5sums=('d6b43e3eddf9378536ad8127bc057d41')

build() {
  mkdir "$startdir/pkg/opt"
  mkdir -p "$startdir/pkg/usr/bin"
  cp -r "$startdir/src/fop-$pkgver" "$startdir/pkg/opt/fop"
  ln -s /opt/fop/fop.sh $startdir/pkg/usr/bin/fop.sh || return 1
  return 0
}

You can also use dblatex to convert from docbook to pdf using latex. It is in AUR.

I hope it helped.

Offline

#5 2008-05-05 11:49:40

tlaloc
Member
From: Lower Saxony
Registered: 2006-05-12
Posts: 359

Re: [solved] asciidoc --> pdf/roff

Thank you very much, chicha - I got it compiled and installed with your new PKGBUILD. Conversion to PDF works fine, conversion to manpage-format still gives errors - but this is probably due to the still messy syntax of the files I try to convert, rather than an fop-related problem.

What a great community big_smile.

Offline

#6 2008-05-05 11:55:24

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: [solved] asciidoc --> pdf/roff

I am glad it helped smile

I have not tried to make manpages with asciidoc yet. But if you still have problem with it come back here. Somebody will probably help you.

Offline

Board footer

Powered by FluxBB