Textpattern Forum

You are not logged in. Register | Login | Help

#101 2007-01-28 19:45:12

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: [plugin] [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

#102 2008-01-31 14:12:06

fbox
Member
From: Thornbury, Melbourne
Registered: 2006-02-18
Posts: 42

Re: [plugin] [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

#103 2008-07-26 19:09:10

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 165

Re: [plugin] [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

#104 2008-08-01 01:39:31

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 165

Re: [plugin] [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

#105 2008-12-03 23:18:11

danwoodward
Member
From: Brooklyn NY
Registered: 2006-08-06
Posts: 51
Website

Re: [plugin] [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

#106 2008-12-04 00:44:52

net-carver
Admin
From: UK
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [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

#107 2009-12-05 22:50:20

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 372
Website

Re: [plugin] [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

#108 2011-11-11 04:10:40

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80
Website

Re: [plugin] [ORPHAN] wan_pdf

maybe someone can publish plugin code ?

Offline

#109 2011-11-11 07:47:56

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 165

Re: [plugin] [ORPHAN] wan_pdf

you can find it here: wan_pdf_php

Offline

#110 2012-08-02 22:20:29

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,041
Website

Re: [plugin] [ORPHAN] wan_pdf

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

Offline

Board footer

Powered by FluxBB