vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Properties / Options not set in the PDF #264

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a HTML template for the PDF and set <title>your title</title>
2. Create the PDF
3. Open the properties / options of the PDF

What is the expected output? What do you see instead?
The set properties (with inline PHP) must appear in the PDF Properties (as in 
version 0.5.x before).

What version of the product are you using? On what operating system?
domPDF: 0.6.0 beta 2
SUSE Linux Enterprise Server 10 SP3 (x86_64)
PHP 5.2.14

Please provide any additional information below.
I used this inline PHP code in the HTML template. It worked in the version 
0.5.x I used before and since I installed 0.6.0 beta 2 only the title (from the 
HTML title tag) and the create and modified date appears in the properties.
In the 0.5.x version I used before the other properties appears as well.

-----snip-----

<script type="text/php">
if ( isset($pdf) ) {
    $pdf->add_info(array(
        'Title'=> 'my title'
        ,'Subject'=>'subject'
        ,'Author'=>'company name / department'
        ,'Keywords'=>'tag1, tag2, tag3'
         ));

}

</script>

-----snap-----

Original issue reported on code.google.com by ukarr...@gmail.com on 8 Apr 2011 at 9:02

GoogleCodeExporter commented 9 years ago
Hello, inline PHP was disabled by default in dompdf 0.6 beta2 for security 
reasons.
You can re-enable it in the config file (DOMPDF_INLINE_PHP), or you can set 
these info just by adding meta tags to the HTML file :

http://code.google.com/p/dompdf/issues/detail?id=23

The meta tag names you can use are the same as in your array, except for the 
title where this is the <title> tag that is taken.

Original comment by fabien.menager on 8 Apr 2011 at 10:48

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:15