[Techtalk] DocBook, PDF and images

Dan Richter daniel.richter at wimba.com
Mon Dec 9 11:15:52 EST 2002


Thanks for the advice Laurel.

Long story short: your advice didn't help me directly, but it gave me the 
idea of doing DocBook->PS->PDF (instead of DocBook->LaTeX->PDF, which is 
what OpenJade does by default), and that worked.

Now the long story (just for those of you that have nothing better to do 
:-). OpenJade converts DocBook to PDF with LaTeX as an intermediary step. 
Apparently the LaTeX->PDF converter doesn't like any of the image formats 
that DocBook accepts, notably PS (PostScript) and EPS (Encapsulated 
PostScript).

The link that Laurel gave me <http://www.2pi.info/latex/Includingeps.html> 
explained that I should use ps2pdf to convert my PS images to PDF, then 
include them in the LaTeX file. Fine, but the DocBook grammar doesn't allow 
PDF images. (Yeah, I could change the grammar, but then it's not portable 
anymore.)

I was even willing to use flag text in the LaTeX file, then replace it with 
the reference to the PDF image and use pdflatex (or pdftex, it doesn't 
matter), but pdflatex complains that the LaTeX file isn't valid. And it's 
really bad: the invalid commands start on the first line! Don't ask me why; 
I don't even know LaTeX.

But then it occurred to me to use docbook2ps, then ps2pdf. That way I can 
include a PS image, and converting from PS to PDF is a snap. That worked okay.

> > Doesn't OpenJade/LaTeX take EPS?
>
>latex (which you would use if you wanted to eventually get postscript)
>does, but pdflatex does not.  Here's a web page that explains this and
>how to get around it:
>
>http://www.2pi.info/latex/Includingeps.html

========== Dan Richter ============== mailto:Dan at wimba.com ===========
   I'd rather be in charge here than be second-in-command in Rome.
              - Julius Ceasar (according to Plutarc)




More information about the Techtalk mailing list