[Typo3-dev] PDFlib and Typo3
Martin T. Kutschker
Martin.no5pam.Kutschker at blackbox.n0spam.net
Tue May 4 15:52:02 CEST 2004
Sebastian Kurfuerst wrote:
> Hi,
> if I understand services correctly (I just read the doc) it could be
> implemented like this:
> There will be an extension for PDF export of pages. This extension
> instanciates a service for PDF export and passes for example the ID of
> the page to the service. Then the service could read the page, the
> HTMLdoc service would read the HTML and the pdflib service would read
> out all content elements of the page and reformat them for PDF.
> Basically, it is important that all service with one servicetype (pdf
> for example) have the same public API, so all should have a method for
> outputting a webpage or for outputting "custom" content.
>
> This was my understanding of it, I hope I made my ideas clear.
You don't need a service for that behaviour. Just define a pdf page type
and associate the necessary rendering routines. See the xml types and TV
for alternative rendering.
OTOH, you might want to use a service to provide some kind of standard
API. SO actual implementations could work woth pdflib or R&OS. Though I
doubt it is useful to create such an API. I reckon they are different
enough to make the API clumsy.
>> I just browsed the R&OS pdf class faq, and I wondered if it makes
>> sense to abstract such a complicated api as pdf generation.
>
> Hm I don't understand your question. Do you see it as a problem that it
> doesn't take HTML and converts it to PDF?
No. Just pointing out that there are different methods to create a pdf.
> I think the quality would be
> much higher if we generate the content from the raw page data and not
> out of HTML. Of course this would be quite much work to do, but
> hopefully this would result in a high quality PDF.
Sure. You'd have to rewrite some classes. Can't say offhand which, but
don't believe it'll work out-of-the-box. OTOH, there are some
xml-generatign classes in the Core. They could serve as basis.
And you'd need to have an alternative style TS. If you want to directly
render pdf neither old-style nor css-sttle will be usable.
Masi
More information about the TYPO3-dev
mailing list