0

Is it possible to integrate dompdf, tcpdf or fpdf into wordpress website to print the pages? If so how can i add this library file into my wordpress website.

Jagankumar
  • 127
  • 1
  • 3
  • 13
  • [this link](http://stackoverflow.com/questions/17948418/how-to-create-a-fpdf-wordpress-plugin) can help you about fpdf in wordpress – Arka Apr 26 '14 at 05:19
  • @Arkaprava thanks let me try this... – Jagankumar Apr 26 '14 at 05:22
  • Did you search the plugin directory? http://wordpress.org/plugins/search.php?q=dompdf or http://wordpress.org/plugins/search.php?q=tcpdf – BrianS Apr 28 '14 at 14:18
  • @BrianS yes.. I have searched the wordpress plugins but it will not produce the result as i expect also i want the exact page design as a pdf when we click print pdf. – Jagankumar Apr 30 '14 at 02:48

1 Answers1

0

There are some limitations to what dompdf can do as far as layout. Though dompdf is working towards browser-class rendering it's not yet there. We generally recommend writing your own script using the class, but you can quickly get started by placing dompdf on your server and using the dompdf.php script. Just place the dompdf directory in the root of your site.

For example, if your site is http://example.com and you place the dompdf files in your root you can render a page to pdf by just linking it as such: http://example.com/dompdf/dompdf.php?input_file=http://example.com/some_page.

The only drawback is that you have to set DOMPDF_ENABLE_REMOTE to true to use this method. See Security Issue on Accessing Remote Image with dompdf for a discussion of potential security concerns. We have a best-practices document in the works which will be posted to the dompdf project wiki when it's ready.

Community
  • 1
  • 1
BrianS
  • 13,284
  • 15
  • 62
  • 125