You are not logged in.
Sometimes images are output, and other times not. It seems like article images break images alltogether…
Hmm, it does not seem like article images are supported? Images inserted in the article via txp tags are output in the pdf, but images inserted as article images, are not.
Is it possible?
Last edited by raveoli (2007-01-28 19:58:10)
Offline
For those readers out there finding it hard to get their hands on xhtml2pdf.zip (because a download link is not mentioned on the TXP resources site at http://textpattern.org/plugins/535/wan_pdf nor here in the forum), the trusty link can be found at last on Wanni’s website, at the bottom of the page: http://wannert.net/blog/textpattern-plugin-zur-pdf-ausgabe-der-artikel
Download: xhtml2pdf.zip
L.
Offline
I found a solution for the umlauts and quotes problem.
It works for me in textpattern 4.0.6 and php 5.2.5, Euro-Sign, Umlauts and most of the quotes now right , but inverted commas not completely right drawed.
After upgrading xhtml2pdf in /textpattern/lib/xhtml2pdf/ to v0.3 (it now uses TCPDF instead of UPDF or FPDF)
I had to change the following lines in tcpdf_extends.php in the “SetFont” function, beginning in the 7th row,
I had to replace
if($family=='') {
$family=$this->FontFamily;
}
with
if($family =='' && $this->FontFamily != '') {
$family=$this->FontFamily;
}
else
$family='freeserif';
because of a “TCPDF error: Undefined font: B”.
The solution I found here
After that I changed only the “x2fpdf” call in the “wan_pdf” – plugin code to “xfpdf” and it worked.
You can get xhtml2pdf v0.3 here
If you choose “freeserif” the pdf-files will get too big, because of the embedded true type fonts.
You can get better and smaller files by embedding compressed type1 fonts with only needed charsets.
The setup is described here.
There are still problems, maybe a more competent person will find solutions.
- whocarez –
p.s. sorry for my English …
Last edited by whocarez (2008-07-27 20:08:03)
Offline
A better solution for the umlauts and quotes problem is to replace some symbols before generating the html file.
Edit the wan_pdf plugin and put before the following lines
// generate HTML first
if (is_writable($tempdir."/")) {
something like that
// replaces some characters
// left single quote
$body = str_replace('‘', '‘', $body);
// right single quote
$body = str_replace('’', '’', $body);
// left double quote
// $body = str_replace('“', '“', $body);
// low left double quote for German
$body = str_replace('“', '„', $body);
// right double quote
$body = str_replace('”', '”', $body);
// en dash
$body = str_replace('–', '–', $body);
// em dash
$body = str_replace('—', '—', $body);
// Euro-Sign
$body = str_replace('€', '€', $body);
// bullet
$body = str_replace('•', '‘', $body);
Last edited by whocarez (2008-08-01 22:23:33)
Offline
Does anyone have this plugin, download links don’t work. It seems like more and more txp plugins are going extinct…. :(
Offline
Dan
I have a mirror of the source code here. You’ll need to compile it for yourself though.
— Steve
Textile | My plugins on GitHub | @netcarver
Offline