Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2006-02-26 18:55:44

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

Re: [plugin] [ORPHAN] wan_pdf

Don’t have much time to test but following each step of all this… I’m sure several people in the Txp community would just tell you the same: thanks guys for doing all this…


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

Hablablow + Webdesignofficina

Offline

#74 2006-03-07 14:12:37

Antz
New Member
From: Belgium
Registered: 2006-03-07
Posts: 2
Website

Re: [plugin] [ORPHAN] wan_pdf

Hi folks,

I’ve got little problem with the plugin, as you can see what happen when adding a <txp:wan_pdf /> tag to an article (debug mode):

bq. tag_error <txp:wan_pdf class=“pdflink” name=“Telechargez nos tarifs au format PDF” /> -> Notice: Undefined index: body<br /> tag_error <txp:wan_pdf class=“pdflink” name=“Telechargez nos tarifs au format PDF” /> -> Notice: Undefined index: excerpt<br /> tag_error <txp:wan_pdf class=“pdflink” name=“Telechargez nos tarifs au format PDF” /> -> Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/php/ufpdf.php) is not within the allowed path(s): (/home/mywebsite.com/)<br /> tag_error <txp:wan_pdf class=“pdflink” name=“Telechargez nos tarifs au format PDF” /> -> Warning: main(ufpdf.php) [function.main]: failed to open stream: Opération non permise<br /> tag_error <txp:wan_pdf class=“pdflink” name=“Telechargez nos tarifs au format PDF” /> -> Warning: main() [function.include]: Failed opening ‘ufpdf.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’)<br /> Fatal error: Class ‘UFPDF’ not found in /home/mywebsite.com/textpattern/lib/xhtml2pdf/classes/extendedfpdf.php on line 8

I checked for the open_basedir restriction. There is no problem: I can include one file from one other without any problem, in any folder. I also checked files permissions, it’s ok for reading any class file.

Do you have any idea about where I could find the solution to these errors? :\

Offline

#75 2006-03-08 10:00:26

Antz
New Member
From: Belgium
Registered: 2006-03-07
Posts: 2
Website

Re: [plugin] [ORPHAN] wan_pdf

Ok it’s allright now, I’ve found the solution to my problem.

I modified include_once() call in extendedfpdf.php and ufpdf.php. They were looking like this:

include_once(‘ufpdf.php’); // in extendedfpdf.php
include_once(‘fpdf.php’); // in fpdf.php

And I had to change this to:

include_once(X_PATH_CLASS.’/ufpdf.php’); // in extendedfpdf.php
include_once(X_PATH_CLASS.’/fpdf.php’); // in fpdf.php

Now everything works fine. Thanks for this useful plugin, Martin :)

Offline

#76 2006-03-15 15:58:32

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [plugin] [ORPHAN] wan_pdf

Thanks for the great plug-in…I was hoping something like this would come along.

Feature request: Custom-Fields

I have a site that uses 5+ custom fields in the articles. Is there a way to include that content in the PDF? Even if I have to hardcode the custom-field names into the plug-in.

Thanks Again.

Tom

Offline

#77 2006-03-16 10:09:16

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

Re: [plugin] [ORPHAN] wan_pdf

I don’t think it is good to include custom-fields, because they are too “custom”. What I want to say is that everyone using custom-fields has another reason for doing this and wants to place the content of the custom-field at another place, eg. user1 wants to place custom-field1 before the exerpt and field2 after the text, user2 wants this vice versa.

But I can post a code snipplet that you can manually insert into the plugin source-code so that erveryone using custom-fields can place it wherever he/she likes. But this requires basic PHP- and HTML-knowledge.

Offline

#78 2006-03-16 16:13:53

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [plugin] [ORPHAN] wan_pdf

Thanks for the quick reply.

The code snippet for custom-fields would be great!

Thanks again for the great work.

Cheers,

Tom

Offline

#79 2006-03-19 01:07:41

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: [plugin] [ORPHAN] wan_pdf

I had the same error complaining the plugin that it didn’t find a xhtmlpdf in lib.
(Server is Textdrive, so they have php5)
However, removing the tag from an article form and using in an article did work,
I created a test article, with textile on.=worked
I switched textile off,=worked
I inserted an artilce image=worked
I tested once more in an artilce form worked,

