1. Trang chủ
  2. » Công Nghệ Thông Tin

PHP Developer''''s Dictionary- P56 pps

5 171 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 363,02 KB

Nội dung

PHP Developer’s Dictionary IT-SC book 275 string font name, double size, string encoding) Description The cpdf_set_font() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to specify a font's name , size , and encoding . Forty-one Roman fonts are supported along with many international varieties—consult the ClibPDF manual for details. Commonly used Roman fonts that are available include Helvetica, Times Roman, and Courier. The size parameter indicates the font size in points. The possible values for encoding are MacRomanEncoding , MacExpertEncoding , WinAnsiEncoding , and NULL , where NULL is the specified font's built-in encoding. If you don't have a preference, WinAnsiEncoding should be used because it is the most efficient. cpdf_set_leading() Syntax void cpdf_set_leading (int pdf document , double distance ) Description The cpdf_set_leading() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to set the spacing between lines of text, where distance is specified in points (72 points = 1 inch). This is useful when using the cpdf_continue_text() function to display text. cpdf_set_text_rendering() Syntax void cpdf_set_text_rendering (int pdf document, int mode) Description The cpdf_set_text_rendering() function, which was added in PHP 3.0.8 and PHP 4.0.b4, sets the mode for character outline. The default is 0, which indicates to fill the character outline with the current fill color. Other values include 1 =stroke text, 2 =fill and stroke text, 3 =invisible, 4 =fill text and add it to clipping path, 5 =stroke text and add it to clipping path, 6 =fill and stroke text and add it to clipping path, and 7 =add it to clipping path. PHP Developer’s Dictionary IT-SC book 276 cpdf_set_horiz_scaling() Syntax void cpdf_set_horiz_scaling (int pdf document , double scale ) Description The cpdf_set_horiz_scaling() function, which was added in PHP 3.0.8 and PHP 4.0.b4, sets the horizontal scaling factor to scale , which is a percentage. This can be used to stretch or skew the horizontal length of a string. The default value is 100 percent. cpdf_set_text_rise() Syntax void cpdf_set_text_rise (int pdf document, double value) Description The cpdf_set_text_rise() function, which was added in PHP 3.0.8 and PHP 4.0.b4, sets the offset value of text from the base line measured in points (72 points = 1 inch). Use a positive value for superscript and a negative value for subscript. cpdf_set_text_matrix() Syntax void cpdf_set_text_matrix (int pdf document, array matrix) Description The cpdf_set_text_matrix() function, which was added in PHP 3.0.8 and PHP 4.0.b4, enables you to associate a transformation matrix with the current text font. A matrix can be used to set the current point, rotation, and skewing. cpdf_set_text_pos() Syntax PHP Developer’s Dictionary IT-SC book 277 void cpdf_set_text_pos (int pdf document, double x-koor, double y-koor, int mode) Description The cpdf_set_text_pos() function, which was added in PHP 3.0.8 and PHP 4.0.b4, sets the location where the next call to cpdf_show() will output text. The optional mode parameter can be used to set the unit length in points. If mode is 0 or not specified, the page's default unit length will be used. cpdf_set_char_spacing() Syntax void cpdf_set_char_spacing (int pdf document, double space) Description The cpdf_set_char_spacing() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to add further spacing between characters. The space parameter should be specified in points (72 points = 1 inch). cpdf_set_word_spacing() Syntax void cpdf_set_word_spacing (int pdf document, double space) Description The cpdf_set_word_spacing() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to add further spacing between words. The space parameter should be specified in points (72 points = 1 inch). cpdf_continue_text() Syntax void cpdf_continue_text (int pdf document, string text) PHP Developer’s Dictionary IT-SC book 278 Description The cpdf_continue_text() function, which was added in PHP 3.0.8 and PHP 4.0.b4, outputs text at the beginning of the next line. The effect is like performing a carriage return and line feed before outputting the text. cpdf_stringwidth() Syntax double cpdf_stringwidth (int pdf document, string text) Description The cpdf_stringwidth() function, which was added in PHP 3.0.8 and PHP 4.0.b4, returns the width of the current font for text in points. A font value must already be set for this function to work properly. cpdf_save() Syntax void cpdf_save (int pdf document) Description The cpdf_save() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to save the current graphics state. It enables you to work easily with one object without impacting other objects. cpdf_restore() Syntax void cpdf_restore (int pdf document) Description The cpdf_restore() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to restore the graphics state you saved with cpdf_save() . It enables you to work easily with one object without impacting other objects. PHP Developer’s Dictionary IT-SC book 279 cpdf_translate() Syntax void cpdf_translate (int pdf document , double x-koor , double y-koor , int mode) Description The cpdf_translate() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to shift the origin of the coordinate system to the x-koor and y-koor values. The optional parameter mode can be used to specify the unit length. If mode is 0 or not specified, the page's default unit length will be used. cpdf_scale() Syntax void cpdf_scale (int pdf document, double x-scale, double y-scale) Description The cpdf_scale() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to scale the coordinate system for both the x- and y-axes, by the x-scale and y- scale factors. cpdf_rotate() Syntax void cpdf_rotate (int pdf document , double angle ) Description The cpdf_rotate() function, which was added in PHP 3.0.8 and PHP 4.0.b4, is used to rotate the current coordinate system by the angle parameter specified in degrees. The rotation is centered at the current origin and a positive value for angle indicates clockwise rotation. cpdf_setflat() . PHP Developer’s Dictionary IT-SC book 275 string font name, double size, string encoding) Description The cpdf_set_font() function, which was added in PHP 3.0.8 and PHP 4.0.b4,. (int pdf document, string text) PHP Developer’s Dictionary IT-SC book 278 Description The cpdf_continue_text() function, which was added in PHP 3.0.8 and PHP 4.0.b4, outputs text at the. added in PHP 3.0.8 and PHP 4.0.b4, is used to restore the graphics state you saved with cpdf_save() . It enables you to work easily with one object without impacting other objects. PHP Developer’s

Ngày đăng: 07/07/2014, 05:20