PHP and Digital Production Printing Layout in PDF
Posted: Wed Nov 10, 2004 10:40 am
Has anyone come across any functions for dynamically creating press optimised PDF's for digital printing?
Basically what we are trying to do is create online documents to print quality (read letter heads and business cards) we can do this with an image but cannot find a way of doing it as a PDF. Maybe I'm missing something but I can find any options to set the output type of PDF we are wanting to create. IE screen optimised, print optimised, print optimised, press optimised etc.
(These basically do things like set images to 72 DPI for screen/ 300 DPI for print / 600 DPI for press etc)
Maybe I'm missing something obvious but I cant seem to see the option I'm looking for as everything seems to default to a screen optimised at 72 DPI
See http://uk.php.net/manual/en/ref.pdf.php for the standard functions were are using
such as
Paste ===>
$pdf = pdf_new();
//pdf_open_file($pdf,"");
if (!pdf_open_file($pdf, "")) {
print error;
exit;
}
PDF_set_parameter($pdf, "resourcefile", "/usr/local/pdflib/fonts/pdflib.upr");
PDF_set_parameter($pdf,"prefix","/usr/local/pdflib/fonts");
pdf_begin_page($pdf, 595, 842);
pdf_add_outline($pdf, "Page 1");
//pdf_set_font($pdf, "Times-Roman", 30, "host");
// set chinese characters,
$font = pdf_findfont($pdf, "MHei-Medium", "B5pc-H",0);
if ($font) {
pdf_setfont($pdf, $font, 30);
}
<==== End Paste
Thanks in advance[/b]
Basically what we are trying to do is create online documents to print quality (read letter heads and business cards) we can do this with an image but cannot find a way of doing it as a PDF. Maybe I'm missing something but I can find any options to set the output type of PDF we are wanting to create. IE screen optimised, print optimised, print optimised, press optimised etc.
(These basically do things like set images to 72 DPI for screen/ 300 DPI for print / 600 DPI for press etc)
Maybe I'm missing something obvious but I cant seem to see the option I'm looking for as everything seems to default to a screen optimised at 72 DPI
See http://uk.php.net/manual/en/ref.pdf.php for the standard functions were are using
such as
Paste ===>
$pdf = pdf_new();
//pdf_open_file($pdf,"");
if (!pdf_open_file($pdf, "")) {
print error;
exit;
}
PDF_set_parameter($pdf, "resourcefile", "/usr/local/pdflib/fonts/pdflib.upr");
PDF_set_parameter($pdf,"prefix","/usr/local/pdflib/fonts");
pdf_begin_page($pdf, 595, 842);
pdf_add_outline($pdf, "Page 1");
//pdf_set_font($pdf, "Times-Roman", 30, "host");
// set chinese characters,
$font = pdf_findfont($pdf, "MHei-Medium", "B5pc-H",0);
if ($font) {
pdf_setfont($pdf, $font, 30);
}
<==== End Paste
Thanks in advance[/b]