Wordpress post2pdf plugin
by antonello on Dec.19, 2006, under Wordpress
Post moved here
Hello, this is my brand new wordpress plugin, it is still in a beta version, so use it at your own risk.
What does it do? It converts all your posts in a pdf document, you don’t need any particular application installed on your server or php extention, all you need (is love) is the plugin unzipped in your plugin directory and then activated in Plugin tab!
Only a small subset of html tag are supported by this plugin now, and in some cases it doesn’t render the document in a very good shape, but as i said, it is a beta…
Tags currently supported are
img, a, b, i, li, ol, code, em, pre, strong, font, h1, h2, h3, h4, br
and images are restricted to jpg and png, so don’t expect too much, please.
This plugin is based on a pdf conversion class written by me and built on fpdf library.
As soon as possible i will post also the pdf class and so you can read more about it and more about customization, at this moment no customizations are avaiilable for the plugin.
Installation:
- Upload to your plugins folder, usually `wp-content/plugins/`
- Activate the plugin on the plugin screen
- For better results, if you use accented character like “à ,é,è,ì,ò,ù” please set your wordpress encoding to ISO-8859-1 in Option/Reading menu.
Ver: 0.1.2
State: beta
Latest update: 07 january 2007
Here you can dowload the zip version of Post2Pdf plugin .
Here you can dowload the gzip version of Post2Pdf plugin .
Update history:
– 07 january 2007 –
You can now exclude the plugin in a post or in a page simply including this tag in the text: <!–post2pdf_exclude–> (the string it’s without spaces)
– 20 december 2006 –
Small bug resolved, image support improved.
Post moved here
18 Comments for this entry
3 Trackbacks / Pingbacks for this entry
-
Skylog » Blog Archive » links for 2006-12-20
December 20th, 2006 on 8:19 am[...] Wordpress post2pdf plugin (tags: wordpress plugin) [...]
-
Rafael Arcanjo » Alguns plugins interessantes para Wordpress
December 23rd, 2006 on 7:29 pm[...] Post2Pdf É difícil descobrir o que este plugin faz ? Tudo bem, eu explico. Com ele você dá a opção ao usuário de transformar um post específico em pdf. Com isto, o post estaria disponível para download, enviar para colegas, lotar o hd ou algo do tipo. Para isto basta clicar em um botão que ele adiciona () e-pronto! [...]



December 19th, 2006 on 2:27 pm
Hi, antonello
This is something I’ve been looking for. If you don’t mind, I’d like to know whether or not this plugin can support muliti-byte languages as well.
December 19th, 2006 on 4:26 pm
Hi, I think that fpdf library doesn’t support at all the multi-byte charset, so my plugin doesn’t support too. I’m sorry!
December 19th, 2006 on 6:45 pm
Hi, Antonello
but i´m having some problems…
This very nice plugin. It will be very useful for me, i´m planning to make a site with tutorials of illustrator, and this just come in handy.
I installed the plugin in my test blog, but when i try to convert a post with some image, i got a error message. Something about “getimagesize” or something like that
How can i get rid of the little border around the text?
And how i can change the icon?
Thanks for the plugin
December 19th, 2006 on 9:03 pm
Hi Roberlan, after your comment i’ve made some modification to plugin so to use the latest version, please download it again.
For the icon question, you can change it simply changing the file in the icon plugins/post2pdf/icon directory, keep in mind that if you don’t want to change the code, use the sobstitute the icon file using the same file name.
For the getimagesize error, if you post the entire error message, i can help you, otherwise the only thing i can say is that if you don’t want to use the getimagesize function you have to specify in the img tag width and height attributes.
The little border could be changed simply editing line 29 in plugins/post2pdf/post2pdf.php file.
December 20th, 2006 on 1:21 pm
This is the error message:
“Warning: getimagesize(http://roberlan.com.br/testewp/wp-content/uploads/2006/11/testeimg3.thumbnail.jpg): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/roberlan/public_html/testewp/wp-content/plugins/post2pdf/pdf_class.php on line 275
FPDF error: Some data has already been output, can’t send PDF file”
The address of my test blog is: http://roberlan.com.br/testewp/
December 20th, 2006 on 2:26 pm
Hi Roberlan,
first of all, upgrade the plugin to the latest revision, and for the 403 problem, i think you have to set the image file permissions to 744 (CHMOD 744 filename), or at least this is how i set permissions on images, you can do this change using a ftp client.
Try this solution, and let me know!
December 20th, 2006 on 5:05 pm
Thanks for your response, Antonello.
By the way it is very cool category icon of this page. Where did you get it? lol
December 22nd, 2006 on 10:59 am
Hi goxu, do you mean the wordpress logo?
In that case, take a look here:
http://wordpress.org/about/buttons/
Bye, Antonello
December 22nd, 2006 on 2:48 pm
Cooooooooooool.
January 1st, 2007 on 12:12 pm
Hi Antonello - this is a real nice plugin, but unfortunatelly i am using UTF-8 font encoding on my blog, so it isnt working for me. I have found the ufpdf class, what will do in the latest version both encodings - but my knowledge of php is unfortunately limitad, so that i cant include it by my own. If you could include it for those users like me, that are using utf-8 - it would be nice.
January 4th, 2007 on 6:29 pm
Hi Ernesto, thank you for your suggestion, as soon as possible i’ll try to implement the utf8 version, maybe in the next release!
Bye, Antonello
January 5th, 2007 on 2:36 pm
Thanks Antonello for your prompt response. I have another prob, that maybe for you is to resolve more “easyli”. Is it possible to exclude the plugin from a certain page? I have installed the xdforum plugin and your plugin prevent only on the page off the forum the correct function of it. So if you could post the code for an exclusion of a certain page from your plugin, i would be really grateful.
January 5th, 2007 on 7:36 pm
Ciao Antonello,
ho installato il plugin ma ecco il mio errore quando vado ad usarlo:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/ilsatiro/public_html/wp-content/plugins/post2pdf/pdf_class.php on line 322
Warning: Cannot modify header information - headers already sent by (output started at /home/ilsatiro/public_html/wp-content/plugins/post2pdf/pdf_class.php:322) in /home/ilsatiro/public_html/wp-content/plugins/post2pdf/fpdf/fpdf.php on line 1037
FPDF error: Some data has already been output to browser, can’t send PDF file
January 7th, 2007 on 1:06 pm
Hi Ernesto, I don’t know how can you exclude a plugin from a certain post,if I will find a solution, never mind I’ll post it here.
—————
Ciao Dalis M.,
mi dovresti far vedere il codice html del post che ti da l’errore, altrimenti non posso sapere in che situazione sbaglia.
Inviamelo in caso al mio indirizzo di posta, usa la pagina Contattami del blog poi ti risponderò in privato ed in caso pubblicherò la soluzione.
—————
January 7th, 2007 on 1:38 pm
Hi Ernesto I have found a solution that it’s made for you, in a few minutes I will upload the new plugin version with a tag to exclude it form posts or pages.
Bye
January 7th, 2007 on 4:54 pm
Mille grazie Antonello comunque voglio dire che il tuo plugin e il migliore che ho visto fin adesso in giro, molto meglio p.e. di posttoPDF che non da il return del autore e del titolo. Grazie del tuo grande lavoro (scusa il mio italiano pessimo)
January 9th, 2007 on 5:01 pm
Grazie a te Ernesto per i tuoi suggerimenti e complimenti per l’italiano!
January 9th, 2007 on 5:21 pm
As a few previous poster, I too am using UTF-8 and would really much like -and apreciate- if post2pdf would support UTF-8 in the future.