Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Basic typesetting
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Matthieu Dubuget <matthieu.dubuget@g...>
Subject: Re: [Caml-list] Basic typesetting

Oliver Bandel a écrit :
> Zitat von Matthieu Dubuget <>:
>> Hello,
>> I just tried CamlPDF, which is very nice for what I want to do:
>> just export one simple page of text into pdf.
> [...]
> Oh, I didn't heard of CamlPDF before.
> If I found the correct page, then it is a pre-release.
> But there is no date on the page, so I don't know if it's up to date.

Well, it was announced some time ago on the list by John Whitington,
from In recent announce, he also

>> A new version of CamlPDF will be released soon, reflecting the updated
>> facilities used  by the commercial tools.

>> For this kind of simple thing, I'd really like to get rid of the big,
>> and difficult to install fop.
> fop?

Copied from FOP web page:
Apache FOP (Formatting Objects Processor) is a print formatter driven by
XSL formatting objects (XSL-FO) and an output independent formatter. It
is a Java application that reads a formatting object (FO) tree and
renders the resulting pages to a specified output. Output formats
currently supported include PDF, PS, PCL, AFP, XML (area tree
representation), Print, AWT and PNG, and to a lesser extent, RTF and
TXT. The primary output target is PDF.

That's the way my little software works. It generates an .fo file and
transforms it by calling fop through Sys.command. A little heavy for
one simple page...

I also could have produced one PostScript version before a pstopdf call.
But direct .pdf production is something I want to learn ;-)

>> But in order to put text objects on page at the right place, I would
>> like to compute
>> their size. Is there any standard way to compute it?
> Postscript has a pathbbox-operator, which gives you back
> the bounding box of the current path; PDF seems not to have
> such an operator. At least I could not find an aequivalent thing
> in the last minutes, where I browsed through the PDF-Reference Manual.
> So, possibly one has to calculate the size by itself?!
> (So, if CamlPDF does not provide it, I see no solution to that problem
> right now.)

Thanks Oliver.

I will certainly have to parse AFM files in order to find font metrics
and use them in order to compute the dimensions I need, then...

> Ciao,
>    Oliver

Guten Abend