gazalec Posted March 23, 2007 Share Posted March 23, 2007 ok my new problem is at the company i work for we have QC Certificates for every product me make and they are in PDF format, the only problem is these are stored locally all day then at 6 o'clock every night hundreds of PDF's are uploaded each night, so as you can image it slows down our web server and has even started crashing the local server, so i thought if we had a template of each product of all the information thats the same, e.g. product a is always going to be called b and always going to cost c if you know what i mean, the only problem is that customers still want to view these certificates as PDFs, so they can download them, print them etc. so i was wondering if it is possible to make my PHP/HTML documents into PDFs. Link to comment https://forums.phpfreaks.com/topic/43944-php-to-pdf-is-it-possible/ Share on other sites More sharing options...
flappy_warbucks Posted March 23, 2007 Share Posted March 23, 2007 Yes there is you will be glad to hear, you can either install the PHP_LIB.dll thingie on the PHP installation, or do what i had to do and write a PDF class to handle the writing and making of PDF's Such a class can be found here: http://www.zend.com/zend/spotlight/creatingpdfmay1.php always remember: Google is your friend in times like this. Link to comment https://forums.phpfreaks.com/topic/43944-php-to-pdf-is-it-possible/#findComment-213364 Share on other sites More sharing options...
gazalec Posted March 23, 2007 Author Share Posted March 23, 2007 do i need the PHP_LIB.dll installed for this to work?, because when i'm coding in DreamWeaver usually it recognizes PHP functions and makes them blue but it isn't as though it's wrong?, and i get a fatal error when using PDF_new(); Link to comment https://forums.phpfreaks.com/topic/43944-php-to-pdf-is-it-possible/#findComment-213373 Share on other sites More sharing options...
tauchai83 Posted March 23, 2007 Share Posted March 23, 2007 hi....i think you don need to go through so much step. There is a class written i.e PDF class /******************************************************************************* * Software: FPDF * * Version: 1.52 * * Date: 2003-12-30 * * Author: Olivier PLATHEY * * License: Freeware * * * * You may use, modify and redistribute this software as you wish. * *******************************************************************************/ class FPDF { //Private properties var $page; //current page number var $n; //current object number var $offsets; //array of object offsets var $buffer; //buffer holding in-memory PDF var $pages; //array containing pages var $state; //current document state var $compress; //compression flag var $DefOrientation; //default orientation var $CurOrientation; //current orientation var $OrientationChanges; //array indicating orientation changes var $k; //scale factor (number of points in user unit) var $fwPt,$fhPt; //dimensions of page format in points var $fw,$fh; //dimensions of page format in user unit var $wPt,$hPt; //current dimensions of page in points var $w,$h; //current dimensions of page in user unit var $lMargin; //left margin var $tMargin; //top margin var $rMargin; //right margin var $bMargin; //page break margin var $cMargin; //cell margin var $x,$y; //current position in user unit for cell positioning var $lasth; //height of last cell printed var $LineWidth; //line width in user unit var $CoreFonts; //array of standard font names var $fonts; //array of used fonts var $FontFiles; //array of font files var $diffs; //array of encoding differences var $images; //array of used images var $PageLinks; //array of links in pages var $links; //array of internal links var $FontFamily; //current font family var $FontStyle; //current font style var $underline; //underlining flag var $CurrentFont; //current font info var $FontSizePt; //current font size in points var $FontSize; //current font size in user unit var $DrawColor; //commands for drawing color var $FillColor; //commands for filling color var $TextColor; //commands for text color var $ColorFlag; //indicates whether fill and text colors are different var $ws; //word spacing var $AutoPageBreak; //automatic page breaking var $PageBreakTrigger; //threshold used to trigger page breaks var $InFooter; //flag set when processing footer var $ZoomMode; //zoom display mode var $LayoutMode; //layout display mode var $title; //title var $subject; //subject var $author; //author var $keywords; //keywords var $creator; //creator var $AliasNbPages; //alias for total number of pages } I don have the exact URL for this. But you may google about this class using any search engine. Link to comment https://forums.phpfreaks.com/topic/43944-php-to-pdf-is-it-possible/#findComment-213375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.