teynon Posted June 20, 2010 Share Posted June 20, 2010 I have a program I developed with WAMP. Now, I submitted it on a Linux environment. Unfortunately, I don't have access to a linux development environment... (I am in Iraq.) They are telling me they can't get my pdf functionality to work on their set up. What does PHP_PDFlib lite allow me to do? Also, is there special installation requirements on Linux? I haven't had to do it on Linux and I am aggravated that the linux PHP isn't bundled with pdflib... I have found very very limited documentation on pdflib lite and what it actually supports... Here is some sample functionality of what I am trying to do. (Will pdflib_lite support the below commands?) $mypdf = PDF_new(); PDF_open_file($mypdf, $_SERVER['DOCUMENT_ROOT'] . "{$filename}"); PDF_begin_page($mypdf, 780, 580); $myimage = PDF_load_image($mypdf, "png", $_SERVER['DOCUMENT_ROOT'] . "file.png", ""); PDF_place_image($mypdf, $myimage, 15, 30, 0.95); $myfont = PDF_findfont($mypdf, "Times-Roman", "host", 0); PDF_setfont($mypdf, $myfont, 10); // BEGIN DATA INPUT PDF_show_xy($mypdf, $from, 230, 527); PDF_show_xy($mypdf, $name, 420, 527); $startY=445; $inc=23; $aa=0; $pg=1; PDF_show_xy($mypdf, $pg, 660, 45); PDF_show_xy($mypdf, $pages, 705, 45); $drawdate=strtoupper(date("dMy H:i")); PDF_show_xy($mypdf, "{$drawdate}", 540, 558); for ($z=0; $z<$x; $z++) { $line[$z]=htmlspecialchars_decode($line[$z], ENT_QUOTES); $aa++; if ($aa > 16) { PDF_end_page($mypdf); PDF_begin_page($mypdf, 780, 580); PDF_place_image($mypdf, $myimage, 15, 30, 0.95); PDF_setfont($mypdf, $myfont, 10); $pg++; PDF_show_xy($mypdf, $pg, 660, 45); PDF_show_xy($mypdf, $pages, 705, 45); PDF_show_xy($mypdf, $_SHOPNAME, 230, 527); $startY=445; $inc=23; $aa=1; } PDF_show_xy($mypdf, $line[$z], 180, $startY); PDF_show_xy($mypdf, $qty[$z], 535, $startY); PDF_show_xy($mypdf, $qty[$z], 570, $startY); $startY-=$inc; } PDF_end_page($mypdf); PDF_close($mypdf); PDF_delete($mypdf); Link to comment https://forums.phpfreaks.com/topic/205317-pdflib-lite-linux/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.