Connecting Tech Pros Worldwide Help | Site Map

pdfLib create_pvf

Newbie
 
Join Date: Feb 2009
Location: Gloucester, MA
Posts: 1
#1: Feb 4 '09
I'm having trouble creating multiple PVF files.

It works with a single operKey, but not with multiple operKeys, the careQuery.php below goes to a database and pulls out a blob photo.

Can anyone give me a clue?
Expand|Select|Wrap|Line Numbers
  1. $p->begin_document ( "", "" ) ;
  2. for ( $k = 0; $k <= 3; $k += 1) {
  3.    $p->begin_page_ext ( $pagewidth, $pageheight, "" );
  4.    $operKey = '10019152';
  5.  
  6.    /*  This is commented out 'cause it doesn't work
  7.    if ($k=0)
  8.    $operKey = '10019152';
  9.    if ($k=1)
  10.     $operKey = '10000431';
  11.    if ($k>1)
  12.     $operKey = '10017721';
  13.    */
  14.  
  15.    include './cardQuery.php';
  16.  
  17.    //Create PDF Virtual File (PVF)
  18.    $pvf_filename = "/var/www/html/jops/" . $operKey . ".jpg";
  19.    $p->create_pvf($pvf_filename,$picture,"");
  20.    $image2 = $p->load_image("jpeg", $pvf_filename, "");
  21.    $p->fit_image($image2, 160,70,
  22.          "boxsize={65 70} position={left top} fitmethod=meet");
  23.    $p->delete_pvf($pvf_filename);
  24.    $p->end_page_ext ( "" );
  25.  
  26. }
  27. $p->end_document ( "" );
Reply

Tags
create multiple pvf, create_pvf, pdflib


Similar PHP bytes