|
cpdf_text
Output text with parameters
(PHP 4, PHP 5 <= 5.0.5)
Code Examples / Notes » cpdf_textxerofunnospma
Unfortunately there hasn't been anyone else adding the textBox feature to the PHP CPDF functions, so I had to it. ;) in order to get a cpdf_textbox function, so that you don't have to call the cpdf_text function for every single line of text you want to print. patch: http://mpex.net/software/mirror/cpdf_patch Then recompile php with cpdf support and use the new function. It has to be called in between the cpdf_begin_text and cpdf_end_text tags cpdf_textbox(int pdfdoc, double x-koor, double y-koor, double width, double height, double angle, double linespace, string text [, int alignmode [, float paragraphspacing [, int newlinemode]]]); Notes: Alignmode aligns the text within the box: 0 -- left (default) 1 -- center 2 -- right 3 -- justify Newline mode: if non-zero, NL ("\n") is a line break, if 0 reformatted (default 0) Have fun with it. It works great for me. ;) XeROfun justinpg
The optional parameter alignmode is defined as follows: 0 -- lower left 1 -- lower middle 2 -- lower right 3 -- middle left 4 -- middle middle 5 -- middle right 6 -- upper left 7 -- upper middle 8 -- upper right The alignment is with respect to the (x,y) coordinates of the text. 'lower left' means the lower left corner of the text is at point (x,y). Try them out with coordinates (0,0) to get a feel for them. |
Change Languagecpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate |