• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. PHP > PDF Functions

16.24. PDF Functions

PHP provides functions that can create Adobe Portable Document Format (PDF) and Forms Data Format (FDF) content on the fly.

16.24.1. PDF


pdf_set_info_author(int info, string author)

Fill the author field of the info structure


pdf_set_info_creator(int info, string creator)

Fill the creator field of the info structure


pdf_set_info_keywords(int info, string keywords)

Fill the keywords field of the info structure


pdf_set_info_subject(int info, string subject)

Fill the subject field of the info structure


pdf_set_info_title(int info, string title)

Fill the title field of the info structure


void pdf_add_outline(int pdfdoc, string text)

Add bookmark for current page


void pdf_arc(int pdfdoc, double x, double y, double radius, double start, double end)

Draw an arc


void pdf_begin_page(int pdfdoc, double height, double width)

Start page


void pdf_circle(int pdfdoc, double x, double y, double radius)

Draw a circle


void pdf_clip(int pdfdoc)

Clip to current path


void pdf_close(int pdfdoc)

Close the PDF document


void pdf_closepath(int pdfdoc)

Close path


void pdf_closepath_fill_stroke(int pdfdoc)

Close, fill, and stroke current path


void pdf_closepath_stroke(int pdfdoc)

Closes path and draw line along path


void pdf_continue_text(int pdfdoc, string text)

Output text in next line


void pdf_curveto(int pdfdoc, double x1, double y1, double x2, double y2, double x3, double y3)

Draw a curve


void pdf_end_page(int pdfdoc)

End page


void pdf_endpath(int pdfdoc)

End current path


void pdf_fill(int pdfdoc)

Fill current path


void pdf_fill_stroke(int pdfdoc)

Fill and strokes current path


int pdf_get_info(void)

Return a default info structure for a PDF document


void pdf_lineto(int pdfdoc, double x, double y)

Draw a line


void pdf_moveto(int pdfdoc, double x, double y)

Set current point


int pdf_open(int filedesc, int info)

Open a new PDF document


void pdf_rect(int pdfdoc, double x, double y, double width, double height)

Draw a rectangle


void pdf_restore(int pdfdoc)

Restore formerly saved environment


void pdf_rotate(int pdfdoc, double angle)

Set rotation


void pdf_save(int pdfdoc)

Save current environment


void pdf_scale(int pdfdoc, double x-scale, double y-scale)

Set scaling


void pdf_set_char_spacing(int pdfdoc, double space)

Set character spacing


void pdf_set_duration(int pdfdoc, double duration)

Set duration between pages


void pdf_set_font(int pdfdoc, string font, double size, string encoding)

Select the current font face and size


void pdf_set_horiz_scaling(int pdfdoc, double scale)

Set horizontal scaling of text


void pdf_set_leading(int pdfdoc, double distance)

Set distance between text lines


void pdf_set_text_matrix(int pdfdoc, arry matrix)

Set the text matrix


void pdf_set_text_pos(int pdfdoc, double x, double y)

Set text position


void pdf_set_text_rendering(int pdfdoc, int mode)

Determine how text is rendered


void pdf_set_text_rise(int pdfdoc, double value)

Set the text rise


void pdf_set_transition(int pdfdoc, int transition)

Set transition between pages


void pdf_set_word_spacing(int pdfdoc, double space)

Set spacing between words


void pdf_setdash(int pdfdoc, double white, double black)

Set dash pattern


void pdf_setflat(int pdfdoc, double value)

Set flatness


void pdf_setgray(int pdfdoc, double value)

Set drawing and filling color to gray value


void pdf_setgray_fill(int pdfdoc, double value)

Set filling color to gray value


void pdf_setgray_stroke(int pdfdoc, double value)

Set drawing color to gray value


void pdf_setlinecap(int pdfdoc, int value)

Set linecap parameter


void pdf_setlinejoin(int pdfdoc, int value)

Set linejoin parameter


void pdf_setlinewidth(int pdfdoc, double width)

Set line width


void pdf_setmiterlimit(int pdfdoc, double value)

Set miter limit


void pdf_setrgbcolor(int pdfdoc, double red, double green, double blue)

Set drawing and filling color to RGB color value


void pdf_setrgbcolor_fill(int pdfdoc, double red, double green, double blue)

Set filling color to RGB color value


void pdf_setrgbcolor_stroke(int pdfdoc, double red, double green, double blue)

Set drawing color to RGB color value


void pdf_show(int pdfdoc, string text)

Output text at current position


void pdf_show_xy(int pdfdoc, string text)

Output text at position


double pdf_stringwidth(int pdfdoc, string text)

Return width of text in current font


void pdf_stroke(int pdfdoc)

Draw line along path


void pdf_translate(int pdfdoc, double x, double y)

Set origin of coordinate system


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint