Web Design Forum: Creating PDFs from PHP - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Creating PDFs from PHP Rate Topic: -----

#1 User is online   Renaissance-Design 

  • Available for custom WordPress work
  • View blog
  • Group: Moderators
  • Posts: 3,595
  • Joined: 12-August 10
  • Reputation: 559
  • Gender:Male
  • Location:South Wales
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 22 January 2012 - 11:38 AM

Ok, so I know you can create PDFs line by line in PHP using a lib like Zend_PDF, but what I'm ideally looking to do is take a HTML page with a print stylesheet and output that as a PDF document.

So far I've come up with two possible solutions:



Neither is absolutely ideal for what I want to do. Dompdf is a HTML rendering engine written entirely in PHP, which is about as efficient as it sounds and has ropey float support. CUPS-PDF would have a minimum requirement of a VPS since it's a system printer.

So, anyone have any alternatives?
0

#2 User is offline   CSN-UK 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 213
  • Joined: 27-December 10
  • Reputation: 22
  • Gender:Male
  • Location:Swindon, Wiltshire, UK
  • Experience:Advanced
  • Area of Expertise:Entrepreneur

Posted 23 January 2012 - 09:34 AM

This is a tad of a long shot as I've not done it in a long while so excuse the vagueness... If memory serves me you can get around it via XSLT although a quick Google seems to be XML -> via XSLT -> XSL-FO -> via Apache FOP -> PDF.

I'll see if I can dig up some of the code I used for this as I suspect I'll also be using it again shortly in the future.

This post has been edited by CSN-UK: 23 January 2012 - 09:39 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users