[Klug-general] Document Production

Peter Childs pchilds at bcs.org
Fri Feb 18 16:28:13 UTC 2011


On 18 February 2011 13:50, David Halliday <david.halliday at gmail.com> wrote:

> How is this project going?
>
> Something that I'm interested in playing with at some point: If you want to
> generate reports by hand (custom parameters) you might find it advantageous
> (and platform ambiguous) to use HTML based reports and apply a print style
> sheet: http://www.alistapart.com/articles/goingtoprint/
>

Hmm Yes, I've actual gone for a slight change to what it always used to be
done.....

pdftk invoice.pdf background template.pdf output output.pdf

The job was previously all done in postscript so I've really just changed
the template from postscript to pdf so that the links work, plus pdf are
easier to produce than postscript.... (unless your hand coding anyway!)

The only big issue currently is that its a bit slow, running the invoices
through ps2pdf then pdftk but I might be able to speed that up a bit.

Postscript is actually quite a neat language, shame nobody much uses it.

Peter.



>
> <http://www.alistapart.com/articles/goingtoprint/>
> On 16 February 2011 21:05, MacGyveR <macgyver at thedumbterminal.co.uk>wrote:
>
>> On Monday 14 Feb 2011, Peter Childs wrote:
>> > On 14 February 2011 19:26, Peter Childs <pchilds at bcs.org> wrote:
>> > > On 14 February 2011 19:04, Mike Evans <mike at tandem.f9.co.uk> wrote:
>> > >> I would suggest you look at XML and XSL-FO rather than HTML
>> > >>
>> > >> http://en.wikipedia.org/wiki/XSL_Formatting_Objects
>> > >>
>> > >> If you're not scared of Java then there is always the apache FOP
>> project
>> > >> which is a XSL-FO print driver.  One set of mark up can be
>> transformed
>> > >> into any of: PDF, PS, PCL, AFP, XML (area tree representation),
>> Print,
>> > >> AWT and PNG, and to a lesser extent, RTF and TXT.
>> > >>
>> > >> There are also XSL-FO processors for C/C++ and probably Python,
>> though
>> > >> I've never used them.
>> > >>
>> > >> Mike
>> > >
>> > > Brain Melt Down.
>> > >
>> > > Its a file format then? So are there standard tools for dealing with
>> it
>> > > right or what?
>> > >
>> > > I don't understand....
>> > >
>> > >
>> > > Peter.
>> >
>> > Oh Right.....
>> >
>> > so XSL describe a document and how to takes xml data to produce an end
>> > product.
>> >
>> > So I need an XML based method to describe by document.
>> >
>> > Now I wonder what that would be? Looks fine for HTML but I'm dealing in
>> > paper....
>> >
>> > Peter.
>>
>> Steps would be:
>>
>> 1) Generate/write your documents in XML, using your own tags to give
>> structure, such as paragraph breaks, heading, columns, images etc..
>>
>> 2) Create a XSL style sheet that will transform your XML into XSL-FO.
>>
>> 2a) Create a XSL style sheet to HTML for debugging/preview (optional but
>> handy)
>>
>> 3) Use the example java code on the FOP site to build a converter that
>> will
>> convert the XSL-FO into PDF:
>>
>> http://xmlgraphics.apache.org/fop/1.0/embedding.html#render-with-xslt
>>
>> _______________________________________________
>> Kent mailing list
>> Kent at mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/kent
>>
>
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20110218/4b2fdde8/attachment.htm>


More information about the Kent mailing list