Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : ClibPDF Functions [deprecated] : cpdf_set_viewer_preferences

cpdf_set_viewer_preferences

How to show the document in the viewer (PHP 4, PHP 5 <= 5.0.5)
bool cpdf_set_viewer_preferences ( int pdfdoc, array preferences )

Warning:

This function is currently not documented; only the argument list is available.

Code Examples / Notes » cpdf_set_viewer_preferences

richard dot garen

cpdf_set_viewer_preferences ( int pdfdoc, array preferences)
cpdf_set_viewer_preferences should come after cpdf_open() and before cpdf_finalize
// array preferences
$CPDFviewerPrefs = Array ("pagemode" => 0, "hidetoolbar" => 0, "hidemenubar" => 0, "hidewindowui" => 0, "fitwindow"
=> 0, "centerwindow" => 0, "pagelayout" => 0, "nonfspagemode" => 0);
Example (For a full screen PDF):
$CPDFviewerPrefs = Array ("pagemode" => 3);  // sets pagemode to PM_FULLSCREEN
cpdf_set_viewer_preferences($cpdf, $CPDFviewerPrefs);  // set preferences
Values for preferences...
For pagemode and nonfspagemode:
PM_NONE   0   (default - no outline or thumbnails)
PM_OUTLINES   1   (open with outlines visible)
PM_THUMBS   2   (open with thumbnails visible)
PM_FULLSCREEN   3   (open in full screen mode)
nonFSpmode specifies the mode that is assumed when exiting the full-screen mode.  PM_FULLSCREEN is not allowed for
nonFSpmode.
For pagelayout:
PL_SINGLE   0   (default - one page at a time)
PL_1COLUMN   1   (displays pages in 1 column)
PL_2LCOLUMN   2   (2 columns, odd pages left)
PL_2RCOLUMN   3   (2 columns, odd pages right)
All other parameters should be either non-zero, or zero (YES or NO).
Visit below for information on the original API written in C
http://www.fastio.com/cpdfman110.pdf


Change Language


Follow Navioo On Twitter
cpdf_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
eXTReMe Tracker