You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Leon Pu <le...@yahoo.com.cn> on 2005/11/01 15:27:35 UTC
Convert HTML to PostScript or PDF
Hi all,
is it possible to use FOP to convert a HTML file to PostScript or PDF?
Best regards,
Leon
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Matthew L Daniel <md...@scdi.com>.
> is it possible to use FOP to convert a HTML file to PostScript or PDF?
I have had great success using htmldoc (http://www.htmldoc.org). It's
written in C++, so I don't know if that hinders your progress, but it
works great.
-- /v\atthew
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Leon Pu <le...@yahoo.com.cn>.
--- Manuel Mall <mm...@arcus.com.au> wrote:
> On Wed, 2 Nov 2005 01:32 pm, Leon Pu wrote:
> > --- Daniel Noll <da...@nuix.com.au> wrote:
> > > Leon Pu wrote:
> > > >So, is it possible to use one stylesheet to transform XML to
> both
> > >
> > > HTML
> > >
> > > >and PDF?
> > >
> > > Not as such. Though it might be possible to cheat by writing one
> > > stylesheet to transform to HTML, and then transforming the HTML
> to
> > > XSL-FO in a separate step using a stylesheet which will be
> > > constant.
> >
> > It means we have to do the generation of HTML and PDF in two steps?
> > What's the method in some websites that provide the PDF download
> for
> > current webpage? Are these websites using the same solution?
> >
> Typically two different approaches will be used:
>
> a) The site is written in XML and two different stylesheets are used.
>
> One for conversion to HTML and one for conversion into XSL-FO. The
> XSL-FO output is then given to an XSL-FO processor (e.g. FOP) for
> conversion into PDF. Note that most XSL-FO processors can make the
> two
> steps XML -> XSL-FO and XSL-FO -> PDF look like one but internally
> both
> conversions are performed.
>
> b) The site is written in XHMTL and a stylesheet is used to convert
> XHMTL into XSL-FO. Again this is followed by the XSL-FO -> PDF
> conversion.
>
> A possible third alternative is for a site written in HTML that an
> HTML
> to XHTML conversion tool is used (Note this would not be XSL based).
> So
> we have HTML -> XHTML using a 3rd party tool, XHTML -> XSL-FO using
> an
> XSL stylesheet and processor (e.g. XALAN), XSL-FO -> PDF (e.g. FOP).
It's much clear to me, thanks.
Leon
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Manuel Mall <mm...@arcus.com.au>.
On Wed, 2 Nov 2005 01:32 pm, Leon Pu wrote:
> --- Daniel Noll <da...@nuix.com.au> wrote:
> > Leon Pu wrote:
> > >So, is it possible to use one stylesheet to transform XML to both
> >
> > HTML
> >
> > >and PDF?
> >
> > Not as such. Though it might be possible to cheat by writing one
> > stylesheet to transform to HTML, and then transforming the HTML to
> > XSL-FO in a separate step using a stylesheet which will be
> > constant.
>
> It means we have to do the generation of HTML and PDF in two steps?
> What's the method in some websites that provide the PDF download for
> current webpage? Are these websites using the same solution?
>
Typically two different approaches will be used:
a) The site is written in XML and two different stylesheets are used.
One for conversion to HTML and one for conversion into XSL-FO. The
XSL-FO output is then given to an XSL-FO processor (e.g. FOP) for
conversion into PDF. Note that most XSL-FO processors can make the two
steps XML -> XSL-FO and XSL-FO -> PDF look like one but internally both
conversions are performed.
b) The site is written in XHMTL and a stylesheet is used to convert
XHMTL into XSL-FO. Again this is followed by the XSL-FO -> PDF
conversion.
A possible third alternative is for a site written in HTML that an HTML
to XHTML conversion tool is used (Note this would not be XSL based). So
we have HTML -> XHTML using a 3rd party tool, XHTML -> XSL-FO using an
XSL stylesheet and processor (e.g. XALAN), XSL-FO -> PDF (e.g. FOP).
> Thanks for your reply.
>
> Leon
>
Manuel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Leon Pu <le...@yahoo.com.cn>.
--- Daniel Noll <da...@nuix.com.au> wrote:
> Leon Pu wrote:
>
> >So, is it possible to use one stylesheet to transform XML to both
> HTML
> >and PDF?
> >
> >
> Not as such. Though it might be possible to cheat by writing one
> stylesheet to transform to HTML, and then transforming the HTML to
> XSL-FO in a separate step using a stylesheet which will be constant.
It means we have to do the generation of HTML and PDF in two steps?
What's the method in some websites that provide the PDF download for
current webpage? Are these websites using the same solution?
Thanks for your reply.
Leon
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Daniel Noll <da...@nuix.com.au>.
Leon Pu wrote:
>So, is it possible to use one stylesheet to transform XML to both HTML
>and PDF?
>
>
Not as such. Though it might be possible to cheat by writing one
stylesheet to transform to HTML, and then transforming the HTML to
XSL-FO in a separate step using a stylesheet which will be constant.
Daniel
--
Daniel Noll
NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax: (02) 9283 9020
This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Leon Pu <le...@yahoo.com.cn>.
So, is it possible to use one stylesheet to transform XML to both HTML
and PDF?
Leon
--- Glen Mazza <gm...@apache.org> wrote:
> Yes, that is standard--Docbook does that (maintains two separate
> stylesheets for HTML and FO.)
>
> Glen
>
> JBryant@s-s-t.com escribió:
> > Your best bet is to use XSLT to go from your source XML to XSL:FO
> and skip
> > trying to convert HTML into XSL:FO.
> >
> > Jay Bryant
> > Bryant Communication Services
> > (presently consulting at Synergistic Solution Technologies)
> >
> >
> >
> >
> > Leon Pu <le...@yahoo.com.cn>
> > 11/01/2005 11:08 AM
> > Please respond to
> > fop-users@xmlgraphics.apache.org
> >
> >
> > To
> > fop-users@xmlgraphics.apache.org
> > cc
> >
> > Subject
> > Re: Convert HTML to PostScript or PDF
> >
> >
> >
> >
> >
> >
> > My HTML's source is XML, I use Xalan to transform XML to HTML. Is
> the
> > result HTML ok for FOP? Or there is other shortcut to generate
> > PostScript or PDF from XML directly?
> >
> > Thanks for your reply.
> >
> >
> > Best regards,
> > Leon
> >
> > --- Glen Mazza <gm...@apache.org> wrote:
> >
> >
> >>This article may be of help:
> >>http://www-128.ibm.com/developerworks/library/x-xslfo2app/
> >>
> >>Glen
> >>
> >>Jimmy Dixon wrote:
> >>
> >>>no - you would need to have your HTML in XHTML format so you can
> >>
> >>convert
> >>
> >>>it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to
> >>
> >>PDF
> >>
> >>>or (I think) Postscript.
> >>>
> >>>Leon Pu wrote:
> >>>
> >>>
> >>>>Hi all,
> >>>>
> >>>>is it possible to use FOP to convert a HTML file to PostScript or
> >>
> >>PDF?
> >>
> >>>>
> >>>>Best regards,
> >>>>Leon
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>__________________________________ Yahoo! Mail - PC Magazine
> >>
> >>Editors'
> >>
> >>>>Choice 2005 http://mail.yahoo.com
> >>>>
> >>>>
> >>
>
>>---------------------------------------------------------------------
> >>
> >>>>To unsubscribe, e-mail:
> >>
> >>fop-users-unsubscribe@xmlgraphics.apache.org
> >>
> >>>>For additional commands, e-mail:
> >>
> >>fop-users-help@xmlgraphics.apache.org
> >>
> >>>>
> >>>>
> >>>>
> >>>>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> >>For additional commands, e-mail:
> >>fop-users-help@xmlgraphics.apache.org
> >>
> >>
> >
> >
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
>
>
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Glen Mazza <gm...@apache.org>.
Yes, that is standard--Docbook does that (maintains two separate
stylesheets for HTML and FO.)
Glen
JBryant@s-s-t.com escribió:
> Your best bet is to use XSLT to go from your source XML to XSL:FO and skip
> trying to convert HTML into XSL:FO.
>
> Jay Bryant
> Bryant Communication Services
> (presently consulting at Synergistic Solution Technologies)
>
>
>
>
> Leon Pu <le...@yahoo.com.cn>
> 11/01/2005 11:08 AM
> Please respond to
> fop-users@xmlgraphics.apache.org
>
>
> To
> fop-users@xmlgraphics.apache.org
> cc
>
> Subject
> Re: Convert HTML to PostScript or PDF
>
>
>
>
>
>
> My HTML's source is XML, I use Xalan to transform XML to HTML. Is the
> result HTML ok for FOP? Or there is other shortcut to generate
> PostScript or PDF from XML directly?
>
> Thanks for your reply.
>
>
> Best regards,
> Leon
>
> --- Glen Mazza <gm...@apache.org> wrote:
>
>
>>This article may be of help:
>>http://www-128.ibm.com/developerworks/library/x-xslfo2app/
>>
>>Glen
>>
>>Jimmy Dixon wrote:
>>
>>>no - you would need to have your HTML in XHTML format so you can
>>
>>convert
>>
>>>it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to
>>
>>PDF
>>
>>>or (I think) Postscript.
>>>
>>>Leon Pu wrote:
>>>
>>>
>>>>Hi all,
>>>>
>>>>is it possible to use FOP to convert a HTML file to PostScript or
>>
>>PDF?
>>
>>>>
>>>>Best regards,
>>>>Leon
>>>>
>>>>
>>>>
>>>>
>>>>__________________________________ Yahoo! Mail - PC Magazine
>>
>>Editors'
>>
>>>>Choice 2005 http://mail.yahoo.com
>>>>
>>>>
>>
>>---------------------------------------------------------------------
>>
>>>>To unsubscribe, e-mail:
>>
>>fop-users-unsubscribe@xmlgraphics.apache.org
>>
>>>>For additional commands, e-mail:
>>
>>fop-users-help@xmlgraphics.apache.org
>>
>>>>
>>>>
>>>>
>>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>For additional commands, e-mail:
>>fop-users-help@xmlgraphics.apache.org
>>
>>
>
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by JB...@s-s-t.com.
Your best bet is to use XSLT to go from your source XML to XSL:FO and skip
trying to convert HTML into XSL:FO.
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)
Leon Pu <le...@yahoo.com.cn>
11/01/2005 11:08 AM
Please respond to
fop-users@xmlgraphics.apache.org
To
fop-users@xmlgraphics.apache.org
cc
Subject
Re: Convert HTML to PostScript or PDF
My HTML's source is XML, I use Xalan to transform XML to HTML. Is the
result HTML ok for FOP? Or there is other shortcut to generate
PostScript or PDF from XML directly?
Thanks for your reply.
Best regards,
Leon
--- Glen Mazza <gm...@apache.org> wrote:
> This article may be of help:
> http://www-128.ibm.com/developerworks/library/x-xslfo2app/
>
> Glen
>
> Jimmy Dixon wrote:
> > no - you would need to have your HTML in XHTML format so you can
> convert
> > it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to
> PDF
> > or (I think) Postscript.
> >
> > Leon Pu wrote:
> >
> >> Hi all,
> >>
> >> is it possible to use FOP to convert a HTML file to PostScript or
> PDF?
> >>
> >>
> >> Best regards,
> >> Leon
> >>
> >>
> >>
> >>
> >> __________________________________ Yahoo! Mail - PC Magazine
> Editors'
> >> Choice 2005 http://mail.yahoo.com
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> >>
> >>
> >>
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Leon Pu <le...@yahoo.com.cn>.
My HTML's source is XML, I use Xalan to transform XML to HTML. Is the
result HTML ok for FOP? Or there is other shortcut to generate
PostScript or PDF from XML directly?
Thanks for your reply.
Best regards,
Leon
--- Glen Mazza <gm...@apache.org> wrote:
> This article may be of help:
> http://www-128.ibm.com/developerworks/library/x-xslfo2app/
>
> Glen
>
> Jimmy Dixon wrote:
> > no - you would need to have your HTML in XHTML format so you can
> convert
> > it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to
> PDF
> > or (I think) Postscript.
> >
> > Leon Pu wrote:
> >
> >> Hi all,
> >>
> >> is it possible to use FOP to convert a HTML file to PostScript or
> PDF?
> >>
> >>
> >> Best regards,
> >> Leon
> >>
> >>
> >>
> >>
> >> __________________________________ Yahoo! Mail - PC Magazine
> Editors'
> >> Choice 2005 http://mail.yahoo.com
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> >>
> >>
> >>
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Glen Mazza <gm...@apache.org>.
This article may be of help:
http://www-128.ibm.com/developerworks/library/x-xslfo2app/
Glen
Jimmy Dixon wrote:
> no - you would need to have your HTML in XHTML format so you can convert
> it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to PDF
> or (I think) Postscript.
>
> Leon Pu wrote:
>
>> Hi all,
>>
>> is it possible to use FOP to convert a HTML file to PostScript or PDF?
>>
>>
>> Best regards,
>> Leon
>>
>>
>>
>>
>> __________________________________ Yahoo! Mail - PC Magazine Editors'
>> Choice 2005 http://mail.yahoo.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Convert HTML to PostScript or PDF
Posted by Jimmy Dixon <ji...@perfiliate.com>.
no - you would need to have your HTML in XHTML format so you can convert
it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to PDF
or (I think) Postscript.
Leon Pu wrote:
>Hi all,
>
>is it possible to use FOP to convert a HTML file to PostScript or PDF?
>
>
>Best regards,
>Leon
>
>
>
>
>__________________________________
>Yahoo! Mail - PC Magazine Editors' Choice 2005
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
--
Jimmy Dixon, Perfiliate Technologies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
email : jimmy.dixon@perfiliate.com
phone : +44 (0)191 241 6500
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Registered Office:
Perfiliate Technologies Limited
7-15 Pink Lane,
Newcastle upon Tyne. NE1 5DW
Registered No. 3783384 in the UK
Telephone +44 (0)191 241 6500
Facsimile +44 (0)191 241 9302
www.perfiliate.com
Please note that electronic mail may be monitored.
This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. We check all emails for viruses, but please note that we do not accept liability for any viruses which may be transmitted in or with this email.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org