version: 0.3
This Howto will show you how you can have all of your WordPress content in a high quality PDF file. There is a default template based on “Kubrick”, but you can also have it totally customized and with a beautiful, taylored layout. This labor is done by the ContuttoPDF plugin. If you want to see how the plugin works, press the PDF button on the sidebar on any contutto.com page. The plugin and the included templates are Free Software under the GNU GPL.
Overwiew
Preface
With the ContuttoPDF plugin, you will be able to offer your visitors a full featured PDF. The PDF creation and rendering is done by DOMPDF which again is based on the R&OS PHP PDF class. My work has mostly been to integrate these nice packages into WordPress.
Installing the ContuttoPDF plugin
Download
- as .tar.bz2 archive (270.0 kB)
Please consider coming back for a donation. You’ll support our efforts and receive a backlink.
Have problems unpacking archives? Try the latest 7zip.
- Download the ContuttoPDF plugin.
- Unpack it with a bzip2 unpacking tool (e.g. 7zip).
- Upload the folder
pdf-themesto yourwp-content/directory. - Upload the folder
contuttopdfto yourwp-content/plugins/directory. - Important: Change the permissions of the directory
wp-content/plugins/contuttopdf/dompdf/lib/fonts, so that it is writable by the web server. - Go to your Plugins page. In the description text for the ContuttoPDF plugin, click on “compatibility test”.
- If all requirements are met and the generating of the demo page works, you can activate the plugin.
- Now put a PDF button on your page with
<?php contutto_pdfbutton(); ?>somewhere in your template. Instead of a button, you can also have a text, with something like<?php contutto_pdfbutton('This page as PDF'); ?>. You can apply CSS styling to the anchor via itsid="pdfbutton".
If for any reason it doesn’t work, please let us know and leave a message. Most problems can be solved, no need to give up!
Upgrading from previous versions
If your previous version works fine and you’re happy with it, there’s no need to upgrade. But if you insist, proceed as follows:
- Go to the Plugins page in your admin panel and deactivate the ContuttoPDF plugin,
- Delete the directory
wp-content/plugins/contuttopdf, - Install the new version as described above.
Enhancing PDF generating
Now that you’re proud member of the Contutto club, you may want or need to tweak your PDF generating a bit.
It may be that you want to provide different content for screen and print/PDF. ContuttoPDF provides a filter that will select the appropriate content depending on the output media. All you have to do is the following: Put all you screen-only content into [screen][/screen] tags, and all your PDF-only content into [print][/print]tags.
Another good news: DOMPDF supports inline PHP in order to access its classes and functions directly. For example, if you want to add your own document properties, let the following appear in your HTML:
<script type="text/php">
if ( isset($pdf) ) {
$pdf->add_info(array(
'Title'=>'My blog rocks!'
,'Subject'=>'Yet another you-know-what'
,'Author'=>'El Leeto'
,'Creator'=>'The ContuttoPDF Generator' // ;-)
,'CreationDate'=>date('d.m.Y')
));
}
</script>
You can also beautify your PDF with own fonts. You can have any TrueType font you want! Have a look at the ContuttoMSfonts Howto for that.
If you want to customize the PDF template, you’ll find valuable information in the advanced tutorial.
If you can, give PHP more ressources - rendering PDFs is hard work.
Especially the memory_limit parameter should be significantly increased. Another good idea might be to install eAccelerator. I think it made my PDF rendering about 20% faster. (But this might as well be a Placebo effect on my part.)
What else?
If you find bugs in DOMPDF or the R&OS class, please report them to their authors. If you got problems modifying your template (especially while following the advanced tutorial), please go to the sf.net forum of DOMPDF. If you have questions on this Howto, or you want to report bugs/enhancements, you’re welcome to discuss them below.
That’s it! Have a lot of fun with the Advanced Search plugin!
In case you need individual, advanced support: Contutto also provides professional support for this software and its integration on your website (as well as WordPress support in general). Please don’t hesitate to contact us and ask about our services.
Thank you very much for using ContuttoPDF!


Dirk on September 20, 2006 at 22:15 #
Hallo,
die Demo hat mich ziemlich begeistert und dank deiner Hilfe habe ich das plugin auch einbauen können. Nur mit der Ausgabe hapert es …
Ich erhalte folgende Fehlermeldung:
Parse error: parse error, unexpected T_NEW in /www/htdocs/XXXXXXX/quina/wp-content/plugins/contuttopdf/include/functions.inc.php on line 240
LG Dirk
Alex Günsche on September 20, 2006 at 23:11 #
Hallo Dirk,
Unfortunately, the error message doesn’t sound familar to me. But if you’re trying to install the plugin on http://www.gonzo-und-zuzia.de/quina, it might be because your host has only PHP 4.x. The ContuttoPDF plugin is based on DOMPDF which requires PHP 5.
derjazz on September 24, 2006 at 13:27 #
also ich habe einen fehler aber schau selbst
Parse error: syntax error, unexpected T_NEW in /www/htdocs/finden/page/wp-content/plugins/contuttopdf/include/functions.inc.php on line 240
http://www.findundspar.de
Alex Günsche on September 24, 2006 at 14:08 #
Same problem as above: You have PHP4, while ContuttoPDF requires PHP5. Sorry.
BillSaysThis on October 9, 2006 at 21:16 #
Are you planning to add the ability to export an entire blog and/or category as PDF to this plugin? If not, do you have a suggestion for an alternative tool?
Thanks!
Alex Günsche on October 10, 2006 at 01:05 #
Exporting a category is not a problem. Go to the category overview and push the button, some seconds later you’ll have your category in a PDF.
Same with the entire blog. Go to your main blog page (after you increased the number to display on the start page), and let the export run. Although, you might need a lot of memory reserved for PHP in your php.ini if you have many entries.
Hans Uwe Petersen on October 19, 2006 at 13:59 #
Installing of the plugin went OK, compatibility test OK, creating test PDF OK, placing code on page- and post-template OK, But when I click on the link to generate the pdf-page, acrobat-reader opens the page, but is only showing a strange content (som dot and question-marks).
Any hint? Thanks.
Alex Günsche on October 19, 2006 at 21:04 #
Hello Hans Uwe,
could you please give me a link to your blog and activate the plugin (don’t need to place the button). This way I could take a look at the problem.
Hans Uwe Petersen on October 19, 2006 at 22:53 #
Hello Alex.
You find the blog at: http://net.aba.dk/DreamFactories
I will activate the plugin, even though I in the meantime have set up “wp-print” as a way to give the users the possibility to print post, pages etc.
I have removed the code “” from the relevant template-pages.
Thanks for your help
Alex Günsche on October 19, 2006 at 23:01 #
You’re welcome.
Geez, that output looks weird, indeed.
What character set do you use? Or have you changed the template? It also might be one of your plugins… which do you use? (If you want to keep that confidential, you can also send me a mail via the contact form.)
Hans Uwe Petersen on October 19, 2006 at 23:38 #
I have activated the following plugins:
Advanced Search
ChenPress
FoldCategory List
Live
AJAXed Who’s Online
WP-Print
RS Event
WP-Contact Form
Google Search Widget
Sidebar Widgets
I use the Coffespot theme, which is sligthly modified.
Default character set is: ISO-8859-1
hup
Marcel on October 20, 2006 at 14:46 #
i have exactly the same problem described by Hans Uwe Petersen. Alex looked at my problem but couldn’t find a solution. i tried the default wordpress-install combined with the plugin. can it be a problem related to the latest wordpress version ?
Ikaruga on October 21, 2006 at 19:58 #
Wow, promising plugin! Unfortunately, I’m running into two problems:
(1) It runs fine on the Main Page, but whenever I visit a post or another page, I get the error message:
Fatal error: Unknown function: wp_get_current_commenter() in /home/worthyis/public_html/jovenes/wp-content/plugins/contuttopdf/contuttopdf.php on line 130
(2) I’m also running the TextControl plugin which allows you to use a Wiki-like syntax for editing. On posts that use that syntax, I get back the raw markup in the PDF instead of HTML:-(
Ikaruga on October 21, 2006 at 19:59 #
My apologies: I forgot to mention…I’m running the latest Wordpress 2.X if that helps. And the configuration page for this plugin passed all the tests.
Nicholas Orr on October 23, 2006 at 09:23 #
Works well.
I’m going to have tweak it a bit to make it fit the http;//www.getk2.com theme, not to worry shouldn’t be too hard
I think you need to update your instructions at the top, if you follow them its wrong…
Thanks for this, I tried to get WP2PDF working but that wouldn’t accept my TTF fonts. The new default fonts in Vista are hot and I want to use them.
Alex Günsche on October 23, 2006 at 12:03 #
Hello everybody.
Hans:
You say you have ISO-8859-1 as default charset. But your HTTP headers indicate UTF-8. Maybe you have wrong settings, or some plugin overwrites your charset setting. However, you (and Marcel) could try the automatic charset conversion functionality, which is implemented but deactivated by default. In line 65, change
$ctpdf_converttotrue. Please let me know if it helps.Ikaruga:
As for the textile: In the PDF template (
The function `wp_get_current_commenter()` is a standard WordPress function defined in `wp-includes/comment-functions.php`. If you get an error message that this function is not available, you seem not to have the latest version (which is 2.0.4 at the moment), or there is another exceptional problem that makes a core function vanish.
pdf.php), search for output which is drawn from the database. Then look into the Textile plugin which function is responsible for the parsing and conversion of the Textile Markup. Then simply apply this function to the output in the PDF template.Nicolas:
Could you please mention what exactly is “wrong”? This would allow me to correct it.
Glad you like it.
Btw, the new Vista fonts are (partially) stolen.
Marcel on October 24, 2006 at 11:52 #
i tried:
In line 65, change $ctpdf_convert to true. Please let me know if it helps.
still the same result:
-pdf created
-template shown
but no fonts
Marcel on October 24, 2006 at 11:59 #
sorry incomplete posting:
i get the same result. so the solution is unfortunately not working.
frizzy on October 28, 2006 at 16:49 #
Hi….apparently the zip file is damaged, at least I am unable to open it:
“error reading header after 0 entries”
using Winzip….any ideas?
Marcel on October 28, 2006 at 18:43 #
i read the new release of wordpress 2.05 and installed this in combination with cuntuttoPDF.
same problem
i’m pretty sure i have my userrights set ok. i even tried it with a local xampp-test. same result.
the test works ok
the pdf is generated
all i see is the template-file but no text (fonts)
Alex Günsche on October 29, 2006 at 22:53 #
frizzy,
please try 7zip. It’s free software and known to work.
Marcel,
I am afraid, I cannot solve your problem at the moment.
Mik on October 30, 2006 at 18:34 #
Hey Alex, great plugin!
I have one question - I’d like to generate only the content in the post, in plain form, and not the whole page/theme - how would I do that?
I’m using it on http://www.sunwords.com/?p=1
Thanx,
Mik.
Anton on October 30, 2006 at 18:40 #
Super Plugin! Bin ganz gail drauf.
Ich habe den compatibility Test erfolgreich durchgeführt und
das Test-PDF erfolgreich erzeugt.
Meiner achtens habe ich den Plugin correct installiert:
Upload the folder pdf-themes to your wp-content/ directory.
Upload the folder contuttopdf to your wp-content/plugins/ directory.
kriege aber folgenden Fehler:
** Fatal error: Please select a PDF template first! **
Das default Template is ja da! Was nun? Danke für Deine Hilfe.
Alex Günsche on October 30, 2006 at 19:03 #
Mik,
you need to modify the PDF template to customize your output. See the advanced tutorial.
Anton,
welche WordPress-Version benutzt Du? Es sollte mindestens 2.0.4 sein.
Falls Du 2.0.4 oder höher hast, gib mir bitte einen Link zu Deinem Blog.
Martin Daugaard Stevnhoved on October 31, 2006 at 23:34 #
Hi.
Really nice plug-in. Keep up the good work!
But I have a (for me - huge) problem with this plug-in.
When I activates it - it breaks the encoding on my weblog. So all the special danish characters becomes small squares.
Do you know what causes that?
Best Regards,
Martin Daugaard Stevnhoved
Blag: www.stevnhoved.dk
Alex Günsche on November 1, 2006 at 11:35 #
Hi Martin,
this is a known (still annoying) bug. The plugin has a filter to distinguish between print and screen contents. Unfortunately the very filter breaks international characters. (This doesn’t happen on my site, because I use a plugin to convert the German “umlauts” into HTML entities.)
If you don’t use the screen/print filter, the solution is quite simple. Open the file
contuttopdf.phpwith a text editor, and comment out (or remove) the lineadd_filter('the_content', 'contutto_filter');which you find at the vey bottom.Sönke on November 2, 2006 at 20:25 #
Hi Alex!
Hab leider das gleiche Problem wie Anton (** Fatal error: Please select a PDF template first! **). Benutze version 2.0.4. Wär super nett wenn du mal schaust.
Danke
XBA on November 8, 2006 at 09:29 #
hello, I’ve installed this plug in on a WordPress 2.0.5, but it wont render the pdf. when i click to the button, i have this message :
Fatal error: Call to undefined method PDFLib_Adapter::add_info() in ****/wp-content/plugins/contuttopdf/dompdf/include/php_evaluator.cls.php(66) : eval()’d code on line 26
Alex Günsche on November 8, 2006 at 11:25 #
Hi XBA,
do you have PDFlib installed and want to use it permanently? If so, you need to remove the function
add_info()from the filedompdf/include/cpdf_adapter.inc.php(at the very bottom). If you don’t want to use PDFlib, you need to setDOMPDF_PDF_BACKENDtoCPDFin the filedompdf/dompdf_config.inc.php.Muckel on November 11, 2006 at 11:54 #
Hallo,
ich habe oben gelesen, dass das plugin nur mit php5 arbeitet. Wo kann ich sehen, welche php-Version ich habe? Und wenn ich eine ältere habe, wie kann ich sie updaten?
Würde mich sehr freuen, wenn du mir helfen kannst.
Danke und ein schönes Wochenende,
Muckel
Alex Günsche on November 11, 2006 at 23:34 #
Hallo Muckel,
Wenn Du das Plugin in Deinen Plugin-Ordner kopierst, siehst Du es auf Deiner Plugin-Seite. Im Beschreibungstext findest Du einen Link zum Kompatibilitätstest, der unter anderem über Deine PHP-Version augibt.
Das muss Dein Hoster machen.
Simon Fodden on November 14, 2006 at 03:42 #
Hello Alex
I’m setting up a blog on my Mac; I’m running WP 2.0.5; and I installed your PDF plugin. However I get this message when I click the link: “Fatal error: Please select a PDF template first!” I haven’t been able to figure out from the above comments what to do in this case. Unfortunately, because it’s on my machine, you can get in to look yourself. Any help would be appreciated.
By the way, I’ve installed your advanced search plugin on my blog Slaw (http://www.slaw.ca) and like it very much. Thanks for that.
Cheers,
Simon
Alex Günsche on November 14, 2006 at 11:43 #
Hello Simon,
This is a problem I don’t have an actual solution for — at least at the moment. But what happens if you open
/wp-admin/options.phpand setctpdf_themeto the valuedefault?Simon Fodden on November 14, 2006 at 14:07 #
Hmm, that may be the problem: there’s no “ctpdf_theme” in options.php or an any of the files in my wp-admin directory. How should it have got there? Can I do something about it?
Thanks for your help, Alex.
Simon
Alex Günsche on November 14, 2006 at 15:39 #
What I meant was: If you open the page
/wp-admin/options.phpin your browser, do you see the entryctpdf_themesomewhere? If yes, what happens when you set it todefaultand try again to create a PDF?Simon Fodden on November 14, 2006 at 18:49 #
Yikes, I never knew there was such a page that I could open in my browser! How dumb am I! That solved the problem beautifully, Alex. Many thanks for the patient help — and for the plugin.
Cheers,
Simon
Alex Günsche on November 14, 2006 at 19:29 #
You’re welcome.
Maybe this “solution” helps the others, too.
Christopher Weidner on November 15, 2006 at 09:10 #
Hallo Alex!
Die Installation war wirklich leicht, auch dank der vielen Hinweise, die ich hier bekommen habe.
Leider ergibt sich bei mir folgendes Problem: nach dem Betätigen des PDF-Links erscheint nur eine leere Seite. Woran könnte das liegen?
Mein Blog liegt auf http://www.astrophoenix.de
Herzliche Grüße,
Christopher
Alex Günsche on November 15, 2006 at 11:33 #
Ich habe gesehen, dass Du den Link in den Loop eingebaut hast. Das ist eigentlich nicht Sinn der Sache; der Link gehört in die Seitenleiste außerhalb des Loops. Wie genau es zu der weißen Seite kommt, weiß ich nicht. Funktioniert es denn, wenn Du den Link in die Seitenleiste packst oder wenn Du alle anderen Plugins testweise deaktivierst?
Ansonsten: Hast Du den Kombatibilitätstest (Link in der Plugin-Beschreibung) gemacht? Könntest Du bitte Schritt für Schritt erklären, wie Du das Plugin installiert hast?
P.S. Es ist natürlich sehr wohl möglich, den PDF-Link im Loop zu haben, man muss nur folgenden Code einfügen:
<a href="<?phpthe_permalink();
echo '/?output=pdf'
?>">Diesen Artikel zum PDF verwursten</a>
Siehe auch Kommentar #44.
Christopher Weidner on November 15, 2006 at 13:35 #
Hallo Alex!
Vielen Dank für das Feedback!
Den Kompatibilitätstest habe ich gemacht - alle Voraussetzungen sind erfüllt. Ich habe im Grunde das Plugin genau nach Vorschrift installiert.
Die Positionierung außerhalb des Loops hat leider auch keine Veränderung gebracht.
Ich werde der Sache mit den Plugins nachgehen.
Erst einmal vielen Dank!
Grüße,
Christopher
Franck on November 16, 2006 at 11:00 #
Hi,
I have a BIG problem, when I activate your plugin all characters like éàç…ect are changed in my post by ??????
Any way to correct this beacause your plugins would be very usefull for my website, regards, Franck
PS: You can have a look on the website
Alex Günsche on November 16, 2006 at 18:54 #
Hello Franck,
this is indeed an annoying bug for non-English writers. In comment #26 on this page, there is a workaround described.
Simon Fodden on November 19, 2006 at 05:01 #
Hello again Alex
I wonder if I can come back for another question. Actually, it has two parts.
I just finished reading above that (I think you said) the tag was not meant to be used inside the loop, but rather in the sidebar. Is that right? Because I’ve put in the the postmetadata and it prints the page okay.
Which brings me to my main question: is there a way to print to pdf just the post the tag follows (in the postmetadata) rather than the whole page? I realize that if a reader uses the permalink and then prints the page, all they’ll get is that post. But I was trying to set up a situation where the reader might use just one click on the main page to send a single post to pdf.
Would such a thing be possible?
Cheers,
Simon
Alex Günsche on November 19, 2006 at 16:09 #
Hello Simon,
I’m glad you’re asking this question, because the answer is what I should have actually said about having the link inside the Loop.
It is absolutely possible, because the plugin simply outputs a PDF for the given URL, regardless of where the link is or which page you come from. You can accomplish it with some code like the following:
<a href="<?phpthe_permalink();
echo '/?output=pdf'
?>">Bake me a PDF from this article</a>
I have also corrected comment #39 regarding this issue.
Franck on November 21, 2006 at 13:59 #
Thanks a lot it works fine, very good job man!
Simon Fodden on November 21, 2006 at 23:27 #
Alex, you’re the greatest. Thanks a million.
Ananda on November 22, 2006 at 06:58 #
WOW! What an amazing plugin! This is something I’ve been hoping for for a while, and it does exactly what I expect it to!
One question I have though, is if there is a way to make it work with a footnotes plugin I am using, Footnotes 0.9. If there were a way to do that, it would be my dream come true!
Thanks a lot for the amazing work on this–I upgraded to WordPress 2.0.5 on my testing server, installed it, and it worked with no glitches at all….
Alex Günsche on November 23, 2006 at 10:02 #
Franck and Simon,
you are welcome.
I’m glad you have fun with the plugin.
Ananada,
I’ve taken a brief look into the Footnotes plugin. I wonder if it could be enough to open the PDF template
pdf.phpand change the partwpautop($post->post_content)toswas_footnote( wpautop($post->post_content) ). Would that work?Ananda on November 24, 2006 at 10:54 #
Alex,
Thanks for the suggestion. It certainly works as far as getting the footnotes to appear at the right place in the PDF, but I think I may have to make some changes to make them appear correctly–right now, they just show up at the bottom as an unordered list and the footnote numbers themselves show up as subscripts rather than superscripts.
Thanks again! If I succeed in this I’ll be sure to report back.
~ Ananda
Harald Walker on November 26, 2006 at 11:26 #
How about caching the generated PDF files for better performance. Unless the page or comments (if included in PDF) have changed, there is no reason to generate the pdf again.
I have the same problem with the strange/empty page as many before me. Are there already any other templates available? I will try to create one myself now.
Harald Walker on November 26, 2006 at 11:36 #
removing the Document meta data from the default template fixed the problems.
Alex Günsche on November 26, 2006 at 14:24 #
Hello Harald,
Caching would be a good idea, the problem is to determine if and when a page has changed. I have to admit, I wouldn’t know how to build a proper caching support for this plugin. I know however that there are plugins like wp-cache. Maybe this one could do the caching for you? I also could take a look into that plugin and possibly find some inspiration.
Regarding the fix of the blank pages problem: Which meta data do you exactly mean? All the metas from the
section?P.S.
You have a very interesting site… a friend of mine also lives vegane, I definitely have to give him a link to your site.
Michael on November 28, 2006 at 09:58 #
Hi Alex
PDF text generation works fine on my Wordpress 2.0.5 using Triple2K theme but if there is a picture (simple small jpg) in the post it is not shown in the PDF.
Whats went wrong?
Alex Günsche on November 28, 2006 at 11:17 #
It might be that you referenced the image with an absolute path. In this case, you should either remove the domain part so that you have a relative URI (
/path/to/image.pnginstead ofhttp.//example.org/path/to/image.png). Or you setDOMPDF_ENABLE_REMOTEtotrueindompdf/dompdf_config.inc.php. But be aware that this can be a security risk.Franck on November 30, 2006 at 15:37 #
Hi, I installed your plugin the compatibility test is working fine (http://road2fusion.com/wp-content/plugins/contuttopdf/ctpdf_check.php)n the testing pdf creation working fine too… So I put the code in my page template and I can see the link put when I am clicking onto it nothing happenned!!!!
You may have alook here:
http://www.road2fusion.com/?page_id=10
Alex Günsche on November 30, 2006 at 16:22 #
Hello Franck,
it appears that the
output=pdfis not interpreted by your WP installation. In order to determine the blocker, you should deactivate all plugins exept of ContuttPDF and you should choose another theme. Then try again. If it works, you can activate one plugin after another and try again each time. Finally, you can switch back to your current theme.Please let me know if it works and if you were able to identify the problem.
Franck on December 4, 2006 at 12:21 #
Hi Alex…
It is still not working!!!! I disabled all my plugins except ContuttoPDF and I selected an other WP theme but I always have the same problem when I click onto the “This pas ge as PDF” nothing happens!!!!!
I tested it before locally and it worked, but in an other website configuration! Regards, Franck
Franck on December 4, 2006 at 12:26 #
The thing that I can not explain is that the test page is ok and the printing of the test page works fine!!
http://www.road2fusion.com/wp-content/plugins/contuttopdf/ctpdf_check.php
Franck on December 4, 2006 at 15:58 #
Alex, My post 41 and your answer 42 may help you on a modification I did into your plugin, regards
Alex Günsche on December 5, 2006 at 17:51 #
Hi Franck,
I’m sorry, I don’t have a solution at the moment. I admit, everything looks ok, but I also can’t see why it won’t work.
Franck on December 5, 2006 at 18:38 #
There is no way to modify something to make it run as the test generation?
ovizii on December 6, 2006 at 19:24 #
hello,
my host did pass all tests, except, there is no mbstring installed and I have no root access…
any chance to get it running without mbstring?
the error I get right now is:
Fatal error: Call to undefined function mb_convert_encoding() in /home/sites/eagle-grup.com/public_html/wp-content/plugins/contuttopdf/contuttopdf.php on line 103
Alex Günsche on December 6, 2006 at 19:39 #
Yes, you can try deleting lines 102-104 from
contuttopdf.php.ovizii on December 6, 2006 at 20:26 #
http://www.eagle-grup.com/2006/12/06/hello-world/
have look here please, I get an error.
Alex Günsche on December 6, 2006 at 20:36 #
What error do you get? Please describe your problem precisely if you want to get support.
ovizii on December 6, 2006 at 20:47 #
sorry, I realized that later, I thought to post again, but did not want to clutter up your page.
The pdf opens but I get an adobe error, which I cannot copy, I try to write it down. it says:
adobe reader could not open the file because it is either an unsupported file or because the file has been damaged(for example it was sent by email and not decoded correctly.
I hope this helps you to help me
Alex Günsche on December 8, 2006 at 14:04 #
Well, I’ve taken a look and I see the error, but I can’t seem to put the finger on it.
Maybe you could try the debugging routine described on the advanced usage page and check what the actual output is.
http://www.fob-marketing.de/ on December 13, 2006 at 14:54 #
WordPress PDF-Plugins und UTF-8…
Kurznotiz: Für ein englisch sprachiges Projekt schraube ich gerade an einem neuen Wordpress-System herum. Für die Integration von PDF-Funktionalitäten bieten sich momentan 2 Plugins an:
Das WordPress (PDF) Plugin von Contutto (ContuttoPDF) sowie
da…
Detlef on December 14, 2006 at 12:06 #
Nachtrag wegen des Fehlers beim compatibility test:
Ist es möglich das der Fehler mit der nicht aktivierten ()exec Funktion auf dem Server zusammenhängt (da mygallery upload einer.zip datei auch nicht funktioniert und als fehler die nichtaktivierte ()exec Funktion Fehlermeldung zeigt.
Mein Provider meint aber leider:
so dass ich es nicht selber prüfen kann.
acg on December 14, 2006 at 14:09 #
hello all
a try to install this plug and i got this error message:
[quote]
Fatal error: Call to undefined function imagecreatetruecolor() in /wp-content/plugins/contuttopdf/dompdf/include/abstract_renderer.cls.php on line 132
[/quote]
whats wrong?
big tx to your respond if any…
wp ver. 2.0.5
plugin active: IM Online & wpbackup
tjusss…
acg
Alex Günsche on December 14, 2006 at 15:34 #
Detlef,
der eigentliche Fehler liegt bei Dir wohl darin, dass die XML-Erweiterung für PHP nicht installiert ist. Ohne diese Erweiterung funktioniert das Plugin definitiv nicht. Am besten mal beim Hoster nachfragen, ob der diese Erweiterung installieren kann/will. Bzgl. der
exec()-Funktion: Die wird zwar in meinem Default-Theme verwendet (aufgrund des Inline-PHP für die PDF-Metadaten), aber man kann es auch so gestalten, dass die Funktion nicht benötigt wird. Ist also letztlich kein wirkliches Hindernis.agc,
Your error indicates that your lacking the GD extension for PHP. Did you run the compatibility test? I’m sure it will confirm my guess.
If so, please ask you hoster if they are willing to install this extension.
Oliver Bockelmann on December 15, 2006 at 09:48 #
Hallo, ich komme noch mal auf die Frage nach “fehlendem Output” zurück:
Angenommen auf einem Server läuft PHP5, der Zeichensatz ist UTF-8 und das Testscript läuft fehlerfrei durch. Woran könnte es liegen, dass in der Live-Version dennoch nur das Layout, nicht aber der Content als PDF dargestellt werden kann?
(Das PDF sieht aus, wie eine leere Seite, auf manchen Seiten enthält es jedoch lauter Zeilen mit jeweils einem oder mehreren Sonderzeichen.) Ich kann hier leider (noch) keinen Link einstellen. Falls erforderlich, könnte ich einen per E-Mail schicken.
English:
Same problem as Hans Uwe Petersen (comment 7) and Marcel (comment 12) have had. Setting $ctpdf_convert to true does not help.
Alex Günsche on December 15, 2006 at 11:35 #
Hallo Oliver,
hast Du mal einen Blick auf Kommentar 50/51 geworfen? Das Entfernen der Metadaten scheint in einigen Fällen zu helfen.
Detlef on December 15, 2006 at 12:18 #
Hallo Alex,
vielen Dank für Deine Antwort:
Die XML erweiterung ist nun Installiert, jedoch exec() nicht.
Ich bekomme folgende Fehlermeldung:
Eine Idee?
Vielen Dank für Deine Mühe
Detlef
Alex Günsche on December 15, 2006 at 12:50 #
Ach ja, das ist ein blöder Bug, dem ich schon selbst zum Opfer gefallen bin. Es sollte helfen, wenn Du in
contuttopdf.phpden Aufrufrequire ('dompdf/dompdf_config.inc.php');durch
require ('./dompdf/dompdf_config.inc.php');ersetzt.
Detlef on December 15, 2006 at 13:11 #
Leider nicht:
Alex Günsche on December 15, 2006 at 13:25 #
Hm, seltsam. Probier’s mal mit
require (ABSPATH.'/wp-content/plugins/dompdf/dompdf_config.inc.php');Detlef on December 15, 2006 at 13:50 #
Jetzt:
Alex Günsche on December 15, 2006 at 13:58 #
Also irgendwas stimmt da grundsätzlich nicht. Mindestens eine der beiden letzen Möglichkeiten hätte funktionieren müssen.
Bist Du sicher, dass die Datei existiert und dass sie vom Webserver gelesen werden kann (Stichwort: Zugriffsrechte)?
Detlef on December 15, 2006 at 14:18 #
/httpdocs/wp-content/plugins/contuttopdf/
contuttopdf.php existiert, habe ihr mal die Rechte 777 gegeben keine Änderung
Alex Günsche on December 15, 2006 at 14:48 #
*Hrmpf* Klar, dass die Datei existiert. Ich meinte die Datei
dompdf_config.inc.phpim Ordnerdompdf/des ContuttoPDF-Verzeichnisses. D.h. ist die Datei an dem Ort, wo der Webserver versucht sie zu lesen, und ist sie für den Server lesbar?Detlef on December 15, 2006 at 14:52 #
dompdf_config.inc.php
ist hier:
/httpdocs/wp-content/plugins/contuttopdf/dompdf/
Rechte sind 644
Alex Günsche on December 15, 2006 at 15:42 #
Wie sind denn die Rechte des Ordners
dompdf/?Detlef on December 15, 2006 at 15:49 #
755
Oliver Bockelmann on December 15, 2006 at 15:55 #
Hallo Alex,
Layout geht, Bilder werden transformiert, Texte gehen leider nicht. An Stelle von Texten wird z.B. “&&&”… angezeigt, sowie Aufzählungszeichen und “»”-Pfeile (Doppelpfeile).
Habe Folgendes versucht:
- DOCTYPE-Deklaration an das System anpassen
- DOCTYPE-Declaration testweise weglassen
- jeweils mit “true” und “false” -Einstellung für $ctpdf_convert.
Hmmm… schaut wohl nicht gut aus?
Alex Günsche on December 15, 2006 at 15:57 #
Die Metadaten sind die HTML-Tags die mit
metabeginnen. Was passiert, wenn Du die weglässt?Alex Günsche on December 15, 2006 at 17:07 #
Detlef, ich muss zugeben, dass ich das Problem nicht nachvollziehen kann. Normalerweise sollte PHP die Datei finden und inkludieren können. Es scheint aber bei Dir eine Fehlkonfiguration am Server in Verbindung mit der
open_basedir-Einstellung zu geben. Die Einstellung alleine ist es nicht, da ich die hier auch habe und es hier auch tadellos funktioniert.Detlef on December 16, 2006 at 14:08 #
Hallo Alex,
v
vielen herzlichen Dank für Deine Hilfe.
Bei welchen günstigen Provider habe denn keine Probleme?
Schöne Zeit und nochmals Danke
Detlef
Alex Günsche on December 16, 2006 at 14:23 #
Gerne, auch wenn es letztlich offenbar erfolglos war.
Hast Du denn mal Deinen Hoster gefragt, ob die was mit dem Problem anfangen können? Möglicherweise kennen die das schon.
Schwer zu sagen, ich selbst habe einen eigenen Server. Im Prinzip sollte es bei jedem Provider gehen, der die geforderten Voraussetzungen erfüllt. Evtl. kann man den Hoster vor dem Wechsel fragen, ob er testweise das Testscript
ctpdf_check.phpim Plugin-Ordner (dafür ist kein WP nötig) laufen lassen würde oder ob er sonst garantieren kann, dass DOMPDF bei ihm läuft.Pete on December 16, 2006 at 21:17 #
Hallo Alex,
das PlugIn ist super. Nur leider bin ich in PHP etwas unbedarft und komme mit folgenden Zeilen nicht weiter.
Now put a PDF button on your page with somewhere in your template. Instead of a button, you can also have a text, with something like . You can apply CSS styling to the anchor via its id=”pdfbutton”
Bitte, ow muß ich ?php contutto_pdfbutton(’This page as PDF’); ?>. You can apply CSS styling to the anchor via its id=”pdfbutton”
eingeben? Ich möchte statt eines Buttons im template, sprich auf der Hauptseite des Blogs einen Text einfügen. Das der Leser durch Klick sein pdf bekomment, weiss aber nicht, wo ich besagte Zeilen eingeben soll? Du schrreibst, man soll es irgendwo im template unterbringen, bloss wo?
Ich bitte die Ausfürhungen etwas zu präzisieren, vielen Dank.
Gruß
Pete
Alex Günsche on December 18, 2006 at 19:28 #
Hallo Pete,
den PHP-Schnipsel tust Du am besten in Deine
sidebar.php. Ansonsten schau mal bitte nochmal in die Anleitung oder die hiesigen Kommentare.Oliver Bockelmann on December 19, 2006 at 12:08 #
Hallo Alex,
habe das Script noch einmal durchgetestet. Der Body-Content der pdf.php beginnt mit einem Script, welches normalerweise
nicht so: (Javascript-Schreibweise),
sondern so: …
deklariert sein sollte, um serverkompatibler zu werden.
Auf meinem Testserver läuft dieser Part des Scripts leider trotzdem nicht, weshalb ich statt … nun die normale PHP-Schreibweise verwende:
Es funktioniert aber auch, wenn man den kompletten Script-Part einfach löscht.
Vielen Dank und beste Grüße
Oliver
Oliver Bockelmann on December 19, 2006 at 12:15 #
Pfff… kriege ich das noch hin?
Nicht ” script type=”text/php” “, sondern ” script language=”php” ” oder “normale PHP-Schreibweise oder löschen.
miguel on December 19, 2006 at 13:45 #
Hello
I have installed in la localhost and I get a white page, no pdf page
The compatybility test is ok, but when i click on “creating a test PDF” nothing happen. I get this:
http://localhost/wordpress/wp-content/plugins/contuttopdf/ctpdf_check.php?pdftest=true
can I use In a localhost installation of WP?
Thanks
Alex Günsche on December 20, 2006 at 11:41 #
Hallo Oliver,
danke für die Hinweise. Ich werde es in die nächste Version einbauen. (Man kann hier seine Kommentare übrigens nachbearbeiten.
)
miguel,
if you get a blank page, this means that it’s likely not to work. Although the test checks for the major requirements, it cannot guarantee that there isn’t another issue that prevents the plugin from working. Sorry.
Oliver Bockelmann on December 21, 2006 at 01:01 #
Hallo Alex, gerne… Für die verschiedenen Server-Konfigurationen kann der Entwickler ja nix.
Jetzt achte ich mal auf das “Nachbearbeiten”. Gibt`s dafür auch ein gescheites Plugin?
Nachtrag: Nicht schlecht.
Alex Günsche on December 21, 2006 at 13:25 #
Ja, dafür setze ich Edit Comments ein. Sehr empfehlenswert.
Oliver Bockelmann on December 21, 2006 at 19:22 #
Yep, thanks!
wolf on January 2, 2007 at 12:28 #
Hello,
I have found bug. My blog is in cyrillic (UTF8). When I test compatibility of plugin before activation I receive 1st page of blog. But when the plugin is activated I received ????????? instead cyrillic letters in posts.
Thanks in advance
Alex Günsche on January 2, 2007 at 12:52 #
Hello wolf,
as for the characters in your posts, please see comment #26. The problem with the compatibility test I cannot understand. Did you upload all contents as described in the Howto?
wolf on January 3, 2007 at 09:35 #
Hi Alex,
Great! I have commented only one line and the problem disappeared. There was no problem with compatibility test also.
Have a good time! + Thanks
wolf on January 3, 2007 at 10:10 #
Guys,
I have insert code “” in index.php (wordpress theme index file) after the coded “”. Now I receive an empty page (url=http://…/?output=pdf) when I click on button “This page as PDF”. How to check out the problem?
Alex Günsche on January 3, 2007 at 10:57 #
Hello wolf,
I’m afraid that WordPress filtered out your example code. Could you please upload it to some sort of pastebin so I can have a look at it?
tboggi on January 8, 2007 at 00:49 #
Hallo Alex
beim entzippen, zeigt mir winrar an, das das archiv zerstört ist !!
Kann das sein?
Vielleicht kannst Du mir das per eMail schicken.
Wenn ja, Danke im voraus.
Torsten
Alex Günsche on January 8, 2007 at 01:09 #
Hallo Torsten,
ich denke eher, dass Winrar nicht damit klarkommt, es gab schon mehrmals solche Meldungen. Versuch es doch bitte mal mit 7zip, falls es dann immer noch nicht klappen sollte, sende ich es Dir in einem anderen Format.
Darius on January 21, 2007 at 12:48 #
Hello,
I had installed this plugin. The compatibility test was successful, ant it generated tes pdf fine. http://radiocool.110mb.com/wp-content/plugins/contuttopdf/ctpdf_check.php
But in real, plugin generates pdf, but when adobe reader opens it, it says ” could not open… file could be damage”
http://radiocool.110mb.com/?output=pdf
Thanks for help
Darius (again) on January 21, 2007 at 20:58 #
I’m opened generated pdf with notepad, i noticed some errors:
Warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 3201 is not allowed to access /tmp/dompdf_img_iSmj9l owned by uid 2001 in /www/110mb.com/r/a/d/i/o/c/o/o/radiocool/
htdocs/wp-content/plugins/contuttopdf/dompdf/
include/abstract_renderer.cls.php on line 318
I think ir caused, because my host server is at safe mode on
Señor Epiphyte on January 22, 2007 at 00:15 #
Slick, even the links still work in the PDF! None of the markup used to display images via Coppermine Integration work however — no images show up in the PDF template.
Andreas on January 23, 2007 at 18:26 #
fehlermeldung:
! C:\wpd\wpd2007\contuttopdf-0.3.tar.bz2: The archive is corrupt
Weist Du warum? oder, wo bekomme ich das plugin?
Alex Günsche on January 23, 2007 at 18:55 #
Hello everybody,
Darius, when I go to your page, I get a bunch of safe mode errors. But these are not normal, it appears that your server is misconfigured so that temporary files are assigned to another user. The Adobe Reader problem is known, but I couldn’t fix it yet.
Señor Epiphyte, sorry the Coppermine stuff doesn’t work in the PDF by default, but you could try to incorporate it into the PDF template by applying the plugin filter to the post content.
Andreas: Versuch’s bitte mit 7zip.
andreas on January 26, 2007 at 14:25 #
hallo zusammen,
eine kleine frage:
arbeitet ContuttoPDF auch in der testumgebung von xampp (version 1.5.2). konnte bisjetzt leider keine pdf-datei zustandebekommen.
daneben hätte ich noch eine verständnisfrage:
laut installationsanweisung soll das verzeichnis pdf-themes ins verzeichnis wp-content/ kopiert werden.
das verzeichnis contuttopdf soll ins verzeichnis wp-content/plugins/ kopiert werden.
aber beim entpacken ist das erste verzeichnis im zweiten verzeichnis enthalten (habe es so verstanden, daß das verzeichnis pdf-themes ins verzeichnis wp-content/ im zweiten verzeichnis gelöscht werden sollte).
Jeunesse on January 29, 2007 at 22:42 #
Hallo,
hab´s genauso verstanden wie Andreas über mir. Und so läuft das alles irgendwie nicht so recht. Den PHP5 Demotest hab ich bestanden. Ist halt nur die Frage, wo genau welche Dateien jetzt hin müssen …
Danke schon mal
)
Alex Günsche on January 30, 2007 at 17:34 #
Ja, es ist ein bissel unglücklich gepackt, und es wird sich mit der nächsten Version ändern. Aber letztlich ist es richtig: Der Ordner
pdf-themesmuss auswp-content/pluginsentfernt und nachwp-content/geschoben werden.Was die sonstigen Probleme angeht, wären konkrete Fehlermeldungen hilfreich.
Jeunesse on January 31, 2007 at 01:31 #
Also ich habe jetzt den Ordner pdf-themes in den Ordner wp-content auf dem Server hoch geladen und in den Ordner Plugins , ebenfalls auf dem Server, den Ordner contuttopdf. Dann, sofern ich die Anweisung oben richtig verstanden habe, soll ich folgenden Code irgendwo auf meiner Templateseite platzieren:
< ?php contutto_pdfbutton(); ?>Ist das erst einmal soweit richtig verstanden ? Das Plugin ist natürlich aktiviert worden …
Ich wollte das eigentlich in der Index.php und in der Single.php meines Themes einbauen. Aber es erscheint nur der Php-Code, so wie er hier steht. Kein Button oder Link - nichts.
Irgend etwas habe ich da wohl falsch gemacht, aber was ? Kannst Du mir da bitte weiter helfen ?
Danke & Gruß,
Jeunesse
Alex Günsche on January 31, 2007 at 10:43 #
Wenn Du den PHP-Code in der Ausgabe siehst, hast Du entweder ein Leerzeichen zwischen der öffnenden Spitzen Klammer und dem Fragezeichen oder Du hast die spitzen Klammern als HTML-eigenes Zeichen maskiert. Es dürfen aber kein Leerzeichen in den PHP-Tags sein, und die spitzen Klammern müssen im Klartext eingetippt werden.
P.S. Ich habe gerade gesehen, dass der Code in der Anleitung fehlerhaft war; irgendwie sind da tatsächlich Leerzeichen reingerutscht. Ich habe es nun korrigiert.
andreas on January 31, 2007 at 12:44 #
hallo Alex,
dank für deine antwort.
leider hast du mit keinem wort erwähnt, ob ContuttoPDF auch unter xampp funktioniert (bezüglich der aussage Change the permissions of the directory wp-content/plugins/contuttopdf/dompdf/lib/fonts, so that it is writable by the web server)
nach der installation habe ich den test durchlaufen lassen. alles im grünen bereich. einen testausdruck konnte ich leider nicht erstellen. ContuttoPDF öffnete weder den acrobat reader oder noch zeigte es einen botton zum speichern (oder irgend etwas anderes) an.
da vermute ich, das es etwas mit der testumgebung von xampp zu tun haben wird.
Alex Günsche on January 31, 2007 at 12:53 #
Ich kann zu XAMPP nichts sagen, da ich kein Windows benutze. Es kann auch sein, dass es in Windows-Umgebungen überhaupt nicht funktioniert. Etwas weiter oben auf dieser Seite war schon mal ein XAMPP-Nutzer, der Probleme hatte. Wenn es mit XAMPP nicht klappt, kann ich zunächst auch nichts machen.
Die von dir genannte Fehlermeldung deutet allerdings auf etwas anderes hin, nämlich, dass das Schriftartenverzeichnis nicht schreibbar ist. Falls es aber schon schreibbar ist, dann ist es wohl doch ein Problem mit Windows. Allerdings liegt das dann an DOMPDF und nicht an ContuttoPDF.
Jeunesse on January 31, 2007 at 13:21 #
Hallo Alex,
vielen Dank, jetzt kam auch das gewünschte Icon
Allerdings geht´s trotzdem nicht *heul*
Wenn ich das in der Single.php einfüge, dann werden lediglich die Kommentare ausgegeben, nicht aber der Eintrag selbst.
Und füge ich´s auf der index.php ein, dann wird nur eine weiße Seite ausgegeben, also gar nichts generiert.
Als pdf-Datei, so wie ich das sonst so kenne, wird rein gar nichts ausgegeben. Auch nicht die Kommentare. Es öffnet sich lediglich immer eine neue Seite …
Vermutlich habe ich wieder etwas falsch gemacht, oder woran könnte das liegen ? Habe gerade über Google Blogs gefunden, wo das funktioniert. Also muß ich wieder irgend etwas falsch gemacht haben *grummel*
Gruß Jeunesse
Alex Günsche on January 31, 2007 at 13:33 #
Hast Du evtl. eine Seite, wo man sich das mal anschauen kann?
In manchen Umgebungen funktioniert es halt nicht, da kann ich ohne einen tieferen Einstieg auch nichts machen.
andreas on January 31, 2007 at 14:06 #
danke alex für deine schnelle antwort.
denke auch, daß xampp vermutlich der schuldige ist. werde mich mal im xampp-forum umhören ob mir dort jemand helfen kann.
Jeunesse on January 31, 2007 at 15:47 #
Hi Alex,
falls die Frage mir galt … Ja, ich hab eine Seite … Habe das jetzt mal eben aktiviert, damit Du auch was siehst
Vielleicht kannst Du mir ja dann sagen, was ich falsch gemacht habe
Danke schön !
Alex Günsche on January 31, 2007 at 17:12 #
Jeunesse, ich habe mir Deine Seite mal angeschaut, kann aber leider nicht erkennen, warum es nicht funktioniert. Möglicherweise liegt es an einem Plugin, Deinem Theme oder einer sonstigen Modifikation Deiner WordPress-Installation (z.B. überflüssige Leerzeichen außerhalb von PHP-Tags in einer der Include-Dateien). Falls Du die Lösung findest, lass es mich bitte wissen.
Jeunesse on January 31, 2007 at 18:29 #
Ah … Ok … Das sind ja schon mal ein paar Ansatzpunkte …
Dann schaue ich mal, probiere a bissi aus und wenn ich herausgefunden habe, warum das nicht ging, dann sag ich Dir noch mal Bescheid.
Danke jedenfalls erst mal für´s nachgucken
Gruß Jeunesse
Jeunesse on January 31, 2007 at 22:33 #
Hm … Also ich hab´s jetzt mal mit Blankotemplates getestet (also Templates OHNE Plugins) und jedes mal wurde alles was unterhalb von
< ?php contutto_pdfbutton(); ?>stand abgeschnitten …Vielleicht geht es einfach nicht - warum auch immer
Herr K on February 3, 2007 at 18:45 #
Hallo,
nach Aktivierung von contutto sind meine Texte mit Zeichen versehen, die ich leider nicht entziffern kann, also Fragezeichen und aehnliches die in meinen Texten nicht vorkommen. Ich arbeite mit GENGO. Kann es sein das das damit zusammenhaengt ?
Gruesse
Klaus
P.S. pdf-themes ist bei mir in content, aber auch im Ordner plug-in/contutto. Ware ja dann doppelt, oder ?
Alex Günsche on February 5, 2007 at 21:38 #
Hallo,
nein, das wird wohl eher an der Funktion
contutto_filter()liegen; die musst Du ggf. in der Plugin-Datei deaktivieren, siehe oben.GTFreak on February 6, 2007 at 14:02 #
Hallo Alex,
ich habe leider auch das Problem, dass ich bei einer Standard-Wordpress-Installation (Version 2.1!) beim Aufruf des Druckbefehls die Fehlermeldung “Fatal error: Please select a PDF template first!” bekomme. Hier der Link zu einer Seite (http://www.panik-crew.de/storm-codec-pack-70201-erschienen#more-350 - unten in der Mitte). Der Test über die Verwaltung der Plug Ins war in allen Punkten positiv!
Das Problem wurde hier bereits angesprochen, aber eine Lösung habe ich noch nicht gefunden (oder überlesen:-(.
cu,
Stephan
Ralf on February 14, 2007 at 12:06 #
Hallo,
hatte das selbe Problem wie unter 74 beschreiben (open_basedir restriction).
In der Datei dompdf_config.inc.php steht als Pfad das Temp-Verzeichnis des Servers, habe jetzt einen Pfad zu meinen Webspace eingetragen, jetzt kommen keine Fehlermeldungen mehr.
/**
* The location of the system’s temporary directory.
*
* This directory must be writeable by the webserver process.
* It is used to download remote images.
*/
define(”DOMPDF_TEMP_DIR”, “/tmp”);
Allesdings fehlt in meinen PDF der Text - hast du vielleicht eine Idee?
http://coffee.pytalhost.de/
Danke und bis bald, Ralf
Ralf on February 14, 2007 at 14:44 #
Zu Nummer 127:
Hallo Stephan, lese bitte den Kommentar 33, war bei mir genauso …
Bis bald, Ralf
GTfreak on February 19, 2007 at 16:44 #
Hallo Ralf,
das hatte ich auch gemacht und es hat geholfen. Aber nun habe ich dieses Problem: http://forum.wordpress-deutschland.org/showthread.php?t=17346
cu,
GTFreak
ken on March 13, 2007 at 06:45 #
how can i use this plugin in Japanese?
All Japanese Character become ????
but it will fine if i use English.
Need help. thanks.
Rasmus on March 30, 2007 at 10:00 #
Hi,
Sounds like just the plugin I’ve been looking for - thanks! I’m having some problems though (I’m using Wordpress 2.1.2):
1) I get:
… when trying to print a pdf version of my page.
Earlier you answered this to this question:
Vent there - and must admit that that did not bring me any further.
Will I have to live with my missing abilities or can you give me (aka ‘not being the advanced type
’) a somewhat more specific hint?
2) From the ContuttoPDF compatibility check I get yes - except from:
… but more important (I recon):
The ‘DOM extension’ … where does that leave me?
Nb.: I understand that this amounts to a lot of questioning. I’m only following your advice:
Alex Günsche on March 31, 2007 at 17:33 #
Rasmus: This plugin works only with PHP5.
Oliver Bockelmann on April 3, 2007 at 21:05 #
Wo kann man eigentlich die Version 0.3 runterladen?
Der Link (oben) führt scheinbar zu 0.2.1.
milemann on May 30, 2007 at 00:17 #
hallo!
der test vor der aktiverung zeigte alles grün, auch ctpdf_theme stand auf default und doch sah ich fehlermeldungen nach der aktivierung und klick auf das acrobat gif in der seite.
den entscheindenen tipp hate ich auf dieser seite gelesen.
in der datei pdf.php zeile 41 muss stehen
language="php"und nicht
type="text/php"jezt funktioniert das plugin einwandfrei!!
besten dank Alex!!
und noch eine frage zu coment 54.
in wie fern kann der relative pfad zu bilddateien ein sicherheitsrisiko darstellen???
grüsse
mil
Alex Günsche on May 30, 2007 at 09:03 #
Nicht der relative, sondern der absolute Pfad in Verbindung mit
DOMPDF_ENABLE_REMOTEist gefährlich, da so Daten von fremden Servern verarbeitet werden. Wenn dann noch die Ausführung von Inline-PHP zulässt, sind Angreifern Tür und Tor geöffnet.Ray on June 4, 2007 at 16:44 #
hi there. First of all: this is a WUNDERFULL plugin!
if you encounter the “white page” problem just as i did, try the following:
1) add this code at the bottom of your PDF theme. This should print out a directory + sest (when clicked on the PDF genertion logo of course
if ($_GET[’output’] != “pdf” ) {
echo “test”;
echo $contutto_output;
} else {
chdir(’wp-content/plugins/contuttopdf’);
// aktuelles Verzeichnis
echo getcwd() . “\n”;
echo “sest”; exit();
require (’dompdf/dompdf_config.inc.php’);
$contutto_dompdf = new DOMPDF;
$contutto_dompdf->load_html( $contutto_output );
$contutto_dompdf->render();
$contutto_dompdf->stream( $contutto_pdf_filename );
}
2) remove the 2 lines saying ‘echo getcwd() . “\n”;’ and ‘echo “test”; exit();’. Your should now get a PDF File.
Now what was the bug? The script could not find the file as it was checking the wrong dir.
Anatoly on June 6, 2007 at 04:59 #
Hi Alex:
Why this problem??
http://anatoly.ragesys.net/2007/06/03/proyecto-milan-videos-de-microsoft-surface/?output=pdf
Generate blank page….
I review all comments and can not any solution…
Please Help me!!!!
Best Regards…
ben on June 6, 2007 at 20:46 #
Hello,
Fantastic plugin! I’m having an odd problem in that the external images are not getting published to the pdf. Am I perhaps missing something? I created the directory /dompdf/tmp and made it writeable, however that hasn’t helped the problem.
Thanks for any suggestions you can give..
ben.
ben on June 7, 2007 at 01:42 #
err — nevermind, as per comment 54 i’ve got it figured out.
Mikael on June 15, 2007 at 20:59 #
Hello
Good stuff, now that I have it working! I too had the problem of PDF generated without any text, even if bullets were there. The solution was to replace type=”text/pdf” with language=”pdf” on line 41 of pdf.php, as described above - but it took me a while of trying to understand all the German and stuff.
Would this be a right time to include a FAQ with the distribution, or at the top of this page?
danyelle.it on June 18, 2007 at 08:32 #
unfurtunately my host’s running PHP4…isn’t any chanche to make it work with this plugin? i love it very much and it would be bad not using it…please help!!
pHiLo on June 25, 2007 at 18:08 #
Hi. The .tar archive seems to be broken. Is this only for me ?
Alex Günsche on June 26, 2007 at 13:39 #
I’m afraid so. Please try the latest 7zip, this should work.
milemann on June 26, 2007 at 21:01 #
hi!
i would like to use a header and footer in pdf with logo etc.
is it possible to configure ContuttoPDF or DOMPDF itself to make it possible without “risky” setting DOMPDF_ENABLE_REMOTE to “true”???
greetz
mil
Alex Günsche on June 27, 2007 at 11:46 #
You don’t have to use DOMPDF_ENABLE_REMOTE for that. If you have all content on the same vHost, you just have to make it available for the PDF generator. Have you tried editing the theme? Another thing that might help you is the inline PDF feature. Also, have a look at the DOMPDF documentation.
Philippe on June 28, 2007 at 20:18 #
All seems to be ok on the plugins test page but i try to generate the demo pdf i got this:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1245184 bytes) in /opt/lampp/htdocs/vinonet.org/blog/wp-content/plugins/contuttopdf/dompdf/lib/class.pdf.php(2219) : eval()’d code on line 5914
Thank you for helping me.
Alex Günsche on June 28, 2007 at 20:32 #
Your vHost has far too few memory for PHP, especially for a task like PDF generating. Go and slap your host. And, by the way, please try using a search engine next time.
claire on July 10, 2007 at 00:15 #
that plugin doesn’t work… I try to download it but a pop up say that files are corrupted… any solution? thank you.
Claire
John on July 18, 2007 at 23:25 #
No problems with install, compatibility test, no errors. But I can’t get the “This page as PDF” ( to appear anywhere.
I’ve tried single.php, header.php, footer.php, etc. I have it working fine on my localhost, but not on my web host. Permissions problem? I have the themes and pdf-themes (and underlying files) at 755
Alex Günsche on July 19, 2007 at 09:04 #
What happens if you append
output=pdfto one of you pages?John on July 19, 2007 at 18:41 #
Alex, I got the “This page as pdf” to appear but when I click on it I get:
Fatal error: Please select a PDF template first!
I’m thinking I should just remove and reinstall the plugin from a fresh download. Perhaps a file became corrupted in the transfer process to the host.
izno on August 6, 2007 at 15:46 #
Hi, I was just wandering if anyone have the same problem I’m experiencing?
The installation went OK, but as soon as I activate the plugin, then the text of my blog goes crazy. My Wordpress is in Danish so it’s formated UTF-8.
How can I change the PDF plugin to recognize the language?
Thanks
//
Alex Günsche on August 6, 2007 at 19:12 #
izno, see this comment and the following.
Dave J. (Scoop0901) on August 21, 2007 at 16:08 #
I’ve not heard of anyone who’s really gotten this to work properly. For me, that means my search continues.
SkaKri on August 30, 2007 at 23:23 #
I have this error in junction with blank page…
[Fri Aug 31 01:14:40 2007] [error] [client 62.84.1.86] PHP Fatal error: Uncaught exception 'PDFlibException' with message 'Invalid UTF-8 string' in /usr/home/archie/http/skakri.net/wp-content/plugins/contuttopdf/dompdf/include/pdflib_adapter.cls.php:736\nStack trace:\n#0 /usr/home/archie/http/skakri.net/wp-content/plugins/contuttopdf/dompdf/include/pdflib_adapter.cls.php(736): PDFlib->stringwidth('? SkaKri ? URL ...', 1, 6)\n#1 /usr/home/archie/http/skakri.net/wp-content/plugins/contuttopdf/dompdf/include/font_metrics.cls.php(108): PDFLib_Adapter->get_text_width('? SkaKri ? URL ...', '/usr/home/skvot...', 6, 0)\n#2 /usr/home/archie/http/skakri.net/wp-content/plugins/contuttopdf/dompdf/include/php_evaluator.cls.php(66) : eval()'d code(17): Font_Metrics::get_text_width('? SkaKri ? URL ...', '/usr/home/skvot...', 6)\n#3 /usr/home/archie/http/skakri.net/wp-content/plugins/contuttopdf/dompdf/include/php_evaluator.cls.php(66): eval()\n#4 /usr/home/archie/http/skakri.net/wp-content/plugins/contuttopdf/dompdf/include/php_evaluator.cls.php(70): PHP_Evaluator->evaluate('??if ( in /usr/home/archie/http/skakri.net/wp-content/plugins/contuttopdf/dompdf/include/pdflib_adapter.cls.php on line 736, referer: http://www.skakri.net/2007/08/31/viena-diena-latvija/Stefano on September 20, 2007 at 15:26 #
Hi,
I just installed contutto-pdf into my fresh WP 2.23 test version.
The compatibility checks are ok except “XML extension installed” was failed. Anyway the page prints “All requirements seem to be met. ” and the test was successful.
I put the suggested php code for the pdf button into single.php template but when I click on the button I got “Fatal error: Please select a PDF template first!”.
Thanks for your support,
Stefano
Alex Günsche on September 20, 2007 at 17:58 #
Please try setting ctpdf_theme to default on the wp-admin/options.php page. If that doesn’t work, you’re out of luck, sorry.
Busdraghi on September 29, 2007 at 14:44 #
Hello,
your plugins works really well for me, but I have à problem with images.
I tried the relative put or to set DOMPDF_ENABLE_REMOTE to true, but I’m still not able to see images in the pdf.
Here you have my test blog.
http://busdraghi.net/testblog/?p=15
Please, can you help me to solve this problem?
thank you so much
fabiano
Alex Günsche on October 1, 2007 at 10:11 #
Please try with an image url without the host name.
Busdraghi on October 1, 2007 at 23:13 #
Thank you for your answer.
The timage that you can still see at
http://busdraghi.net/testblog/?p=15
(at the end of the article you have the link to save à pdf)
this image is introduced without the host name. But it still does not work
any idea?
In any case I really like your plug-in: wonderfull job. If I can get the images it will be really perfect
thank you
f
Bob K. on October 3, 2007 at 23:15 #
Hi Alex,
Great piece of work. I have a problem with picture (png, jpg, etc) rendering in the pdf output. I tried changing the DOMPDF_ENABLE_REMOTE and using relative URL’s as suggested in #53-54 above. Are there any other obvious solutions? Thanks for all the help.
bob
Bob K. on October 4, 2007 at 19:50 #
Turns out after some digging around in the xhtml generated by contutto, that the absolute paths were getting changed to (sometimes incorrect) paths to the file on my disk. Commenting out the following line in contuttopdf.php took care of this, making absolute paths work with the DOMPDF_ENABLE_REMOTE option set true.
, 'src="' . get_bloginfo('home') . '/' => 'src="' . $_SERVER['DOCUMENT_ROOT'] . '/' // images, part 2Relative don’t seem to have this problem, but still don’t generate properly for me. Additionally, for those trying to use PNG’s with CPDF, the alpha channel appears to generate problems (producing a blank picture). You’ll need to strip this channel or use PDFlib (which I haven’t tried).
Alex Günsche on October 5, 2007 at 14:59 #
Yes, PNGs must be flattened or indexed. As for the paths, what is your server operating system? Anything else unusuall about your hosting environment?
Bob K. on October 8, 2007 at 21:17 #
I’m running WordPress Mu v.1.2.5 locally with Apache v.2.2 / PHP v.5.1 / MySQL v.5.0 on a SuSE Linux 10.1 box. The only unusual aspect of my environment is that it is currently run locally while I make sure the security is up to par. Thanks!
Michael on October 13, 2007 at 17:46 #
Hi!
Hab contutto auf WP 2.07 installiert.
PHP test und testseite alles erfolgreich.
Aber leider :
Error 500 - Internal server error
Ein interner Fehler ist aufgetreten!
Bitte versuchen Sie es zu einem späteren Zeitpunkt.
irgendeine idee??
thx Micha
Rob L. on October 23, 2007 at 02:31 #
I have a static page that uses a page template. There is nothing in the page except a title. The template displays posts from a specific category. When I put in the page template, it just returns the page title and nothing else. How do I get around this? I need it to pick up the same post data that the template gets.
Habib on October 31, 2007 at 00:12 #
Hi all,
your plugin seems to an important one, i have tried to use it but it don’t work (php4), is there any way to run it under php4 ?
Thanks
Taeke on November 12, 2007 at 11:48 #
Installing the plugin went fine but I’m running into an error when I try to generate a PDf from a post or page.. I get the following fatal error:
Fatal error: Uncaught exception 'PDFlibException' with message 'Invalid UTF-8 string' in C:\domains\mydomain.eu\wwwroot\wordpress\wp-content\plugins\contuttopdf\dompdf\include\pdflib_adapter.cls.php:736 Stack trace: #0 C:\domains\mydomain.eu\wwwroot\wordpress\wp-content\plugins\contuttopdf\dompdf\include\pdflib_adapter.cls.php(736): PDFlib->stringwidth('? mydomain ? ...', 1, 6) #1 C:\domains\mydomain.eu\wwwroot\wordpress\wp-content\plugins\contuttopdf\dompdf\include\font_metrics.cls.php(108): PDFLib_Adapter->get_text_width('? mydomain ? ...', 'C:\domains\cool...', 6, 0) #2 C:\domains\mydomain.eu\wwwroot\wordpress\wp-content\plugins\contuttopdf\dompdf\include\php_evaluator.cls.php(66) : eval()'d code(17): Font_Metrics::get_text_width('? mydomain ? ...', 'C:\domains\cool...', 6) #3 C:\domains\mydomain.eu\wwwroot\wordpress\wp-content\plugins\contuttopdf\dompdf\include\php_evaluator.cls.php(66): eval() #4 C:\domains\mydomain.eu\wwwroot\wordpress\wp-content\plugins\contuttopdf\dompdf\include\php_evaluator.cls in C:\domains\mydomain.eu\wwwroot\wordpress\wp-content\plugins\contuttopdf\dompdf\include\pdflib_adapter.cls.php on line 736can anyone help me with this?
Should I change something in the plugin or my theme??
Thanks!
Alex Günsche on November 12, 2007 at 19:40 #
You are using PDFlib on your server, and you have a Windows server. These are two things that are prone to producing errors. Sorry, I cannot help with this, especially with the Windows server.
Andreas on December 2, 2007 at 11:19 #
Hallo!
Obwohl beim Installieren alles grün ist und der Test funktioniert bekomme dann auch ich die Meldung
“Fatal error: Please select a PDF template first!”
In @ gibts Du darauf hin den Rat
“Please try setting ctpdf_theme to default on the wp-admin/options.php page. If that doesn’t work, you’re out of luck, sorry.”
Aber wie und wo setze ich in options.php ein Theme auf einen defaul-Wert?
Oder gehöre ich auch zu den “out-of-luck-Leuten”
Benutze blixed-10 als Theme
Gruß
Alex Günsche on December 4, 2007 at 10:37 #
Ich befürchte, ja. Ich werde mich demnächst einer neuen Version des PDF-Plugins widmen, und dann werden viele dieser ärgerlichen Probleme auch verschwinden.
Andreas on December 4, 2007 at 16:18 #
Danke für Feedback. Dann brauch ich nicht weiter Probieren. Und warte einfach, bis Dein offenbar geniales - und einzigartiges - Plugin diese Bugs hinter sich hat. Good luck!
Herbert on December 30, 2007 at 14:14 #
So, nachdem ich den Tipp mit der script-Entfernung (nach dem body) befolgt habe, klappt alles auch mit der neuen WP 2.3 Version!
Einzige Sache: Auf jeder PDF-Seite findet sich ein Wasserzeichen mit der URL
www.pdflib.com dick und quer über der Seite.
Screenshot:
http://screencast.com/t/yGbRk6hO
Irgendeine Idee?
Und vielen, vielen Dank für das Super-Tool!!!!
Habib on January 8, 2008 at 22:58 #
Hello my friend
Thanks for good site and very usable plugin.
How can tun this program on our server with php 4.4.3
?
Thanks.
bye
Muckel on January 9, 2008 at 21:52 #
Guten Abend,
nach dem ich den default Fehler behoben habe, der hier ja schon geklärt wurde:
sind bei mir immer noch die Umlaute falsch. Sie sind nun ein Frageziechen auf einem dunklen Feld (einer Raute/Kreuz). Wie kann ich diesen Fehler beheben?
Hoffe, dass mir geholfen werden kann.
Gruß Muckel
Alex Günsche on January 12, 2008 at 12:40 #
Herbert: Dein Server nutzt offenbar eine Demoversion von PDFlib. Bitte frage Deinen Hoster, ob sie das deaktivieren oder die Vollversion aktivieren können.
Habib: Please read the documentation. This doesn’t work with PHP 4.x.
Muckel: Schau bitte in den Kommentaren weiter oben, bzgl. des Filters post_content.
VirtualFlavius on February 4, 2008 at 10:03 #
Hi there,
I solved the encoding problem in the wordpress page as suggested above, but still getting question marks in the PDF output file.
could you please describe the data flow from wordpress to the PDF converter and what happens to the page encoding in every stage?
Kind regards,
VirtualFlavius
Christian on February 11, 2008 at 14:52 #
Ich nutze die Nextgen gallery mit entsprechendem code in den posts / seiten
[gallery=xy]oder[album=xy],dies wird beim generieren des PDFs leider als Text und nicht als entsprechendes Bild ausgegeben.
Wäre es möglich das zu ändern so das die Bilder die man im post sieht dann auch mit in die PDF Datei wandern?
Bilder die per
img srceingebunden werden funktionieren ja schon wunderbar im PDF.grüße
WU on March 10, 2008 at 00:13 #
hi, thank you for giving us this cool plugin. But i met some problem.(
My blog is in Chinese, after i install the plugin, all of my chinese character turned into “????????????”. Can not be displayed!. Must be wrong with fonts. But how can i resolve this problem? appreciate your help! Thankyou!
Garry Conn on March 23, 2008 at 04:24 #
Hello WP 2.3.3 User. All installed correctly, but I get this message:
Fatal error: Please select a PDF template first!
Frank Engel on March 28, 2008 at 20:14 #
Hi Alex!
So many thanks for your plugin! That was exactly what I was looking for! Great Work! It’s working fine with WP 2.3.3.
I searched nearly a week to find your plugin. Maybe you should post ist here: http://codex.wordpress.org/Plugins/Plugin_Compatibility/2.3
Best regards.
Frank
Ranjeeth on April 2, 2008 at 15:40 #
Hello Team,
Great!! It is a great plugin to show pages in pdf, however after doing all the installations above and did compatibility Test and given the report
PHP version 5 or higher: no
XML extension installed: yes
GD extension installed: yes
PCRE extension installed: yes
DOM extension installed: no
MBstring extension installed: yes
where it says PHP 5 or higher version required. I am running my wordpress blog under that version and it couldnt able to generate PDF. Is there anyway you guys can give some thoughts on this.
regards
Ranjeeth..
paolo on April 24, 2008 at 10:24 #
Hi all, i’ve tryed the plug-in on WP 2.3.3 and it’s all ok, but i get some errors on WP 2.5. Any upgrade is coming???
ciao
paolo on April 24, 2008 at 10:58 #
Sorry, i forgot to post the error:
Parse error: syntax error, unexpected ‘?’, expecting ‘)’ in E:\wamp\www\labottepiccola\wpcontent\
plugins\contuttopdf\dompdf\include\dompdf.cls.php(277) : eval()’d code on line 414
frank on May 2, 2008 at 16:21 #
Hallo Alex,
vielen Dank für das schöne Plugin.
Leider klappt es noch nicht ganz, ich bekomme in den pdfs nur Bilder, aber keinen Text zu sehen. Woran kann das liegen?
Turel on May 5, 2008 at 01:49 #
Hi…
i have problems with your plugin..
i installed the plugin on my wordpress and run the test…
its ok al items…
i write te code on my template y not still working, i see the message:
Fatal error: Please select a PDF template first!
i run the site on my localhost
Dan O'Brien on May 19, 2008 at 11:58 #
Hi,
Is there a link to a demo version of this anywhere? It’s probably in front of my nose but I can’t see it anywhere!
Lauri on May 22, 2008 at 19:41 #
Can you please update this plugin to work on WP 2.5.1? I’m sure