version: 0.3

Diese Seite ist nur auf Englisch verfügbar. (Sie darf aber gerne auf Deutsch kommentiert werden.)

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 the ContuttoPDF plugin.
  • Unpack it with a bzip2 unpacking tool (e.g. 7zip).
  • Upload the folder pdf-themes to your wp-content/ directory.
  • Upload the folder contuttopdf to your wp-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 its id="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! :-)

215 Kommentare zu „How to generate PDFs from your WordPress blog“

  1. Dirk am 20. September 2006 um 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

  2. Alex Günsche am 20. September 2006 um 23:11 #

    Hallo Dirk,

    die Fehlermeldung sagt mir konkret nichts, aber falls Du es gerade auf der Seite http://www.gonzo-und-zuzia.de/quina/ ausprobierst, könnte es daran liegen, dass Du PHP 4.x einsetzt. Das ContuttoPDF-Plugin basiert auf DOMPDF, welches leider nur mit PHP 5 läuft.
    :-(

  3. derjazz am 24. September 2006 um 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

  4. Alex Günsche am 24. September 2006 um 14:08 #

    Das selbe Problem wie oben: Du hast PHP4, ContuttoPDF benötigt aber PHP5. Tut mir leid.

  5. BillSaysThis am 9. Oktober 2006 um 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!

  6. Alex Günsche am 10. Oktober 2006 um 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.

  7. Hans Uwe Petersen am 19. Oktober 2006 um 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.

  8. Alex Günsche am 19. Oktober 2006 um 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.

  9. Hans Uwe Petersen am 19. Oktober 2006 um 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

  10. Alex Günsche am 19. Oktober 2006 um 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.)

  11. Hans Uwe Petersen am 19. Oktober 2006 um 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

  12. Marcel am 20. Oktober 2006 um 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 ?

  13. Ikaruga am 21. Oktober 2006 um 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:-(

  14. Ikaruga am 21. Oktober 2006 um 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.

  15. Nicholas Orr am 23. Oktober 2006 um 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.

  16. Alex Günsche am 23. Oktober 2006 um 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_convert to true. Please let me know if it helps.

    Ikaruga:
    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. ;-) As for the textile: In the PDF template (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:
    Glad you like it. :-) Could you please mention what exactly is “wrong”? This would allow me to correct it.

    Btw, the new Vista fonts are (partially) stolen.

  17. Marcel am 24. Oktober 2006 um 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

  18. Marcel am 24. Oktober 2006 um 11:59 #

    sorry incomplete posting:

    i get the same result. so the solution is unfortunately not working.

  19. frizzy am 28. Oktober 2006 um 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?

  20. Marcel am 28. Oktober 2006 um 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)

  21. Alex Günsche am 29. Oktober 2006 um 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.

  22. Mik am 30. Oktober 2006 um 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.

  23. Anton am 30. Oktober 2006 um 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.

  24. Alex Günsche am 30. Oktober 2006 um 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.

  25. Martin Daugaard Stevnhoved am 31. Oktober 2006 um 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

  26. Alex Günsche am 1. November 2006 um 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.php with a text editor, and comment out (or remove) the line
    add_filter('the_content', 'contutto_filter'); which you find at the vey bottom.

  27. Sönke am 2. November 2006 um 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

  28. XBA am 8. November 2006 um 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

  29. Alex Günsche am 8. November 2006 um 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 file dompdf/include/cpdf_adapter.inc.php (at the very bottom). If you don’t want to use PDFlib, you need to set DOMPDF_PDF_BACKEND to CPDF in the file dompdf/dompdf_config.inc.php.

  30. Muckel am 11. November 2006 um 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

  31. Alex Günsche am 11. November 2006 um 23:34 #

    Hallo Muckel,

    ich habe oben gelesen, dass das plugin nur mit php5 arbeitet. Wo kann ich sehen, welche php-Version ich habe?

    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.

    Und wenn ich eine ältere habe, wie kann ich sie updaten?

    Das muss Dein Hoster machen.

  32. Simon Fodden am 14. November 2006 um 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

  33. Alex Günsche am 14. November 2006 um 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.php and set ctpdf_theme to the value default?

  34. Simon Fodden am 14. November 2006 um 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

  35. Alex Günsche am 14. November 2006 um 15:39 #

    What I meant was: If you open the page /wp-admin/options.php in your browser, do you see the entry ctpdf_theme somewhere? If yes, what happens when you set it to default and try again to create a PDF?

  36. Simon Fodden am 14. November 2006 um 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

  37. Alex Günsche am 14. November 2006 um 19:29 #

    You’re welcome. :-)
    Maybe this “solution” helps the others, too.

  38. Christopher Weidner am 15. November 2006 um 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

  39. Alex Günsche am 15. November 2006 um 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:
    &lt;a href="&lt;?php
    the_permalink();
    echo '/?output=pdf'
    ?&gt;"&gt;Diesen Artikel zum PDF verwursten&lt;/a&gt;

    Siehe auch Kommentar #44.

  40. Christopher Weidner am 15. November 2006 um 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

  41. Franck am 16. November 2006 um 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

  42. Alex Günsche am 16. November 2006 um 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.

  43. Simon Fodden am 19. November 2006 um 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

  44. Alex Günsche am 19. November 2006 um 16:09 #

    Hello Simon,

    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’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:
    &lt;a href="&lt;?php
    the_permalink();
    echo '/?output=pdf'
    ?&gt;"&gt;Bake me a PDF from this article&lt;/a&gt;

    I have also corrected comment #39 regarding this issue.

  45. Franck am 21. November 2006 um 13:59 #

    Thanks a lot it works fine, very good job man!

  46. Simon Fodden am 21. November 2006 um 23:27 #

    Alex, you’re the greatest. Thanks a million.

  47. Ananda am 22. November 2006 um 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….

  48. Alex Günsche am 23. November 2006 um 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.php and change the part wpautop($post->post_content) to swas_footnote( wpautop($post->post_content) ). Would that work?

  49. Ananda am 24. November 2006 um 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

  50. Harald Walker am 26. November 2006 um 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.

  51. Harald Walker am 26. November 2006 um 11:36 #

    removing the Document meta data from the default template fixed the problems.

  52. Alex Günsche am 26. November 2006 um 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.

  53. Michael am 28. November 2006 um 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?

  54. Alex Günsche am 28. November 2006 um 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.png instead of http.//example.org/path/to/image.png). Or you set DOMPDF_ENABLE_REMOTE to true in dompdf/dompdf_config.inc.php. But be aware that this can be a security risk.

  55. Franck am 30. November 2006 um 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

  56. Alex Günsche am 30. November 2006 um 16:22 #

    Hello Franck,

    it appears that the output=pdf is 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.

  57. Franck am 4. Dezember 2006 um 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

  58. Franck am 4. Dezember 2006 um 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

  59. Franck am 4. Dezember 2006 um 15:58 #

    Alex, My post 41 and your answer 42 may help you on a modification I did into your plugin, regards

  60. Alex Günsche am 5. Dezember 2006 um 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. :-(

  61. Franck am 5. Dezember 2006 um 18:38 #

    There is no way to modify something to make it run as the test generation?

  62. ovizii am 6. Dezember 2006 um 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

  63. Alex Günsche am 6. Dezember 2006 um 19:39 #

    Yes, you can try deleting lines 102-104 from contuttopdf.php.

  64. ovizii am 6. Dezember 2006 um 20:26 #

    http://www.eagle-grup.com/2006/12/06/hello-world/

    have look here please, I get an error.

  65. Alex Günsche am 6. Dezember 2006 um 20:36 #

    What error do you get? Please describe your problem precisely if you want to get support.

  66. ovizii am 6. Dezember 2006 um 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 :-)

  67. Alex Günsche am 8. Dezember 2006 um 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.

  68. http://www.fob-marketing.de/ am 13. Dezember 2006 um 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…

  69. Detlef am 14. Dezember 2006 um 12:06 #

    Nachtrag wegen des Fehlers beim compatibility test:

    Notice: Undefined index: pdftest in /srv/www/htdocs/s001u17/html/wp-content/plugins/contuttopdf/ctpdf_check.php on line 79

    Notice: Undefined index: pdftest in /srv/www/htdocs/s001u17/html/wp-content/plugins/contuttopdf/ctpdf_check.php on line 100
    ContuttoPDF compatibility check

    You PHP installation has been checked for compatibility with the ContuttoPDF plugin with the following results:PHP version 5 or higher: yes
    XML extension installed: no
    GD extension installed: yes
    PCRE extension installed: yes
    DOM extension installed: yes
    MBstring extension installed: yes

    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:

    Die Aktivierung von ()exec ist auf einem Server mit safemode=off leider nicht möglich.

    so dass ich es nicht selber prüfen kann.

  70. acg am 14. Dezember 2006 um 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

  71. Alex Günsche am 14. Dezember 2006 um 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.

  72. Oliver Bockelmann am 15. Dezember 2006 um 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.

  73. Alex Günsche am 15. Dezember 2006 um 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.

  74. Detlef am 15. Dezember 2006 um 12:18 #

    Hallo Alex,
    vielen Dank für Deine Antwort:

    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.

    Die XML erweiterung ist nun Installiert, jedoch exec() nicht.
    Ich bekomme folgende Fehlermeldung:

    Warning: contutto_output() [function.contutto-output]: open_basedir restriction in effect. File(/usr/share/pear/dompdf/dompdf_config.inc.php) is not within the allowed path(s): (/var/www/vhosts/derflammenwerfer.de/httpdocs:/tmp) in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Warning: contutto_output(dompdf/dompdf_config.inc.php) [function.contutto-output]: failed to open stream: Operation not permitted in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Warning: contutto_output() [function.contutto-output]: open_basedir restriction in effect. File(/usr/share/pear/dompdf/dompdf_config.inc.php) is not within the allowed path(s): (/var/www/vhosts/derflammenwerfer.de/httpdocs:/tmp) in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Warning: contutto_output(dompdf/dompdf_config.inc.php) [function.contutto-output]: failed to open stream: Operation not permitted in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Fatal error: contutto_output() [function.require]: Failed opening required ‘dompdf/dompdf_config.inc.php’ (include_path=’.:/usr/share/pear’) in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Eine Idee?
    Vielen Dank für Deine Mühe
    Detlef

  75. Alex Günsche am 15. Dezember 2006 um 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.php den Aufruf

    require ('dompdf/dompdf_config.inc.php');

    durch

    require ('./dompdf/dompdf_config.inc.php');

    ersetzt.

  76. Detlef am 15. Dezember 2006 um 13:11 #

    Leider nicht:

    Warning: contutto_output(./dompdf/dompdf_config.inc.php) [function.contutto-output]: failed to open stream: No such file or directory in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Warning: contutto_output(./dompdf/dompdf_config.inc.php) [function.contutto-output]: failed to open stream: No such file or directory in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Fatal error: contutto_output() [function.require]: Failed opening required ‘./dompdf/dompdf_config.inc.php’ (include_path=’.:/usr/share/pear’) in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

  77. Alex Günsche am 15. Dezember 2006 um 13:25 #

    Hm, seltsam. Probier’s mal mit

    require (ABSPATH.'/wp-content/plugins/dompdf/dompdf_config.inc.php');

  78. Detlef am 15. Dezember 2006 um 13:50 #

    Jetzt:

    Warning: contutto_output(/var/www/vhosts/derflammenwerfer.de/httpdocs//wp-content/plugins/dompdf/dompdf_config.inc.php) [function.contutto-output]: failed to open stream: No such file or directory in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

    Fatal error: contutto_output() [function.require]: Failed opening required ‘/var/www/vhosts/derflammenwerfer.de/httpdocs//wp-content/plugins/dompdf/dompdf_config.inc.php’ (include_path=’.:/usr/share/pear’) in /var/www/vhosts/derflammenwerfer.de/httpdocs/wp-content/plugins/contuttopdf/contuttopdf.php on line 54

  79. Alex Günsche am 15. Dezember 2006 um 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)?

  80. Detlef am 15. Dezember 2006 um 14:18 #

    /httpdocs/wp-content/plugins/contuttopdf/
    contuttopdf.php existiert, habe ihr mal die Rechte 777 gegeben keine Änderung

  81. Alex Günsche am 15. Dezember 2006 um 14:48 #

    *Hrmpf* Klar, dass die Datei existiert. Ich meinte die Datei dompdf_config.inc.php im Ordner dompdf/ 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?

  82. Detlef am 15. Dezember 2006 um 14:52 #

    dompdf_config.inc.php
    ist hier:
    /httpdocs/wp-content/plugins/contuttopdf/dompdf/
    Rechte sind 644

  83. Alex Günsche am 15. Dezember 2006 um 15:42 #

    Wie sind denn die Rechte des Ordners dompdf/?

  84. Detlef am 15. Dezember 2006 um 15:49 #

    755

  85. Oliver Bockelmann am 15. Dezember 2006 um 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? ;-)

  86. Alex Günsche am 15. Dezember 2006 um 15:57 #

    Die Metadaten sind die HTML-Tags die mit meta beginnen. Was passiert, wenn Du die weglässt?

  87. Alex Günsche am 15. Dezember 2006 um 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.

  88. Detlef am 16. Dezember 2006 um 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

  89. Alex Günsche am 16. Dezember 2006 um 14:23 #

    vielen herzlichen Dank für Deine Hilfe.

    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.

    Bei welchen günstigen Provider habe denn keine Probleme?

    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.php im 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.

  90. Pete am 16. Dezember 2006 um 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

  91. Alex Günsche am 18. Dezember 2006 um 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.

  92. Oliver Bockelmann am 19. Dezember 2006 um 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

  93. Oliver Bockelmann am 19. Dezember 2006 um 12:15 #

    Pfff… kriege ich das noch hin?

    Nicht ” script type=”text/php” “, sondern ” script language=”php” ” oder “normale PHP-Schreibweise oder löschen. ;-)

  94. miguel am 19. Dezember 2006 um 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

  95. Alex Günsche am 20. Dezember 2006 um 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.

  96. Oliver Bockelmann am 21. Dezember 2006 um 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. ;-)

  97. Alex Günsche am 21. Dezember 2006 um 13:25 #

    Jetzt achte ich mal auf das “Nachbearbeiten”. Gibt`s dafür auch ein gescheites Plugin?

    Ja, dafür setze ich Edit Comments ein. Sehr empfehlenswert.

  98. Oliver Bockelmann am 21. Dezember 2006 um 19:22 #

    Yep, thanks!

  99. wolf am 2. Januar 2007 um 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

  100. Alex Günsche am 2. Januar 2007 um 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?

  101. wolf am 3. Januar 2007 um 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

  102. wolf am 3. Januar 2007 um 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?

  103. Alex Günsche am 3. Januar 2007 um 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?

  104. tboggi am 8. Januar 2007 um 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

  105. Alex Günsche am 8. Januar 2007 um 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.

  106. Darius am 21. Januar 2007 um 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

  107. Darius (again) am 21. Januar 2007 um 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

  108. Señor Epiphyte am 22. Januar 2007 um 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.

  109. Andreas am 23. Januar 2007 um 18:26 #

    fehlermeldung:
    ! C:\wpd\wpd2007\contuttopdf-0.3.tar.bz2: The archive is corrupt

    Weist Du warum? oder, wo bekomme ich das plugin?

  110. Alex Günsche am 23. Januar 2007 um 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. ;-)

  111. andreas am 26. Januar 2007 um 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).

  112. Jeunesse am 29. Januar 2007 um 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 :o )

  113. Alex Günsche am 30. Januar 2007 um 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-themes muss aus wp-content/plugins entfernt und nach wp-content/ geschoben werden.

    Was die sonstigen Probleme angeht, wären konkrete Fehlermeldungen hilfreich.

  114. Jeunesse am 31. Januar 2007 um 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

  115. Alex Günsche am 31. Januar 2007 um 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.

  116. andreas am 31. Januar 2007 um 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.

  117. Alex Günsche am 31. Januar 2007 um 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.

  118. Jeunesse am 31. Januar 2007 um 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

  119. Alex Günsche am 31. Januar 2007 um 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.

  120. andreas am 31. Januar 2007 um 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.

  121. Jeunesse am 31. Januar 2007 um 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 !

  122. Alex Günsche am 31. Januar 2007 um 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.

  123. Jeunesse am 31. Januar 2007 um 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

  124. Jeunesse am 31. Januar 2007 um 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 :(

  125. Herr K am 3. Februar 2007 um 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 ?

  126. Alex Günsche am 5. Februar 2007 um 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.

  127. GTFreak am 6. Februar 2007 um 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

  128. Ralf am 14. Februar 2007 um 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

  129. Ralf am 14. Februar 2007 um 14:44 #

    Zu Nummer 127:

    Hallo Stephan, lese bitte den Kommentar 33, war bei mir genauso …

    Bis bald, Ralf

  130. GTfreak am 19. Februar 2007 um 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

  131. ken am 13. März 2007 um 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.

  132. Rasmus am 30. März 2007 um 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:

    ‘Fatal error: Please select a PDF template first!’

    … when trying to print a pdf version of my page.

    Earlier you answered this to this question:

    “you need to modify the PDF template to customize your output. See the advanced tutorial.”

    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:

    PHP version 5 or higher: no

    … but more important (I recon):

    DOM extension installed: no

    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:

    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!

  133. Alex Günsche am 31. März 2007 um 17:33 #

    Rasmus: This plugin works only with PHP5.

  134. Oliver Bockelmann am 3. April 2007 um 21:05 #

    Wo kann man eigentlich die Version 0.3 runterladen?
    Der Link (oben) führt scheinbar zu 0.2.1.

  135. milemann am 30. Mai 2007 um 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

  136. Alex Günsche am 30. Mai 2007 um 09:03 #

    Nicht der relative, sondern der absolute Pfad in Verbindung mit DOMPDF_ENABLE_REMOTE ist 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.

  137. Ray am 4. Juni 2007 um 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.

  138. Anatoly am 6. Juni 2007 um 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…

  139. ben am 6. Juni 2007 um 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.

  140. ben am 7. Juni 2007 um 01:42 #

    err — nevermind, as per comment 54 i’ve got it figured out.

  141. Mikael am 15. Juni 2007 um 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?

  142. danyelle.it am 18. Juni 2007 um 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!! :(

  143. pHiLo am 25. Juni 2007 um 18:08 #

    Hi. The .tar archive seems to be broken. Is this only for me ?

  144. Alex Günsche am 26. Juni 2007 um 13:39 #

    I’m afraid so. Please try the latest 7zip, this should work.

  145. milemann am 26. Juni 2007 um 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

  146. Alex Günsche am 27. Juni 2007 um 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.

  147. Philippe am 28. Juni 2007 um 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.

  148. Alex Günsche am 28. Juni 2007 um 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.

  149. claire am 10. Juli 2007 um 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

  150. John am 18. Juli 2007 um 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

  151. Alex Günsche am 19. Juli 2007 um 09:04 #

    What happens if you append output=pdf to one of you pages?

  152. John am 19. Juli 2007 um 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.

  153. izno am 6. August 2007 um 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
    //

  154. Alex Günsche am 6. August 2007 um 19:12 #

    izno, see this comment and the following.

  155. Dave J. (Scoop0901) am 21. August 2007 um 16:08 #

    I’ve not heard of anyone who’s really gotten this to work properly. For me, that means my search continues.

  156. SkaKri am 30. August 2007 um 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/

  157. Stefano am 20. September 2007 um 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

  158. Alex Günsche am 20. September 2007 um 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.

  159. Busdraghi am 29. September 2007 um 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

  160. Alex Günsche am 1. Oktober 2007 um 10:11 #

    Please try with an image url without the host name.

  161. Busdraghi am 1. Oktober 2007 um 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

  162. Bob K. am 3. Oktober 2007 um 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

  163. Bob K. am 4. Oktober 2007 um 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 2

    Relative 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).

  164. Alex Günsche am 5. Oktober 2007 um 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?

  165. Bob K. am 8. Oktober 2007 um 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!

  166. Michael am 13. Oktober 2007 um 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

  167. Rob L. am 23. Oktober 2007 um 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.

  168. Habib am 31. Oktober 2007 um 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

  169. Taeke am 12. November 2007 um 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 736

    can anyone help me with this?

    Should I change something in the plugin or my theme??

    Thanks!

  170. Alex Günsche am 12. November 2007 um 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.

  171. Andreas am 2. Dezember 2007 um 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ß

  172. Alex Günsche am 4. Dezember 2007 um 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.

  173. Andreas am 4. Dezember 2007 um 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!

  174. Herbert am 30. Dezember 2007 um 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!!!!

  175. Habib am 8. Januar 2008 um 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

  176. Muckel am 9. Januar 2008 um 21:52 #

    Guten Abend,

    nach dem ich den default Fehler behoben habe, der hier ja schon geklärt wurde:

    1. Der Datei /wp-admin/options.php chmod 777 geben (kurzzeitig nur)
    2. dann die Datei im Browser aufrufen ( http://deineurl.tld/deinblog/wp-admin/options.php
    3. Bei dem Eintrag ctpdf_theme default eintragen.
    4. abspeichern (der button ganz unten)
    5. chmod rechte der Datei options.php wieder auf 644 setzen.
    6. fertig

    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

  177. Alex Günsche am 12. Januar 2008 um 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.

  178. VirtualFlavius am 4. Februar 2008 um 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

  179. Christian am 11. Februar 2008 um 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 src eingebunden werden funktionieren ja schon wunderbar im PDF.

    grüße

  180. WU am 10. März 2008 um 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!

  181. Garry Conn am 23. März 2008 um 04:24 #

    Hello WP 2.3.3 User. All installed correctly, but I get this message:

    Fatal error: Please select a PDF template first!

  182. Frank Engel am 28. März 2008 um 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

  183. Ranjeeth am 2. April 2008 um 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..

  184. paolo am 24. April 2008 um 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

  185. paolo am 24. April 2008 um 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

  186. frank am 2. Mai 2008 um 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?

  187. Turel am 5. Mai 2008 um 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

  188. Dan O'Brien am 19. Mai 2008 um 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!

  189. Lauri am 22. Mai 2008 um 19:41 #

    Can you please update this plugin to work on WP 2.5.1? I’m sure I’m not the only one who needs this plugin!

  190. Yann am 28. Mai 2008 um 22:41 #

    Hello !

    Is there a straightforward way to twist ContuttoPDF in order to make it generate a PDF with several pages in a single document ?

    Bye,
    Yann

  191. Beni am 29. Mai 2008 um 03:45 #

    Fatal error: Call to undefined function imagecreatetruecolor() in /home/sloki/user/t79969/sites/beni.smkn2pekanbaru.net/www/wp-content/plugins/contuttopdf/dompdf/include/abstract_renderer.cls.php on line 132

  192. Alex Günsche am 29. Mai 2008 um 15:06 #

    Just attach ?output=pdf to any WP page.

  193. Holger am 15. September 2008 um 14:01 #

    Hallo Alex,
    ich nutze WordPress 2.6.2 DE-Edition im internen “Familiennetz” und möchte die Artikel in pdf-Dateien wandeln. Dafür scheint mir ConttuttoPDF gut geeignet.
    Die Installation verlief problemlos (Demo-Seite wird dargestellt).
    Einige Probleme nach Aktivierung konnte ich selbst beseitigen:

    - Umlaute in den Artikeln werden mit einem Grafikzeichen dargestellt. In der sidebar werden die Umlaute aber korrekt wiedergegeben.
    Lösung: Änderung in contuttopdf.php.
    In Zeile “$ctpdf_wp_content = mb_convert_encoding( $ctpdf_wp_content, “ISO-8859-1″, “UTF-8″ );” Eintrag “ISO-8859-1″ in “UTF-8″ geändert.

    - Beim Aufruf des Plugins über einen Textlink erscheint die Fehlerseite “Fatal error: Please select a PDF template first!”
    Lösung: Eintrag von “default” in der Zeile ctpdf_theme beim Aufruf von …/wordpress/wp-admin/options.php

    Leider funktioniert die pdf-Erstellung immer noch nicht. Beim Aufruf des Plugins erhalte ich folgende Fehlerseite
    “Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /var/www/th/wp-content/plugins/contuttopdf/dompdf/include/php_evaluator.cls.php(66) : eval()’d code on line 27
    Unable to stream pdf: headers already sent”
    Da ich selbst kaum php-Kenntnisse besitze, komme ich ohne Deine Hilfe nicht weiter. Ich hoffe Du weist Rat.
    Gruß
    Holger

  194. Bob am 15. Oktober 2008 um 22:58 #

    Hi all,
    Thanks for the great plugin, very useful! I found a had the “Fatal Error: Please Select a PDF template…” I found that I couldnt open my Options.php to get the correct output. However, changing the value of the ‘ctpdf_theme’ in the “Options” table of MySQL database from “none” to “Default” did the trick. So I guess that the value isn’t being set for some reason in the database, Hope this is useful to somebody. Great Plugin, keep up the good work!
    Cheers
    English Bob

  195. Rechtslupe am 12. November 2008 um 10:08 #

    Danke für das plugin. Es funktioniert wirklich gut.

  196. Kaido am 14. November 2008 um 16:14 #

    Hi, First I love plugin and It works for too… allmost. When I make a PDF, I will get some code with this like ( Caption ID='’attachment_15′’ … ) Could I remove this in some way?

  197. Stephan am 25. November 2008 um 12:30 #

    Auch von mir danke für das Super-Plugin!
    Dennoch habe ich ein Problem: Bei deutschen Beiträgen werden im erzeugten PDF “wenn mehr als 1 Umlaut” in einer Zeile vorkommt, am Ende der Zeile die Buchstaben übereinander geschoben. Also ich meine zumindest, daß es daran liegt. Bei einem oder keinem Umlaut ist die Zeile korrekt. Bei englischen Texten gibt es gar keine Probleme. Kann das an den Font-Metriks (.afm) liegen? Bin ratlos. Vielen Dank.

  198. Carmen am 18. Dezember 2008 um 21:30 #

    Liebe Leute!

    Das ist bisher für mich der beste PDF plugin. Vielen Dank! Es gibt ein Problem in meinem Wordpress Blog: Ich habe qtranslate ebenfalls als Plugin installiert, um auf Englisch, Deutsch und Holländische zu bloggen. Arbeitet mit language tags. Wenn ich euer Plugin installieren, werden alle Sonderlaute auf der Seite nicht mehr entschlüsselt. Also, kein ü, ö, ä etc. Nachdem ich euer Plugin de-installiert habe, funktionierte es wieder.

    Habe ihr dafür eine Lösung? Wäre zu schade…

    Viele Grüße,
    Carmen

  199. James am 21. Dezember 2008 um 13:08 #

    Just installed updated my wordpress installation from 2.6 TO 2.7. Now the PDF plugin has stopped working — produces a 500 Internal Server Error!

    Any cures!

  200. k am 31. Dezember 2008 um 14:21 #

    Thank you for an excellent plugin. I read all the posts here with the various problems, and thought it was worth adding my voice in the “it works excellently” category.

  201. Lyle am 29. Januar 2009 um 09:16 #

    Hi

    My compatibility test works. When running the plugin this error shows.

    Fatal error: Class ‘DOMPDF’ not found in /home/i54benmt/public_html/Main/wp-content/plugins/contuttopdf/contuttopdf.php on line 55

  202. Miss Lunatic am 5. Februar 2009 um 05:06 #

    Hi! I have a problem. When I want to create a pdf, sometimes it works but sometimes it doesn’t. I get this: ERROR 500: ERROR INTERNO DEL SERVIDOR
    Ha surgido un problema inesperado que impide que el servidor pueda llevar a cabo la solicitud.
    Can u help me? Btw, great plugin, dude! :)
    Thank u in advance!

  203. Cyril am 26. Februar 2009 um 14:30 #

    Hi there,

    First off, let me thank you for this GREAT plug-in! I don’t understand how this isn’t a standard in Wordpress…

    I managed to install the plugin pretty easily and the few issues I bumped into were quickly resolved with the answers provided in this thread.

    HOWEVER, I have been going nuts trying to get special characters to display properly in my pdf. European letters with accents come out fine, but the € sign, apostrophies and some spaces between words are replaced with question marks (?).

    As far as I can see, all CTPDF files are UTF-8 encoded, wordpress is set to UTF-8 and MySQL is set to UTF-8 as well… What is going on?

    If I uncomment “add_filter(’the_content’, ‘contutto_filter’);” it messes up my wordpress pages and displays black squares all over the place…

    I am using Wordpress 2.7 and MySQL5, do you think you could help me??? Please????

    Thanks,

    C

  204. Anthony am 16. März 2009 um 19:22 #

    Hey Alex, I got your plugin installed and almost working. It seems very promising when I try out the test page (http://thinkgreen.ciplex.ws/wp-content/plugins/contuttopdf/ctpdf_check.php ), but when I click the link on the live site ( http://thinkgreen.ciplex.ws/2009/03/test-post-defcon-4/ ), it gave me Fatal error: Please select a PDF template first! just like #32 Simon above.

    So I followed your solution and got rid of the error message. However, the page is completely blank now instead.

    Can you offer any help?

  205. Hank am 21. Mai 2009 um 18:13 #

    i am getting the same error as Anthony - after fixing the template issue, i get a blank page after clicking the link. I have removed the meta data line, but still have the issue.

    any help would be greatly appreciated.

  206. Bas am 11. Juni 2009 um 02:46 #

    Great feature! But I run into a problem: testing went well, the button also appears, but when i push it, i get this error message:

    “Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3376 bytes) in /home/artstheb/public_html/blog/wp-content/plugins/contuttopdf/dompdf/include/abstract_renderer.cls.php on line 132″

    you can check it yourself at my blog (when you click my name).

    Any ideas? Your program would be a great help to my project so i hope you can get it to work!

  207. RAJA am 25. Juni 2009 um 12:24 #

    i want to integrate component with CAKEPHP. could you tell me the steps and i required image in header also.

    Thanks in advance.

  208. Uwe am 1. Oktober 2009 um 14:19 #

    So weit wie die anderen komme ich erst gar nicht, obwohl ich als Admin angemeldet bin erscheint bei mir:

    “Du hast nicht ausreichend Rechte, um auf diese Seite zuzugreifen.”

  209. FV Finanz am 29. Oktober 2009 um 09:38 #

    Well! I hope the plugin still works. Till now I always printed the articles into pdf and uploaded them. Qas pretty annoying…

  210. FV Finanz am 29. Oktober 2009 um 12:01 #

    Got some problems with utf8… only get ? in the texts after activating the plugin. Got a german page

  211. Pam am 5. Januar 2010 um 22:29 #

    This plugin sounded like exactly what I want, but I just cannot get it working nicely.

    First I had the “you need to select a template” problem, the solution in one of the comments above fixed it but please add that to the documentation above or make a settings page!

    I’m still having a problem with a lot of Safe Mode errors–it’s suggested above that the server is misconfigured, but I’ve managed to use temporary files before so I really don’t think that’s it.

    But the real problem that’s preventing me from even trying to figure out the second thing is that it converts all utf-8 characters on *all pages, not just the generated pdf* like the non-breaking space that gets inserted when I habitually double-space between sentences into iso-8859 when the html is being delivered as utf-8, so I get a lot of little question mark characters all over the place :(

  212. Lenovo am 14. Januar 2010 um 14:15 #

    Hallo Alex
    Ich habe das gleich Problem wie Anton und Sönke auch:

    ** Fatal error: Please select a PDF template first! **

    Allerdings ist das Default Template vorhanden. Habe die richtige PHP Version, die richtige Wordpress Version und alle Rechte korrekt vergeben.

    An was könnte es liegen?
    Vielen Dank für die Hilfe!

    p.s. Kann dir denn Link zu meinem Wordpress nicht geben da es nur fürs Intranet gedacht ist.

  213. Lenovo am 15. Januar 2010 um 10:54 #

    Konnte es selbst Lösen…

    Habe die options.php geöffnet (im Browser) und dort unter “ctpdf_theme” musste noch “default” eingetragen werden. (Alles ohne Anführungszeichen)

    Sonst ein geniales Plugin. Danke dafür!

  214. wpmanonline am 12. Februar 2010 um 22:36 #

    Hi,

    I was able to run the test fine. But when I try to generate a pdf, I get the error: Fatal error: Please select a PDF template first!

    When I click on the “ContuttoPDF themes” button on my dashboard, I get the following error:

    You do not have sufficient permissions to access this page.

    The URL looks like:

    /wp-admin/themes.php?page=contuttopdf/themes-pdf.php

    What am I doing incorrectly?

    Also, it seems like most of the problems are installation problems. Have you considered setting this up so that it installs in the same way that other wordpress plugins install?

  215. Cris B am 14. Februar 2010 um 22:20 #

    wpmanonline,

    I am getting the same error:

    You do not have sufficient permissions to access this page.

    The URL looks like:

    /wp-admin/themes.php?page=contuttopdf/themes-pdf.php

    I think this is a poorly formed link that is trying to reach:

    /wp-content/plugins/contuttopdf/themes-pdf.php

    Which if you put the correct URL into the web browser doesn’t help either as I then get:

    Fatal error: Call to undefined function get_option() in [your website]/wp-content/plugins/contuttopdf/themes-pdf.php on line 28

    The problem is overcome in my case by opening /wp-admin/options.php and setting ctpdf_theme to the value ‘default’

Please support our OpenSource developments. Donate some bucks! Use the form in the upper right of this page, and get a backlink!

Artikel kommentieren

 (wird nicht veröffentlicht)


Kommentare können bis zu 30 Minuten nach dem Veröffentlichen bearbeitet werden.