BUT: For very complex articles that have lot’s of complex markup with cite, code, strong lists etc,
The link is there but the pdf file is empty,no output.
You can see it here on Mike Purvis article(That’s the second article from top,textile is of course switched off.
(May be, it is because the article has tables inside?)

EDIT..: Non-ASCII does not work,(I have everything in UTF-8 including page encoding)

regards, marios

Last edited by marios (2006-03-19 03:19:43)


⌃ ⇧ < ⌃ ⇧ >

Offline

#80 2006-03-23 11:40:35

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

Re: [plugin] [ORPHAN] wan_pdf

Hi marios,

there is currently no table support in xhtml2pdf. But I wonder why the article is empty then.

Do I understand you right, with PHP5 everything (for simple articles) worked if you put the tag directly into the article and not in the article form? Very interesting. I just changed my webhost and the new one has PHP5 enabled so I hope I have some time to check the PHP5 compatibility.

More and more I am confessed, UTF8 is hell (or I am too stupid).

Offline

#81 2006-03-23 20:18:20

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: [plugin] [ORPHAN] wan_pdf

You can see it here . Sroll down to the last article, you will see, there are “two” pdf links.
That’s the only dummy article that allso has a wan tag inside an article, while all the others have the wan tag in an article form.

reg.php5:, that’s what Textdrive Servers run as default AFAIK, mysql4.1.13 and php5,unless you use your own php.ini. (don’t know which version, because running php.info in webmin is not allowed).

Allways, I do everything in UTF-8, so all the page headers reflect that, and the database collation as well.
Now regarding this localization problem.
If I wanted to make this work in UTF-8 for character ranges outside of ASCII/ANSI whatwould be the best
way to go?
Am i right to assume that I have to find or generate the appropraiate font files with the glyps I need ?

(EDIT.: Nelson is down again for a reboot)

regards, marios

Last edited by marios (2006-03-23 23:00:22)


⌃ ⇧ < ⌃ ⇧ >

Offline

#82 2006-03-24 01:21:48

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: [plugin] [ORPHAN] wan_pdf

I still can not make any sense out of this, but I believe that it is a font issue, so in order to have support for the characters that are outside the ascii range , that you have to add the missing glyps in the php font files, needed unfortunately, in order to do so are some utilities, that need to be compiled first and AFAIU yeou need Darwin Ports for this.
(The whole concept used though is not a real UNICODE thing anyway, it’s a mapping story that fakes UNICODESupport,)
Anyway , seems overwhelmingly comples to go to make your own font files and mappings,
I whished, they would be available somewhere for download, but it doesn’t seem like that.

But , wanny, really great plugin works great,

regards, marios

Last edited by marios (2006-03-24 01:22:48)


⌃ ⇧ < ⌃ ⇧ >

Offline

#83 2006-03-24 09:31:03

wmike
Member
Registered: 2006-01-03
Posts: 44

Re: [plugin] [ORPHAN] wan_pdf

Hi All,

I’ve been trying to get this excellent plugin to work with not luck – I get the following:

tag_error <txp:wan_pdf/> -> Warning: getimagesize(/home/sites/wrightplace.co.uk/public_html/textpattern/lib/xhtml2pdf/images/57.jpg): failed to open stream: No such file or directory on line 215

tag_error <txp:wan_pdf/> -> Warning: getimagesize(/home/sites/wrightplace.co.uk/public_html/textpattern/lib/xhtml2pdf/images/57.jpg): failed to open stream: No such file or directory on line 254

tag_error <txp:wan_pdf/> -> Warning: getimagesize(/home/sites/wrightplace.co.uk/public_html/textpattern/lib/xhtml2pdf/images/57.jpg): failed to open stream: No such file or directory on line 901

tag_error <txp:wan_pdf/> -> Warning: getimagesize(/home/sites/wrightplace.co.uk/public_html/textpattern/lib/xhtml2pdf/images/57.jpg): failed to open stream: No such file or directory on line 1515

FPDF error: Missing or incorrect image file: /home/sites/wrightplace.co.uk/public_html/textpattern/lib/xhtml2pdf/images/57.jpg

Note – textile is on – as far as I can see the directory listed above doesn’t exist ie the’/images’ bit.

Any suggestions, please.

Cheers!

Mike

Offline

#84 2006-03-24 10:10:05

wmike
Member
Registered: 2006-01-03
Posts: 44

Re: [plugin] [ORPHAN] wan_pdf

Hi,

Further to last.

Tried with just a text article – opens a pdf with just the first paragraph – the rest of the article is missing.

The image problem remains.

So:

1. whole article does not get to pdf
2. images break it!

Cheers!

Mike

Offline

Board footer

Powered by FluxBB