|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PDF_delete
<?
$pdf = PDF_new(); PDF_open_file($pdf); $test_pdf = "vertical.pdf"; $doc = PDF_open_pdi($pdf,$test_pdf,"",0); if (!$doc) { return; } $page = PDF_open_pdi_page($pdf,$doc,1,''); if (!$page) { return; } $width =PDF_get_pdi_value($pdf,"width",$doc,$page,0); $height =PDF_get_pdi_value($pdf,"height",$doc,$page,0); PDF_rect($pdf,100,50,$width-200,$height-100); PDF_clip($pdf); PDF_rect($pdf,100,50,300,700); PDF_stroke($pdf); PDF_begin_page($pdf, 595, 842); PDF_place_pdi_page($pdf,$page,0,0,1,1.0); PDF_close_pdi_page($pdf,$page); // $im = pdf_open_image_file($pdf, "jpeg", "something.JPG"); // pdf_place_image($pdf, $im, 0, 0, 0.3); //hide water mark PDF_rect($pdf,0,0,1,1); PDF_clip($pdf); pdf_end_page($pdf); PDF_close($pdf); PDF_close_pdi($pdf,$doc); $buffer = PDF_get_buffer($pdf); header('Content-type: application/pdf'); header('Content-disposition: inline; filename=test.pdf'); header('Content-Description: PHP3 Generated Data'); header('Content-length: ' . strlen($buffer)); echo $buffer; ?> this the error is get [Thu Aug 29 14:51:48 2002] [error] [client xx.xxxxxx] PHP Fatal error: PDFlib error: function 'PDF_delete' must not be called in 'document' scope in Unknown on line 0 |
|
#2
|
|||
|
|||
|
RE: PDF_delete
Be sure that you have the right filenames listed that you are trying to open and that the webserver has permission to access the files...
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > PDF_delete |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|