How to embed a pdf file in php or htm without href (1 viewing) (1) Guests
How to embed a pdf file in php or htm without href
by jahflasher 6 Months, 2 Weeks ago
Hey i have scuring the web for this. I have done it before but can remember how it is done. any ideas
The administrator has disabled public write access. | Report to moderator   Logged Logged  
Re:How to embed a pdf file in php or htm without h
by cyberpunk 6 Months, 2 Weeks ago
_embed_ded for viewing? within the page? is that what your requesting? Just tryign to make sure before i go off on a unecessary answer
The administrator has disabled public write access. | Report to moderator   Logged Logged  
Re:How to embed a pdf file in php or htm without href
by jahflasher 6 Months, 2 Weeks ago
Yes, without having to call it using a h ref _link_
The administrator has disabled public write access. | Report to moderator   Logged Logged  
Re:How to embed a pdf file in php or htm without h
by cyberpunk 6 Months, 2 Weeks ago
This is a code excerpt from an oriely php book. I think this is what your looking for.

Code: :

  ?php   $p pdf_new();   pdf_open_file($p);   pdf_set_info($p,"Creator","hello.php");   pdf_set_info($p,"Author","Rasmus Lerdorf");   pdf_set_info($p,"title","Hello world (PHP)");   pdf_set_parameter($p"resourcefile",                     '/usr/local/lib/fonts/pdflib.upr');   pdf_begin_page($p,612,792);   pdf_set_text_pos($p,25,750);   $fonts = array('Courier'=>0,'Courier-Bold'=>0,'Courier-BoldOblique'=>0,                  'Courier-Oblique'=>0,'Helvetica'=>0,'Helvetica-Bold'=>0,                  'Helvetica-BoldOblique'=>0,'Helvetica-Oblique'=>0,                  'Times-Bold'=>0,'Times-BoldItalic'=>0'Times-Italic'=>0,                  'Times-Roman'=>0'LuciduxSans'=>1,                  'Georgia' => 1'Arial' => 1'Century Gothic' => 1,                  'Century Gothic Bold' => 1'Century Gothic Italic' => 1,                  'Century Gothic Bold Italic' => 1                 );   foreach($fonts as $f=>$embed) {     $font pdf_findfont($p,$f,"host",$embed);     pdf_setfont($p,$font,25.0);     pdf_continue_text($p,"$f (".chr(128)." Ç à á â ã ç è é ê)");   }   pdf_end_page($p);   pdf_close($p);   $buf pdf_get_buffer($p);   $len strlen($buf);   Header("Content-type: application/pdf");   Header("Content-Length: $len");   Header("Content-Disposition: inline; filename=hello_php.pdf");   echo $buf;   pdf_delete($p); ?>

The administrator has disabled public write access. | Report to moderator   Logged Logged  
 
     
Powered by FireBoardget the latest posts directly to your desktop