PDF_set_parameter

(PHP 4, PECL pdflib >= 1.0.0)

PDF_set_parameterSet string parameter

说明

bool PDF_set_parameter ( resource $p , string $key , string $value )

Sets some PDFlib parameter with string type. 成功时返回 TRUE, 或者在失败时返回 FALSE

User Contributed Notes

phillip at formstar dot com 11-Oct-2000 08:12
Here is a list of keywords and possible values:
/*
 * PDF_get_parameter() and PDF_set_parameter() deal with strings,
 * PDF_get_value() and PDF_set_value() deal with numerical values.
 */

/* setup */                                /* value set for 3rd arg */   
"compress"    /* set_parameter */            | '[0-9]'
"resourcefile"    /* set_parameter */        Free string
"FontAFM"    /* set_parameter */        Free string
"FontPFM"    /* set_parameter */        Free string
"FontOutline"    /* set_parameter */        Free string
"Encoding"    /* set_parameter */        Free string
"debug"        /* set_parameter */        Free string (if 'c' is 1st char, compress off)
"nodebug"    /* set_parameter */        Free string (if 'c' is 1st char, compress on)
"compatibility"    /* set_parameter */ | '1.2' | '1.3'
"prefix"    /* set_parameter */        Free string
"warning"    /* set_parameter */
"binding"    /* internal use only */
"flush"        /* set_parameter */            |'none' | 'page' | 'content' | 'heavy'

/* page */
"pagewidth"    /* set_value */        | float for pixel value |
"pageheight"    /* set_value */    | float for pixel value |

/* font and text */
"textx"        /* get_value */        | 0 |
"texty"        /* get_value */        | 0 |
"font"        /* get_value */        | 0 |
"fontsize"    /* get_value */        | 0 |
"leading"    /* set_value */        | cur_font_size + points down |
"textrise"    /* set_value */
"horizscaling"    /* set_value */
"textrendering"    /* set_value */
"charspacing"    /* set_value */
"wordspacing"    /* set_value */
"underline"    /* set_parameter */    | 'true' | 'false'
"overline"    /* set_parameter */    | 'true' | 'false'
"strikeout"    /* set_parameter */    | 'true' | 'false'
"fontname"    /* get_parameter */    | 0 - 256 |
"capheight"    /* get_value */        | 0 - 256 |
"ascender"    /* get_value */        | 0 - 256 |
"descender"    /* get_value */        | 0 - 256 |

/* graphics */
"currentx"    /* get_value */        | 0 |
"currenty"    /* get_value */        | 0 |
"fillrule"    /* set_parameter */    |'winding'|'evenodd'

/* image */
"imagewidth"    /* get_value */    | image file descriptor: > 0, < 256 |
"imageheight"    /* get_value */    | image file descriptor: > 0, < 256 |
"resx"        /* get_value */        | image file descriptor: > 0, < 256 |
"resy"        /* get_value */        | image file descriptor: > 0, < 256 |

/* hypertext */
"openaction"    /* set_parameter */ |'retain'|'fitpage'|'fitbbox'|'fitwidth'|'fitheight'
"transition"    /* set_parameter */
"duration"    /* set_value */
max at cnsys dot bg 06-Jul-2000 06:01
About parameters and all about PDF functions you can find at: www.pdflib.com - get the latest version of pdflib with documentation