Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#31 2006-01-28 15:03:53
- wanni
- Archived Plugin Author
- Registered: 2005-11-11
- Posts: 32
Re: [plugin] [ORPHAN] wan_pdf
Puh, I don’t have any idea. I don’t think it depends on the port but maybe it’s the PHP-version. So what version do you have? I’m a little busy at the moment, but I hope, I can check this until tomorrow evening. I just used xhtml2pdf and didn’t go into details. But I will have a look at it.
Offline
Re: [plugin] [ORPHAN] wan_pdf
It looks like xtml2pdf only supports png and jpg images since I get the error “FPDF error: Unsupported image type: gif” AND ONLY THE ERROR on any page with a gif image.
I searched the internet and that seems to be pretty widespread. The solution always is to use only jpeg and png images which really isn’t a solution at all.
If anyone knows of a solution, that would be very welcome since this is an excellent application otherwise.
Offline
#33 2006-01-28 21:31:02
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] wan_pdf
Thanks for this great plugin! I’m having a few problems though.
- For articles with an image that is called with
<txp:article_image />in the article form, the image is not in the PDF. But I think I can solve that by adding an image tag in the article body. Am I right? - This one is more serious: this site is in three languages, so every article is there three times. Some of the articles have the same title in every language (the url-only title is different, but the plugin seems to look at the title). So if for one article the PDF is created, it won’t happen again for the other two, and the download links are empty. I really can’t change the titles. Is there a way to solve this?
- In debugging mode, I get the following errors (the last one probably because of #2):
<pre><small>An error occurred in the following tag: < txp:wan_pdf name=“PDF” /> -> Notice: Undefined index: rights on line 340
An error occurred in the following tag: < txp:wan_pdf name=“PDF” /> -> Notice: Undefined index: STYLE on line 168
(this line 10 times)
An error occurred in the following tag: < txp:wan_pdf name=“PDF” /> -> Notice: Undefined index: author on line 78
An error occurred in the following tag: < txp:wan_pdf name=“PDF” /> -> Textpattern Error: Duplicate entry ‘Casa Dona Maria.pdf’ for key 2
insert into `txp_txp_file` set filename = ‘Casa Dona Maria.pdf’,
category = ‘article_pdf’,
permissions = ‘’,
description = ‘21_93312787525ba143ce3b4e792106fee3’
on line 61</small></pre>
(Note: I added the spaces in the tags)
Last edited by doggiez (2006-01-28 21:37:28)
Offline
#34 2006-01-28 21:53:23
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] wan_pdf
Oh, and do I have to add something to the stylesheet to display tables properly?
Offline
#35 2006-01-29 16:02:50
- wanni
- Archived Plugin Author
- Registered: 2005-11-11
- Posts: 32
Re: [plugin] [ORPHAN] wan_pdf
I just released version 0.2. You have to download the modified xhtml2pdf.zip
Offline
#36 2006-01-29 16:14:41
- wanni
- Archived Plugin Author
- Registered: 2005-11-11
- Posts: 32
Re: [plugin] [ORPHAN] wan_pdf
@doggiez: I didn’t get tables working. There is table-support in FPDF but I think parsing in xhtml2pdf doesn’t work properly. It would be great if anyone had a solution.
problem 1: this should not be a problem, i only have to include the article image to the pdf or you put an image tag in the body.
problem 2: is solved in current version
problem 3: you are right, the last message comes from problem 2, the other warnings can be ignored in my opinion
@RenJonsin: You are right, fpdf only supports png and jpg, so unfortunately there will be no solution until it is implemented in fpdf
@Zanza: Mystirous. I can’t reproduce this. Is the pdf written to the files-directory an what name does it have?
Last edited by wanni (2006-01-29 16:18:40)
Offline
#37 2006-01-29 19:53:57
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] wan_pdf
problem 2: is solved in current version
Thank you!!
Offline
Re: [plugin] [ORPHAN] wan_pdf
Thanks for adding all these feature, Wanni. Truly excellent plugin! Thank you for your hard work.
Offline
Re: [plugin] [ORPHAN] wan_pdf
> wanni wrote:
@Zanza: Mystirous. I can’t reproduce this. Is the pdf written to the files-directory an what name does it have?
I’m still in 1.0version: the pdf is written, but is empty (it has only the site name in the header, but it doesn’t have the title nor the contents: like if all the data aren’t parsed). The name, that should come from the title, is empty.
I suspect the problem is in the lack of parsing of all document data: could it be due to paths problem? The procedure seems to work, it’s only the data lacking.
Php both 4 and 5, so I don’t think the issue have to to with php version.
I’ll give a try to 2.0, but I think the problem is somewhere in the paths.
Z
Offline
Re: [plugin] [ORPHAN] wan_pdf
I tried 2.0, no success. Files with empty title, without body or any data are created. Could be something in the way the lib calls the data from the db? Path, or maybe some setting in this…
Z-
Offline
#41 2006-01-30 10:45:34
- wanni
- Archived Plugin Author
- Registered: 2005-11-11
- Posts: 32
Re: [plugin] [ORPHAN] wan_pdf
Strange, very strange. I only used the global variable $thisarticle. Did you try if there is any output in debug-mode? What textpattern version do you use?
Offline
Re: [plugin] [ORPHAN] wan_pdf
I have 4.03. After passing in debug mode, I can’t get file to download. It opens in a blank page. I’m trying to output the $thisarticle array in your plugin, but i get nothing.
When I echo $rs array during the check of pdf existance, I get:
1_e5988669cbddf8a508ec936bf5a20320_.pdf
The article id isn’t 1.
I can’t understand what I’m doing wrong, or what’s the problem…
Z-
Offline
Re: [plugin] [ORPHAN] wan_pdf
Okay, I made some steps ahead. My error: I was putting the wab_pdf tag in page template, not in article form… Sorry.
Now I get the correct title link and correct title for the file. The header is filled with sitename and title of article, but… body is empty! No body, no excerpt, nothing. 1 blanck page.
The more, I get the following messagges in debug mode:
<code>
tag_error <txp:wan_pdf name=“scarica questo articolo in pdf” /> -> Notice: Undefined index: rights on line 340
tag_error <txp:wan_pdf name=“scarica questo articolo in pdf” /> -> Notice: Undefined index: STYLE on line 168
tag_error <txp:wan_pdf name=“scarica questo articolo in pdf” /> -> Notice: Undefined index: STYLE on line 168
tag_error <txp:wan_pdf name=“scarica questo articolo in pdf” /> -> Notice: Undefined index: STYLE on line 168
tag_error <txp:wan_pdf name=“scarica questo articolo in pdf” /> -> Notice: Undefined index: STYLE on line 168
tag_error <txp:wan_pdf name=“scarica questo articolo in pdf” /> -> Notice: Undefined index: author on line 108
</code>
I have the last version of plugin and css…
Z-
Last edited by Zanza (2006-01-30 15:20:43)
Offline
Re: [plugin] [ORPHAN] wan_pdf
It looks like if you turn off Textile and set the advanced options to “convert linebreaks” then you get a blank article. The title is there but the body is blank.
Offline
Re: [plugin] [ORPHAN] wan_pdf
What is also strange is that certain characters, like a dash —, or a double quote, “”, are turned into question marks in the pdf.
Offline