PDF Functions

PHP provides functions that can be used to create Adobe Portable Document Format (PDF) files on the fly. See http://www.pdflib.com/ for the required pdflib library and associated documentation.

ClibPDF is an alternate PDF generation library available at http://www.fastio.com. PHP also supports ClibPDF, with functions that begin with cpdf_ and are very similar to the regular pdf_ functions.

void pdf_add_annotation(int pdfdoc, double xll, double yll, double xur, double xur, string title, string text)

Set annotation

void pdf_add_outline(int pdfdoc, string text);

Add bookmark for current page

void pdf_add_pdflink(int pdfdoc, double llx, double lly, double urx, double ury, string filename, int page, string dest)

Add link to PDF document

void pdf_add_weblink(int pdfdoc, double llx, double lly, double urx, double ury, string url)

Add link to web resource

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_close_image(int pdfimage)

Close the PDF image

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)

Close 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_execute_image(int pdf, int pdfimage, int x, int y, int scale)

Place stored image in the PDF document

void pdf_fill(int pdfdoc)

Fill current path

void pdf_fill_stroke(int pdfdoc)

Fill and stroke current path

void pdf_get_image_height(int pdf, int pdfimage)

Return the height of an image

void pdf_get_image_width(int pdf, int pdfimage)

Return the width of an image

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

int pdf_open_gif(int pdf, string giffile)

Open a GIF file and return an image for placement in a PDF document

int pdf_open_jpeg(int pdf, string jpegfile)

Open a JPEG file and return an image for placement in a PDF document

int pdf_open_memory_image(int pdf, int image)

Take a GD image and return an image for placement in a PDF document

void pdf_place_image(int pdf, int pdfimage, int x, int y, int scale)

Place image in the PDF document

void pdf_put_image(int pdf, int pdfimage)

Store image in the PDF document for later use

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_border_color(int pdfdoc, double red, double green, double blue)

Set color of box surrounding web links

void pdf_set_border_style(int pdfdoc, string style, double width)

Set style of box surrounding web links

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 [, int embed])

Select the current font face and size

void pdf_set_horiz_scaling(int pdfdoc, double scale)

Set horizontal scaling of text

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_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, double x, double y)

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

FDF

Forms Data Format (FDF) is a format for handling forms within PDF documents. Refer to http://partners.adobe.com/asn/developer/acrosdk/main.html for more information about FDF:

void fdf_add_template(int fdfdoc, int newpage, string filename, string template, int rename)

Add a template to the FDF document

void fdf_close(int fdfdoc)

Close the FDF document

void fdf_create(void)

Create a new FDF document

void fdf_get_file(int fdfdoc)

Get the value in the /F key

void fdf_get_status(int fdfdoc)

Get the value in the /Status key

void fdf_get_value(int fdfdoc, string fieldname)

Get the value of a field as string

void fdf_next_field_name(int fdfdoc [, string fieldname])

Get the name of the next field name or the first field name

int fdf_open(string filename)

Open a new FDF document

void fdf_save(int fdfdoc, string filename)

Write out an FDF file

void fdf_set_ap(int fdfdoc, string fieldname, int face, string filename, int pagenr)

Set the value of a field

void fdf_set_file(int fdfdoc, string filename)

Set the value in the /F key

void fdf_set_status(int fdfdoc, string status)

Set the value in the /Status key

void fdf_set_value(int fdfdoc, string fieldname, string value, int isName)

Set the value of a field

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.59.231