for the moment it would be quite difficult to realize that with
XHTML2PDF (but I will put this on my TODO list). But you should consider
using an additional tool like "pdfsplit" from Dinu Gherman:
http://pypi.python.org/pypi?%3Aaction=search&term=pypdf&submit=search
XHTML2PDF can still be used to generate the PDF files from HTML sources.
Cheers
Dirk
hbagchi schrieb:
Dirk
hbagchi schrieb:
Try "wget" or "httrack", XHTML2PDF supports wildcards for batch
conversion e.g.:
$ xhtml2pdf *.html
Dirk
Yes, that's true. Is there interest in a feature like this? If it is so
I could write an option for the command line tool that concatenates
generated PDF after conversion. Something like:
$ xhtml2pdf --concat *.html
> It's been one veery long afternoon, first I couldn't get pisa to work
> on my Linux installation at all, and had to boot into Windows which
> still required me to download package after package requiring yet
> another package to be even installed... after reverting to Python
> 2.5.2... figuring out how to get it to recognize the command itself,
> figuring out why not even images would show up... so I'm new to this
> (and I have started to learn some Python anyway) but does it have to
> be so hard to get a simple command-line tool to work...
The problem is that XHTML2PDF consists of several third party packages.
But I think I could provide an "all batteries included" distribution for
the future if this is a barrier for installtion.
Thanks for the hints and inspirations
Dirk
It would be easier to build one big document if you want the links to
work. But this could also be done before passing the HTML to XHTML2PDF
since this is a very special case.
> But if Python eggs are supposed to be(come) the equivalent of Java's
> jars, the all-in-one approach would certainly be a major boon, at
> least as an option for beginners and end-users.
The discussion is ongoing how to install Python packages but EGGs are
becoming a "quasi" standard for people who like to use Python products
but do not develop using it. Its like "gem" for Ruby and so on.
> In the meantime I have to look closer into why my CSS properties
> didn't carry over (linked rather than embedded?) and I would like to
> get pisa to work in Linux... but this is obviously not the thread for
> that.
I am quite sure that it should be possible to get it working on Linux.
Install "Reportlab" and "html5lib" as described in their documentation
and then install XHTML2PDF e.g. using the TAR.GZ file:
$ python setup.py install
Dirk
with the next release of XHTML2PDF there will be a joining method based
on pyPdf, it is already in the SVN in an early state. For command line
something like this will be possible:
$ pisa --join *.html
For programmers it will be like:
pdf = pisaPDF()
pdf.addFromDocument(pisaDocument("Hello <b>World</b>"))
pdf.addFromURI("some_other_pdf.pdf")
pdfBinary = pdf.getvalue()
There are many more features to come soon. I think next week the new
version will be ready.
Dirk
zvart schrieb:
> I didn't see pyPDF http://pybrary.net/pyPdf/ mentioned in this
> thread. I find it pretty handy for merging PDFs with short scripts.
> A lot of times a script makes more sense for me anyway since I have to
> sort my merges by page counts, special paper runs, business data,
> etc... It's fast too.
>
> --~--~---------~--~----~------------~-------~--~----~
> Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google Groups-Grup=
> pe "Pisa XHTML2PDF Support".
> F=C3=BCr das Erstellen von Beitr=C3=Return-Path: <dirk.h...@gmail.com>
> Received: from ?192.168.178.20? (f048003028.adsl.alicedsl.de [78.48.3.28])
> by mx.google.com with ESMTPS id z15sm381248fkz.16.2008.10.30.02.22.11
> (version=SSLv3 cipher=RC4-MD5);
> Thu, 30 Oct 2008 02:22:12 -0700 (PDT)
> Message-ID: <49097D04...@gmail.com>
> Date: Thu, 30 Oct 2008 10:23:16 +0100
> From: Dirk Holtwick <dirk.h...@gmail.com>
> User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
> MIME-Version: 1.0
> To: xhtm...@googlegroups.com
> Subject: Re: [xhtml2pdf] Re: merging converted pdf documents with existing
> pdf documents
> References: <2f455225-d8da-4517...@i20g2000prf.googlegroups.com> <4902F86A...@gmail.com> <36b82c06-ac86-453e...@d10g2000pra.googlegroups.com> <490472F0...@gmail.com> <4b520c43-9fa5-4c1e...@q26g2000prq.googlegroups.com> <4905C0B3...@gmail.com> <73a98dac-06eb-4b68...@34g2000hsh.googlegroups.com>
> In-Reply-To: <73a98dac-06eb-4b68...@34g2000hsh.googlegroups.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: 7bit