Note that there are some explanatory texts on larger screens.

plurals
  1. POeZpdf pdf downloads fail 2 in 3 times, same data, same pdf but stalls on download
    primarykey
    data
    text
    <p>I have a carnation of eZpdf running that generates pdf certificates which then get pushed to the browser to download. These work around 1 in 3 times but every other time it builds the pdf, shows me the download box to save the file, appears in my download manager then just stalls before eventually failing.</p> <p>I'm thinking it may be a php memory issue or timeout issue but very odd that it would work once for the exact same set of data then fail.</p> <p>this is basically what I have</p> <pre><code>set_time_limit(1800); $pdfPassword = 'asdasda'; //choose bg image based on choice switch($_POST['certificateType']){ case 1: $pdf = new backgroundPDF('a4', 'portrait', 'image', array('img' =&gt; BASEURL.'/common/pdf/images/uno.png')); break; case 2: $pdf = new backgroundPDF('a4', 'portrait', 'image', array('img' =&gt; BASEURL.'/common/pdf/images/dos.png')); break; case 3: $pdf = new backgroundPDF('a4', 'portrait', 'image', array('img' =&gt; BASEURL.'/common/pdf/images/tres.png')); break; } $pdf-&gt;ezSetMargins(50,70,50,50); $pdf-&gt;selectFont(BASEURL.'/common/pdf/fonts/Helvetica.afm'); $pdf-&gt;setColor(0/255,0/255,0/255); //build strings $commDate = friendlyDateOnly($info['Commisioned_Date_DT']); //get logo if($supplier['logo'] != ''){ $logo = BASEURL.'/uploads/logos/'.$supplier['logo']; }else{ $logo = BASEURL.'/uploads/logos/SSAIB.png'; } /* THIS IS FOR CERTIFICATE 1 */ //certificate info $pdf-&gt;addText(144,692,14,$info['Scope_CH']); $pdf-&gt;addText(144,663,14,$info['Certificate_Number']); //customer info $pdf-&gt;addText(225,591,9,$info['Customer_Name']); $pdf-&gt;addText(225,571,9,$info['Address_1_VC']); $pdf-&gt;addText(225,559,9,$info['Address_2_VC']); $pdf-&gt;addText(225,547,9,$info['Address_2a_VC']); $pdf-&gt;addText(225,535,9,$info['Address_3_VC']); $pdf-&gt;addText(225,516,9,$info['Telephone_Number_VC']); $pdf-&gt;addText(225,493,9,$info['Installers_Reference_VC']); $pdf-&gt;addText(225,472,9,$commDate); //$pdf-&gt;ezText($address, 9, 225,527); //system info $pdf-&gt;addText(225,404,9,$info['Extended_Grade']); $pdf-&gt;addText(225,383,9,$info['Extended_Notification_Option']); if($info['Extended_ARC'] != ''){ $pdf-&gt;addText(225,362,9,$info['Extended_ARC']); } $pdf-&gt;addText(225,339,9,$info['Installed_To_Standards_VC']); //Installers info $pdf-&gt;addText(215,300,10,$_SESSION['user']['Trading_Name_VC']); $pdf-&gt;addText(215,285,9,$supplier['Address_1']); $pdf-&gt;addText(215,273,9,$supplier['Address_2']); $pdf-&gt;addText(215,261,9,$supplier['Town']); $pdf-&gt;addText(215,249,9,$supplier['County']); $pdf-&gt;addText(215,237,9,$supplier['Post_Code']); $pdf-&gt;addText(215,223,9,"Tel: ".$supplier['Telephone']); $pdf-&gt;addText(120,176,9,friendlyDateOnly($info['Issue_Date'])); //add logo if(strstr($logo, '.png')){ $pdf-&gt;addPngFromFile($logo,430,740,90,90); }else{ $pdf-&gt;addJpegFromFile($logo,430,740,90,90); } $pdf-&gt;setEncryption('',$pdfPassword,array('print')); #create the pdf and stream it to the page $pdf-&gt;ezStream(); </code></pre> <p>When the download eventually times out I get the following error message</p> <pre><code>/Users/matt/Downloads/saz3CwFa.pdf.part could not be saved, because the source file could not be read. </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload