oto kod:
<?php // zaladowanie pliku z funkcjami (np. ZapisDoPliku) include(\"inc/function.inc\"); // zaladowanie biblioteki odpowiedzialnej za obsluge formatu PDF // *********************************** $p = pdf_new(); // stworzenie nowego pliku typu PDF pdf_open_file($p,\"\"); // Open an existing PDF document and prepare it for later use. // RETURN: PDI document identifier $pdi = pdf_open_pdi($p, \"hello.pdf\", \"\", 0); // read values $page = pdf_open_pdi_page($p, $pdi, 1, \"\"); $width = pdf_get_pdi_value($p, \"width\", $pdi, $page, 0); $height = pdf_get_pdi_value($p, \"height\", $pdi, $page, 0); pdf_begin_page($p,$width,$height); // na razie dodaje wylacznie ramke bez tekstu pdf_place_pdi_page($p,$page,0.0,0.0,1.0,1.0); // dodanie tekstu $font = PDF_load_font($p, \"Arial\", \"iso8859-16\", \"\"); // Set the current font in the specified size PDF_setfont($p, $font, 24.0); // Set the position for text output on the page pdf_show_xy($p, \"±êæó¶³¿¼\", 100, 500); pdf_close_pdi_page($p,$page); pdf_end_page($p); pdf_close($p); $buf = PDF_get_buffer($p); $nazwaPliku = \"nowy_z_szablonu.pdf\"; PDF_delete($p); ?>
OKEJ juz dziala, zostawiam informacje dla przyszlych pokolen, cytat z manuala:
Cytat
File name handling in php. Unqualified file names (without any path component) and
relative file names for PDF, image, font and other disk files are handled differently in
Unix and Windows versions of php:
> php on Unix systems will find files without any path component in the directory
where the script is located.
> php on Windows will find files without any path component only in the directory
where the php DLL is located.
In order to provide platform-independent file name handling use of PDFlib’s Search-
Path facility (see Section 3.1.6, »Resource Configuration and File Searching«, page 51) is
strongly recommended.
relative file names for PDF, image, font and other disk files are handled differently in
Unix and Windows versions of php:
> php on Unix systems will find files without any path component in the directory
where the script is located.
> php on Windows will find files without any path component only in the directory
where the php DLL is located.
In order to provide platform-independent file name handling use of PDFlib’s Search-
Path facility (see Section 3.1.6, »Resource Configuration and File Searching«, page 51) is
strongly recommended.
polecam dokladna sciezke dostepu :-)