PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old August 30th, 2002, 12:38 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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

Reply With Quote
  #2  
Old August 30th, 2002, 12:55 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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...

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > PDF_delete


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway