PDF merging

Lukas Renggli renggli at gmail.com
Mon Mar 6 07:15:06 UTC 2006


> >> i am new to squeak.
> >> I designed a template a PDF Template document.
> >> What I want if to fill the fields specified in that template with
> >> values from Squeak.
> >> Is there any package to manipulate this PDF merging?.
> >> May be in another smalltalk dialect?

People that want web-apps usually also need PDFs, so we went 3
different ways to produce PDF, each with its advantages and
disadvantages:

- SPDF is a native Smalltalk library that I ported from VisualWorks:
it is very fast, can directly stream to sockets and provides a nice
object-representation of PDF files. However it requires that you know
about the internals of PDF and since there are no font-metricts, it
can't do line-wrapping automatically.

- Latex is another way to create PDF: It is not so fast, but
especially for Seaside applications it can be very interesting. What
we did, is to create a new back-end to Seaside, so that we can render
the same components to produce Latex instead of HTML. This works very
well, however there are no means to directly control the position of
elements. Line-wrapping works of course.

- Morphs are the third way to create PDF. Export them as PS and
convert them to PDF using ps2pdf. With this approach it is possible to
do exact positioning, line-wrapping, etc. but it is not very fast and
multi page documents do not work nicely (you have to have one morph
per page).

I know that other people have other solutions for this problem, these
are just the ways we went to satisfy different requirements. You might
also want to look at FOP, a tool that generates all kind of output
formats from an XML specification.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



More information about the Squeak-dev mailing list