Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-24 21:54:52

wanni
Archived Plugin Author
Registered: 2005-11-11
Posts: 32

[plugin] [ORPHAN] wan_pdf

Notice: This thread is archived, this plugin is no longer available but a mirror exists here.

**********************************************************

The plugin wan_pdf generates PDF-versions of your articles. The output is a link to the PDF-file. The PDFs are not generated every time the article is called, but only when the title or the body has changed.

More information
Download

Attention: If you update from a version <= 0.2 please download xhtml2pdf.zip once again and delete all PDFs due to changes in the name scheme.

Current version: 0.3 (2006-02-22)

Changelog

Version 0.3 (2006-02-22)

  • Feature: Use an image for linking to the PDF instead of text
  • Feature: Debug switch
  • Bugfix: Uses updf instead of fpdf for (hopefully) complete unicode support
  • Bugfix: New name scheme (articleid_urltitle.pdf)
  • Bugfix: Images in the PDF should now work everywhere

Version 0.2 (2006-01-29):

  • Feature: include body and/or excerpt optionally
  • Feature: write PDF metadata (thanks to ChrisJ)
  • Bugfix: new name scheme for PDFs (articleid_title.pdf) to distinguish between two articles with the same title
  • Bugfix: some changen in xhtml2pdf.

Version 0.16 (2006-01-25):

  • Bugfix: Forgot to add the class-argument to the link

Version 0.15 (2006-01-25):

  • Bugfix: replace hardcoded directories with global vars (thanks to chriloi)
  • Bugfix: UTF-8-support for umlauts (thanks to chriloi)

Version 0.1 (2006-01-24):

  • first version

Last edited by wanni (2006-02-23 10:19:59)

Offline

#2 2006-01-25 03:14:35

RenJonsin
Member
From: Tarpon Springs, FL USA
Registered: 2005-02-06
Posts: 103
Website

Re: [plugin] [ORPHAN] wan_pdf

THis makes a title and link for the file but the status shows as “missing” on the list.

I’m using v4.03 Rev.1228.

Last edited by RenJonsin (2006-01-25 03:45:14)

Offline

#3 2006-01-25 10:11:02

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: [plugin] [ORPHAN] wan_pdf

Wow amazing and great job… I was waiting for this one for such a long time…
I’ve searched for an example around and did not find any… Would it be possible to add an example link so we could just check how good this one is…
Thanks !


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#4 2006-01-25 10:21:39

wanni
Archived Plugin Author
Registered: 2005-11-11
Posts: 32

Re: [plugin] [ORPHAN] wan_pdf

@hablablow:
If you follow the link on textpattern.org, you will find an example. But I will add a link at textpattern.org, thaks for this suggestion.

Original article
PDF version

@RenJonsin: I wrote you an email. You could try to set production status to “debug” and post if there are any error messages or warnings.

Last edited by wanni (2006-02-23 10:13:39)

Offline

#5 2006-01-25 10:32:41

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: [plugin] [ORPHAN] wan_pdf

Thank you for the link.
Did you try to add one or many images to it ?


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#6 2006-01-25 10:46:08

wanni
Archived Plugin Author
Registered: 2005-11-11
Posts: 32

Re: [plugin] [ORPHAN] wan_pdf

Yes, and it works.

Offline

#7 2006-01-25 10:51:38

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: [plugin] [ORPHAN] wan_pdf

Nice…


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#8 2006-01-25 12:20:49

ChrisJ
Member
From: Vienna, Austria
Registered: 2004-03-30
Posts: 54
Website

Re: [plugin] [ORPHAN] wan_pdf

> RenJonsin wrote:

> THis makes a title and link for the file but the status shows as “missing” on the list.
I’m using v4.03 Rev.1228.

Confirmed, same for me.
I love the idea and simplicity of this plugin.

Offline

#9 2006-01-25 12:40:14

wanni
Archived Plugin Author
Registered: 2005-11-11
Posts: 32

Re: [plugin] [ORPHAN] wan_pdf

Currently I’m using r1188 I will update this evening and check if I can reproduce and fix the error. Thanks for testing and response.

Offline

#10 2006-01-25 14:48:05

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] wan_pdf

Error is produced due to wrong usage of path names in your plugin.

Please use common txp global vars to access tmp and files directory.

Offline

#11 2006-01-25 15:09:16

Alex McKee
Member
From: Gloucester, UK
Registered: 2005-12-17
Posts: 59
Website

Re: [plugin] [ORPHAN] wan_pdf

awesome!

Offline

#12 2006-01-25 16:41:02

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] wan_pdf

Found another error:

When generating a pdf from utf-8 charset, some chararcters may possible be messed up. (That’s for example the case when using german umlaute)

To ensure that everything goes right, replace

<code>

fwrite($file, $xhtml_header.”<h1>”.$thisarticle[‘title’].”</h1>\n”.$thisarticle[‘body’].”</body></html>”);

with

fwrite($file, utf8_decode($xhtml_header.”<h1>”.$thisarticle[‘title’].”</h1>\n”.$thisarticle[‘body’].”</body></html>”));

and

define(‘X_NAME’, $sitename); define(‘X_TITLE’, html_entity_decode($thisarticle[‘title’]));

with

define(‘X_NAME’, utf8_decode($sitename)); define(‘X_TITLE’, html_entity_decode(utf8_decode($thisarticle[‘title’])));

</code>
<br />
<br /><h1>And finally: THANK YOU FOR THIS NICE PLUGIN!!!</h1>

Last edited by chriloi (2006-01-25 16:45:13)

Offline

Board footer

Powered by FluxBB