Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2006-01-30 17:28:37

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [plugin] [ORPHAN] wan_pdf

> chess wrote:
> 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.

You opened my mind. In the previous articles I set the textile off (not in preference, but in advanced options), because I was redoing a static site. So I tried to write a brand new article with textile on.

And now what I get is a pdf with correct name, correct title in header, AND correct title in page but… no body at all! The rest of the page is still blank.

A little step forward (I get the title in page…), but still I can’t get the whole thing working. What settings may affect the plugin? Maybe some other options.

And is impossible to have the plugin working when textile is turned off?

I continue anyway to have the tag error alert I already posted…

Z-

Offline

#50 2006-01-30 22:49:29

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

Re: [plugin] [ORPHAN] wan_pdf

So first of all, thanks for testing my plugin. I did some experiments and I can confirm that it only works, if textile is on. I’m not so deep in textpattern, so I will have to analyze what is different when textile is on or off. But of course, this plugin will work with textile off soon.

@doggiez: Please download xhtml2pdf.zip once again. I did some changes, so the thing with X_TITLE should work. I can’t reproduce the image issue. I tried Textile image tag, <txp:upm_image /> and html image tag and everything worked fine. Article images are not included yet, but for me image tags in the body work fine.

The alerts in debug mode are normal, I will search where it comes from, but for the moment it shouldn’t bother you.

Offline

#51 2006-01-31 07:14:28

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] wan_pdf

I did some experiments and I can confirm that it only works, if textile is on.

It does not work with texile on for me. ;)


Nico

Offline

#52 2006-01-31 07:43:03

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] wan_pdf

OK, I got it !

When I create an article with only “test” in the body and excerpt, it works. If I had some common non ASCII characters like “$” it’s still working.

If I add a single “é” (or any accent character) somewhere in the body : doesn’t work anymore.
It is the same for the excerpt.

It’s a language issue… :(

Last edited by Niconemo (2006-01-31 07:44:13)


Nico

Offline

#53 2006-01-31 07:46:24

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] wan_pdf

No, I don’t think so… I had it working for articles in Portuguese, lots of accented characters there ;)

Offline

#54 2006-01-31 08:02:32

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] wan_pdf

Though I have to confirm the issue… :|
It does not work for me neither with french nor portuguese accent…

Something is missing in my puzzle, it seems.

I’m just tesing. I dont need this plugin for the moment so it is not a problem for me. ;)

Last edited by Niconemo (2006-01-31 08:29:42)


Nico

Offline

#55 2006-01-31 08:24:59

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] wan_pdf

OK. This time I may have the whole puzzle !

It’s working now for me with any character but only with PHP 4 (4.3.11)
I was running PHP 5.

Last edited by Niconemo (2006-01-31 08:30:54)


Nico

Offline

#56 2006-01-31 09:21:18

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [plugin] [ORPHAN] wan_pdf

> Niconemo wrote:
> OK. This time I may have the whole puzzle ! It’s working now for me with any character but only with PHP 4 (4.3.11) I was running PHP 5.

It’s quite – not exactly – the same for me!
No body when using php 5 (both textile on or off).

It’s working even with accented chars with php 4 ( 4.4.2) with textile on. Anyway, some non ascii character (ok in the unicode html charset) are turned to ?, even some apostrophes.

But it’s not working at all (php4 or php5) when textile is turned off, even for the single article.

So there are different issues:

1. to understand why it only work when textile is on, at least with php 4.4.2;
2. to understand why it doesn’t work with php5
3. to understand, anyway, how to proof-convert unicode charachters to really have reliable pdf versions of articles.

Hope this help!

Bye-

Z-

PS: to test php 4.4.2 and 5 i use MAMP on mac, that is really easy to install:

http://www.wilshireone.com/article/150/developing-on-a-powerbook

Offline

#57 2006-01-31 16:41:13

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] wan_pdf

wanni wrote:

@doggiez: Please download xhtml2pdf.zip once again. I did some changes, so the thing with X_TITLE should work.

That’s right, thanks.

I can’t reproduce the image issue. I tried Textile image tag, <txp:upm_image /> and html image tag and everything worked fine. Article images are not included yet, but for me image tags in the body work fine.

Still not working. I tried <txp:image />, the Textile image tag, and the html image tag.

There is another strange thing though. I don’t understand it, but I’ll tell what happens just in case someone can make sense of it.
The site is in a subdomain, so I put the xhtml2pdf folder in site.com/subdir/textpattern/lib/. The first time I activated the plugin, I got an error message for every page that displayed an article with the article form that contains <txp:wan_pdf />. So I also put the xhtml2pdf folder in the root’s /textpattern/lib/ (it’s a different TXP install). Then it started working (with the exception of articles with images). Now I can remove the xhtml2pdf folder from the root’s install, or leave it there, it doesn’t make a difference, everything keeps working. There is only a difference in the errors that I get when I want to open a page with an article with images:
When xhtml2pdf is only in the subdomain’s install, it’s
Fatal error: Cannot instantiate non-existent class: xhtml2pdf in /home/virtual/site87/fst/var/www/html/casadonamaria/textpattern/lib/txplib_misc.php(459) : eval()'d code on line 106
When it’s also in the root’s install, I see this:
FPDF error: Missing or incorrect image file: /home/virtual/site87/fst/var/www/html/textpattern/lib/xhtml2pdfb2a27527896fb08494f3cd7e3ef75f37_tmp.jpg

And one other thing: out of the twelve pdf files that are generated until now, three of them have a “1” between the article title and the body. Example (original page). Exactly the same articles (only different language) don’t have it (original page).

(I have now deactivated the plugin until I know how to get rid of the errors.) Oh, and PHP version: 4.3.8.

Offline

#58 2006-02-07 10:21:02

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

Re: [plugin] [ORPHAN] wan_pdf

@Zanza: Thanks for testing and for your summary.

So there are different issues:
1. to understand why it only work when textile is on, at least with php 4.4.2;
2. to understand why it doesn’t work with php5
3. to understand, anyway, how to proof-convert unicode charachters to really have reliable pdf versions of articles.

ad 1. I will work on this topic, I think the point is that no valid xhtml is produced when textile is off. But this should not be so difficult to implement a switch if textile is on or off.

ad 2. That is very strange, on my website it works with php 4.3.8 but on my localhost it also works with php 5.1.1 (with apache 2). So if anybody got this plugin working with php 5 please give a ping in this thread.

ad 3. If anybody has an idea how to do this, please help me :)

Offline

#59 2006-02-07 10:25:05

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

Re: [plugin] [ORPHAN] wan_pdf

@doggiez: Did you turn textile on? The image-thing is strange. I think, in the next version I will implement a debug-switch, so that the temporary xhtml-file is not deleted and one can look, if the error occurs when producing the pdf or the xhtml file.

Offline

#60 2006-02-07 11:35:44

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] wan_pdf

Yes, I have Textile on for everything.

Also, I thought about this:

FPDF error: Missing or incorrect image file: /home/virtual/site87/fst/var/www/html/textpattern/lib/xhtml2pdfb2a27527896fb08494f3cd7e3ef75f37_tmp.jpg

Shouldn’t there be a slash after xhtml2pdf?

Last edited by doggiez (2006-02-07 11:38:36)

Offline

Board footer

Powered by FluxBB