2007-01-28 19:45:12

raveoli
Member
êta
Real name: Oliver Nielsen
From: Copenhagen
Known languages: English, Danish
Website

Re: [ORPHAN] wan_pdf

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

 

2008-01-31 14:12:06

fbox
Member
gamma
Real name: Luke
From: Thornbury, Melbourne
Known languages: En-gb, Fr, HTML, PHP...

Re: [ORPHAN] wan_pdf

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

 

2008-07-26 19:09:10

whocarez
Plugin Author
zêta
Real name: Andreas
From: Germany/Ukraine
Known languages: ger, some eng, ru and ua
Website

Re: [ORPHAN] wan_pdf

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

 

2008-08-01 01:39:31

whocarez
Plugin Author
zêta
Real name: Andreas
From: Germany/Ukraine
Known languages: ger, some eng, ru and ua
Website

Re: [ORPHAN] wan_pdf

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

 

2008-12-03 23:18:11

danwoodward
Member
delta
Real name: Dan Woodward
From: Brooklyn NY
Known languages: English
Website

Re: [ORPHAN] wan_pdf

Does anyone have this plugin, download links don’t work. It seems like more and more txp plugins are going extinct…. :(

Offline

 

2008-12-04 00:44:52

net-carver
Admin
psi
Real name: Steve
From: UK
Known languages: English
Website

Re: [ORPHAN] wan_pdf

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

 

2009-12-05 22:50:20

whaleen
Member
kappa
Real name: Josh
From: Portland
Website

Re: [ORPHAN] wan_pdf

I wonder has anyone extended or tweaked this plugin to create pdfs from article lists or in other words any rendered html.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

 

2011-11-11 04:10:40

elwins
Member
epsilon
Real name: Elvis
From: Latvia
Known languages: Latvian, English, Russian
Website

Re: [ORPHAN] wan_pdf

maybe someone can publish plugin code ?

Offline

 

2011-11-11 07:47:56

whocarez
Plugin Author
zêta
Real name: Andreas
From: Germany/Ukraine
Known languages: ger, some eng, ru and ua
Website

Re: [ORPHAN] wan_pdf

you can find it here: wan_pdf_php

Offline

 

2012-08-02 22:20:29

mrdale
Moderator
omega
Real name: Dale Chapman
From: Walla Walla
Known languages: strine.
Website

Re: [ORPHAN] wan_pdf

Anyone know where I can download the xhtml2pdf php libraries? I’m only finding perl scripts

Offline

 

Powered by FluxBB