PHP_PDF: How to get a pdf`s general info (author, ...)?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
nave
Forum Newbie
Posts: 4
Joined: Sun Sep 08, 2002 12:26 pm
Location: Germany
Contact:

PHP_PDF: How to get a pdf`s general info (author, ...)?

Post by nave »

Hi there,

the PDFlib provides functions to set the values of a pdf file like the author, creator, title a.s.o. But I didn't find any possibility to retrieve this information from an existing pdf file.

Does anybody know?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

http://www.google.com

depending on how you search...

There is always an answer with Google!
User avatar
nave
Forum Newbie
Posts: 4
Joined: Sun Sep 08, 2002 12:26 pm
Location: Germany
Contact:

Post by nave »

Nice ad, but it didn't help. Google didn't provide any information about how to get general pdf file infos by PHP...

Oromian, possibly you could send me a link to a helpful page you found by using Google?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

User avatar
nave
Forum Newbie
Posts: 4
Joined: Sun Sep 08, 2002 12:26 pm
Location: Germany
Contact:

Post by nave »

Hm, within that PDFLib manual (by the way: you can found this at the php.net site, too) there's no function mentioned that allows to extract the information from the pdf file I need. There is only the "pdf_get_info()"-function which doesn't exist in 2.x versions any more and is actually used to return an empty info struct that's to be filled -- and not to retrieve the information.

Possibly, such a function I'm looking for doesn't exist...
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

  • pdf_add_annotation - Deprecated: Adds annotation
    pdf_add_bookmark - Adds bookmark for current page
    pdf_add_launchlink - Add a launch annotation for current page
    pdf_add_locallink - Add a link annotation for current page
    pdf_add_note - Add a note annotation for current page
    pdf_add_outline - Deprecated: Adds bookmark for current page
    pdf_add_pdflink - Adds file link annotation for current page
    pdf_add_thumbnail - Adds thumbnail for current page
    pdf_add_weblink - Adds weblink for current page
    pdf_arc - Draws an arc (counterclockwise)
    pdf_arcn - Draws an arc (clockwise)
    pdf_attach_file - Adds a file attachement for current page
    pdf_begin_page - Starts new page
    pdf_begin_pattern - Starts new pattern
    pdf_begin_template - Starts new template
    pdf_circle - Draws a circle
    pdf_clip - Clips to current path
    pdf_close_image - Closes an image
    pdf_close_pdi_page - Close the page handle
    pdf_close_pdi - Close the input PDF document
    pdf_close - Closes a pdf object
    pdf_closepath_fill_stroke - Closes, fills and strokes current path
    pdf_closepath_stroke - Closes path and draws line along path
    pdf_closepath - Closes path
    pdf_concat - Concatenate a matrix to the CTM
    pdf_continue_text - Outputs text in next line
    pdf_curveto - Draws a curve
    pdf_delete - Deletes a PDF object
    pdf_end_page - Ends a page
    pdf_end_pattern - Finish pattern
    pdf_end_template - Finish template
    pdf_endpath - Deprecated: Ends current path
    pdf_fill_stroke - Fills and strokes current path
    pdf_fill - Fills current path
    pdf_findfont - Prepare font for later use with pdf_setfont.
    pdf_get_buffer - Fetch the buffer containig the generated PDF data.
    pdf_get_font - Deprecated: font handling
    pdf_get_fontname - Deprecated: font handling
    pdf_get_fontsize - Deprecated: font handling
    pdf_get_image_height - Returns height of an image
    pdf_get_image_width - Returns width of an image
    pdf_get_majorversion - Returns the major version number of the PDFlib
    pdf_get_minorversion - Returns the minor version number of the PDFlib
    pdf_get_parameter - Gets certain parameters
    pdf_get_pdi_parameter - Get some PDI string parameters
    pdf_get_pdi_value - Gets some PDI numerical parameters
    pdf_get_value - Gets certain numerical value
    pdf_initgraphics - Resets graphic state
    pdf_lineto - Draws a line
    pdf_makespotcolor - Makes a spotcolor
    pdf_moveto - Sets current point
    pdf_new - Creates a new pdf object
    pdf_open_CCITT - Opens a new image file with raw CCITT data
    pdf_open_file - Opens a new pdf object
    pdf_open_gif - Deprecated: Opens a GIF image
    pdf_open_image_file - Reads an image from a file
    pdf_open_image - Versatile function for images
    pdf_open_jpeg - Deprecated: Opens a JPEG image
    pdf_open_memory_image - Opens an image created with PHP's image functions
    pdf_open_pdi_page - Prepare a page
    pdf_open_pdi - Opens a PDF file
    pdf_open_png - Deprecated: Opens a PNG image
    pdf_open_tiff - Deprecated: Opens a TIFF image
    pdf_open - Deprecated: Open a new pdf object
    pdf_place_image - Places an image on the page
    pdf_place_pdi_page - Places an image on the page
    pdf_rect - Draws a rectangle
    pdf_restore - Restores formerly saved environment
    pdf_rotate - Sets rotation
    pdf_save - Saves the current environment
    pdf_scale - Sets scaling
    pdf_set_border_color - Sets color of border around links and annotations
    pdf_set_border_dash - Sets dash style of border around links and annotations
    pdf_set_border_style - Sets style of border around links and annotations
    pdf_set_char_spacing - Deprecated: Sets character spacing
    pdf_set_duration - Deprecated: Sets duration between pages
    pdf_set_font - Deprecated: Selects a font face and size
    pdf_set_horiz_scaling - Sets horizontal scaling of text
    pdf_set_info_author - Fills the author field of the document
    pdf_set_info_creator - Fills the creator field of the document
    pdf_set_info_keywords - Fills the keywords field of the document
    pdf_set_info_subject - Fills the subject field of the document
    pdf_set_info_title - Fills the title field of the document
    pdf_set_info - Fills a field of the document information
    pdf_set_leading - Deprecated: Sets distance between text lines
    pdf_set_parameter - Sets certain parameters
    pdf_set_text_matrix - Deprecated: Sets the text matrix
    pdf_set_text_pos - Sets text position
    pdf_set_text_rendering - Deprecated: Determines how text is rendered
    pdf_set_text_rise - Deprecated: Sets the text rise
    pdf_set_value - Sets certain numerical value
    pdf_set_word_spacing - Depriciated: Sets spacing between words
    pdf_setcolor - Sets fill and stroke color
    pdf_setdash - Sets dash pattern
    pdf_setflat - Sets flatness
    pdf_setfont - Set the current font
    pdf_setgray_fill - Sets filling color to gray value
    pdf_setgray_stroke - Sets drawing color to gray value
    pdf_setgray - Sets drawing and filling color to gray value
    pdf_setlinecap - Sets linecap parameter
    pdf_setlinejoin - Sets linejoin parameter
    pdf_setlinewidth - Sets line width
    pdf_setmatrix - Sets current transformation matrix
    pdf_setmiterlimit - Sets miter limit
    pdf_setpolydash - Sets complicated dash pattern
    pdf_setrgbcolor_fill - Sets filling color to rgb color value
    pdf_setrgbcolor_stroke - Sets drawing color to rgb color value
    pdf_setrgbcolor - Sets drawing and filling color to rgb color value
    pdf_show_boxed - Output text in a box
    pdf_show_xy - Output text at given position
    pdf_show - Output text at current position
    pdf_skew - Skews the coordinate system
    pdf_stringwidth - Returns width of text using current font
    pdf_stroke - Draws line along path
    pdf_translate - Sets origin of coordinate system
This is all I found and I don't think there are any function that does the job you want...
Post Reply