[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Converting XML into ODT document to print as paper

Subject: Re: Converting XML into ODT document to print as paper
From: "Martynas Jusevičius martynas@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 Sep 2020 20:43:38 -0000
Re:  Converting XML into ODT document to print as paper
How about https://www.openoffice.org/xml/odf2xhtml/, could that help?

I used those stylesheets about 10 years ago in an ODT -> XHTML -> ePub
transformation pipeline.

On Fri, Sep 25, 2020 at 1:33 PM Manuel Souto Pico
terminolator@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
>
> Thank you so much everyone for all the suggestions. They help a lot, I have
what I needed.
>
> In the end it seems my initial idea (ODT output) is not the best approach at
all.
>
> Some clarification: I don't need the final document to be modified. I said
ODT/OOXML because I assumed it's easier to convert to that than to PDF. And
ideally there should be no hand intervention other than for printing, so a
final-final result out of the pipeline.
>
> So it seems these are my options:
> * XML -> XSLT -> FODT -> PDF
> * XML -> XSLT -> HTML + CSS/JS ( and print directly, I suppose)
> * XML -> XSL-FO -> PDF
> * XML -> XSLT -> LaTeX -> PDF
>
> Some good pointers to things worth exploring:
> * https://www.pagedjs.org and aged-media CSS (new to me)
> * XSL-FO (I had heard about it before)
>
> Also very interesting (but more specific and perhaps more advanced for my
meager CSS skills):
> * https://vivliostyle.org/
> * https://github.com/flyingsaucerproject/flyingsaucer
>
> >> Open/Libre Office also has a single-file XML format that you can use for
this purpose.
>
> I saw that LO's Writer can save as a FODT (F stands for "flat xml"), I guess
this is what you Willem and Wendell meant (thanks for that!). I easily created
a quick and dirty template in XSL to produce a FODT which looks quite good, so
that's the trick as PoC. Probably it shouldn't be too difficult to convert to
PDF without having to open the file in LO, but that's fine.
>
> >> LaTeX
>
> I know some LaTeX and I used it to craft my thesis and my cv
(http://msoutopico.es/cv). It would have never crossed my mind that it could
be used for this, but it doesn't seem a bad idea at all! Good tip, thanks
Peter! (And great sample, you nail it).
>
> Thank you again. Have a great weekend.
> Cheers, Manuel
>
>
>
>
> Peter Flynn peter@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
escreveu no dia quinta, 24/09/2020 C (s) 17:25:
>>
>> On 24/09/2020 08:57, Manuel Souto Pico terminolator@xxxxxxxxx wrote:
>> > I would need to convert XML to something that has a fixed page layout
>> > ready to print, like ODT/OOXML or PDF.
>>
>> Do you want other people to be able to edit the result? ODT/OOXML are
>> designed to be editable; PDF is not.
>>
>> > I know OOXML is complex, but since the final document needs to be
>> > printed and keep the same layout, probably HTML output is not good for
>> > this (I guess!).
>>
>> A good web designer can probably create a layout that looks the same and
>> honours the paged-media CSS, but I don't think there are any guarantees.
>>
>> > What I need at the moment is just a quick and dirty proof of concept
>> > to show that this conversion is feasible and not too difficult, to
>> > show it to decision makers (I'm not a XSLT developer myself).
>>
>> XSLT will certainly be involved IMNSHO. My personal preference would be
>> XML > LaTeX > PDF but not everyone knows LaTeX.
>>
>> > My first thought was to unzip the ODT model I have, look at the
>> > content.xml inside and then try to transform my XML into that same
>> > structure (as suggested here:
>> >
https://stackoverflow.com/questions/38298174/directly-convert-a-single-xml-fi
le-to-docx).
>>
>> That is indeed possible. Just complicated.
>>
>> > However, probably that's the hard way...
>>
>> You spotted it :-)
>>
>> > I'm doing some research, any tips or pointers or advice or
>> > recommendation or examples here would be highly appreciated. Is there
>> > any best practice to do this? or a ready-made solution?
>>
>> I did a quick test just now and the results are at
>> http://xml.silmaril.ie/software
>>
>> Peter
>>
> XSL-List info and archive
> EasyUnsubscribe (by email)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.