![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 30.07.2003 Ostrzeżenie: (0%) ![]() ![]() |
Mając taki skrypt który generuje PDF'a(biblioteka PDFlib 5.0.1) pod php(4.3.1)(to wszystko pod Linux'em Red Hat 7.1)-nie pojawiają się polskie znaki, co to moze być.
[php:1:1b8a0929dc]<?php /* create a new PDFlib object */ $p = PDF_new(); /* open new PDF file; insert a file name to create the PDF on disk */ PDF_open_file($p, ""); PDF_set_info($p, "Creator", "hello.php"); PDF_set_info($p, "Author", "Rainer Schaaf"); PDF_set_info($p, "Title", "a"); PDF_begin_page($p, 595, 842); /* start a new page */ $font = PDF_load_font($p, "Times-Roman", "iso8859-2", ""); PDF_setfont($p, $font, 24.0); PDF_set_text_pos($p, 50, 700); PDF_show($p, "śńłóżź"); PDF_end_page($p); /* close page */ PDF_close($p); /* close PDF document */ $buf = PDF_get_buffer($p); $len = strlen($buf); header("Content-type: application/pdf"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=hello.pdf"); print $buf; PDF_delete($p); /* delete the PDFlib object */ ?>[/php:1:1b8a0929dc] [KaMeLeOn]: 1. php Pro => php 2. BBCode [Seth]: 1. php => Skrypty |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 18.07.2025 - 04:18 |