Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-07-2011, 08:57 PM   #1
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,857
developers how do you print source code on the fly?

i want users to be able to download snippets of source code in pdf format.

anyone know a trick around getting to send it to pdf format using a php class of some sort?

currently im using dompdf.

__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Tube Themes
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2011, 09:31 PM   #2
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Obviously, the code is being read dynamically, and there's nothing you've found in Pear? During my time on the Python team, I remember some py lib that'd output to PDF. As a last resort, you could probably convert it from the command line.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2011, 09:33 PM   #3
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
And did you try fpdf.org unsuccessfully already?
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2011, 10:01 PM   #4
Kiopa_Matt
Confirmed User
 
Industry Role:
Join Date: Oct 2007
Posts: 1,448
Quote:
Originally Posted by edgeprod View Post
And did you try fpdf.org unsuccessfully already?
That's what I always use, and it's a good little library. PDF is a pain though, because everything has to go pixel by pixel. If you're dynamically generating some statement or invoice, you end up fucking around reloading the PDF a few times a minute just to move a line or piece of text over by a couple pixels here and there, to make sure everything lines up.

It's a pain...
__________________
xMarkPro -- Ultimate Blog Network Management
Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more!
Kiopa_Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-08-2011, 04:45 AM   #5
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
I just bookmarked this a few days back...haven't used it yet.

http://www.pdflib.com/products/pdflib-family/pdflib/

"PDFlib’s main targets are dynamic PDF creation on a Web server"
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-08-2011, 07:04 AM   #6
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,857
Quote:
Originally Posted by TheDoc View Post
I just bookmarked this a few days back...haven't used it yet.

http://www.pdflib.com/products/pdflib-family/pdflib/

"PDFlib?s main targets are dynamic PDF creation on a Web server"
ya dompdf uses pdflib, just dont know how to make it highlight the source code when creating the actual pdf, it tries to run the actual php code, and ive tried highlight_file, even set the output to false, but still no go.

__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Tube Themes
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-08-2011, 07:35 AM   #7
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Quote:
Originally Posted by fris View Post
ya dompdf uses pdflib, just dont know how to make it highlight the source code when creating the actual pdf, it tries to run the actual php code, and ive tried highlight_file, even set the output to false, but still no go.

Not sure how you get the content, but can you remove/filter the php tags?
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-10-2011, 02:00 AM   #8
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Get everything sorted, fris? Feel free to ICQ or call if you need a hand.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.