Textpattern Forum

You are not logged in. Register | Login | Help

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

marios
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
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

#85 2006-03-28 19:02:43

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

Re: [plugin] [ORPHAN] wan_pdf

Hi Wanni,

Just wanted to check back with you about the code snippet for including custom-fields. I think I’ve got everything else working perfectly. This plug-in could really change our whole work flow…Thanks again for the great work.

Cheers,

Tom

Offline

#86 2006-03-28 22:28:32

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

Re: [plugin] [ORPHAN] wan_pdf

Hi Tom (and the others of course),

I just forgot the custom field thing and all that, I have to submit my diploma thesis tomorrow, so I ran out of time the last days. Sorry for that, but I will post the snipplet tomorrow (I’ll promise).

Cheers,

Martin

Offline

#87 2006-03-28 22:37:36

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

Re: [plugin] [ORPHAN] wan_pdf

Martin,

Yikes! Diploma Thesis.
No worries at all…take your time…best of luck.

Cheers,
Tom

Offline

#88 2006-04-02 10:18:20

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

Re: [plugin] [ORPHAN] wan_pdf

@wmike: I think, you don’t produce valid XHTML, so try to enter debug-mode, take the temporary html-file and put it into the validator .

@renobird: So here is the solution with the custom fields:

Go into the plugin source code and search for

<code>// change image-urls to http://… </code>
<code>$excerpt = str_replace(‘<img src=”/textpattern’, ‘<img src=“http://’.$prefs[‘siteurl’], $excerpt);</code>
<code>$body = str_replace(‘<img src=”/textpattern’, ‘<img src=“http://’.$prefs[‘siteurl’], $body);</code>

and after that you plug in

<code>$c_field1 = safe_field(‘custom_1’,‘textpattern’,‘id = ‘.$thisarticle[‘thisid’]);</code>

Of course you have to replace “custom_1” with the number of the custom field you want to insert. And I also recommend to change the name of the variable regarding to the custom field.

So we got our custom field, we only have to put it into the template. Some lines below you find

<code>fwrite($file, $xhtml_header.”<h1>”.$title.”</h1>\n”.$excerpt.$body.”</body></html>”);</code>

Change this line to put the content of the custom field where you like. Just a little example: In custom field 1 you store the name of the author manually and you want to put this information below the headline, you have to replace this line with

<code>fwrite($file, $xhtml_header.”<h1>”.$title.”</h1>\n”.”<p>Author: “.$c_field1.”</p>\n”.$excerpt.$body.”</body></html>”);</code>

I hope, this will help you.

Last edited by wanni (2006-04-02 10:30:32)

Offline

#89 2006-04-02 14:31:01

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

Re: [plugin] [ORPHAN] wan_pdf

Hi,

I do create valid code – I take great care to do so & validate all my pages before uploading them – the plugin seems to be pointing to directories that do not exist.

Note. Textpattern renames all images so that they follow a nubered sequence – ie 2.jpg, 3.jpg etc – I don’t know if this is relevant.

Cheers!

Mike

Offline

#90 2006-04-03 14:33:10

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

Re: [plugin] [ORPHAN] wan_pdf

Wanni,

Many, Many Thanks! I’m going to give it a go now.
I’ll send you a link once the site is completed…so you can see all your hard work in action. : )

Cheers Mate.

Tom

Offline

Board footer

Powered by FluxBB