ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
TCPDF_IMPORT Class Reference

!!! THIS CLASS IS UNDER DEVELOPMENT !!! PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents. More...

+ Inheritance diagram for TCPDF_IMPORT:
+ Collaboration diagram for TCPDF_IMPORT:

Public Member Functions

 importPDF ($filename)
 Import an existing PDF document.
- Public Member Functions inherited from TCPDF
 __construct ($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false, $pdfa=false)
 This is the class constructor.
 __destruct ()
 Default destructor.
 setPageUnit ($unit)
 Set the units of measure for the document.
 setPageOrientation ($orientation, $autopagebreak='', $bottommargin='')
 Set page orientation.
 setSpacesRE ($re='/[^\S\xa0]/')
 Set regular expression to detect withespaces or word separators.
 setRTL ($enable, $resetx=true)
 Enable or disable Right-To-Left language mode.
 getRTL ()
 Return the RTL status.
 setTempRTL ($mode)
 Force temporary RTL language direction.
 isRTLTextDir ()
 Return the current temporary RTL status.
 setLastH ($h)
 Set the last cell height.
 resetLastH ()
 Reset the last cell height.
 getLastH ()
 Get the last cell height.
 setImageScale ($scale)
 Set the adjusting factor to convert pixels to user units.
 getImageScale ()
 Returns the adjusting factor to convert pixels to user units.
 getPageDimensions ($pagenum='')
 Returns an array of page dimensions:
 getPageWidth ($pagenum='')
 Returns the page width in units.
 getPageHeight ($pagenum='')
 Returns the page height in units.
 getBreakMargin ($pagenum='')
 Returns the page break margin.
 getScaleFactor ()
 Returns the scale factor (number of points in user unit).
 SetMargins ($left, $top, $right=-1, $keepmargins=false)
 Defines the left, top and right margins.
 SetLeftMargin ($margin)
 Defines the left margin.
 SetTopMargin ($margin)
 Defines the top margin.
 SetRightMargin ($margin)
 Defines the right margin.
 SetCellPadding ($pad)
 Set the same internal Cell padding for top, right, bottom, left-.
 setCellPaddings ($left='', $top='', $right='', $bottom='')
 Set the internal Cell paddings.
 getCellPaddings ()
 Get the internal Cell padding array.
 setCellMargins ($left='', $top='', $right='', $bottom='')
 Set the internal Cell margins.
 getCellMargins ()
 Get the internal Cell margin array.
 SetAutoPageBreak ($auto, $margin=0)
 Enables or disables the automatic page breaking mode.
 getAutoPageBreak ()
 Return the auto-page-break mode (true or false).
 SetDisplayMode ($zoom, $layout='SinglePage', $mode='UseNone')
 Defines the way the document is to be displayed by the viewer.
 SetCompression ($compress=true)
 Activates or deactivates page compression.
 setSRGBmode ($mode=false)
 Set flag to force sRGB_IEC61966-2.1 black scaled ICC color profile for the whole document.
 SetDocInfoUnicode ($unicode=true)
 Turn on/off Unicode mode for document information dictionary (meta tags).
 SetTitle ($title)
 Defines the title of the document.
 SetSubject ($subject)
 Defines the subject of the document.
 SetAuthor ($author)
 Defines the author of the document.
 SetKeywords ($keywords)
 Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
 SetCreator ($creator)
 Defines the creator of the document.
 Error ($msg)
 This method is automatically called in case of fatal error; it simply outputs the message and halts the execution.
 Open ()
 This method begins the generation of the PDF document.
 Close ()
 Terminates the PDF document.
 setPage ($pnum, $resetmargins=false)
 Move pointer at the specified document page and update page dimensions.
 lastPage ($resetmargins=false)
 Reset pointer to the last document page.
 getPage ()
 Get current document page number.
 getNumPages ()
 Get the total number of insered pages.
 addTOCPage ($orientation='', $format='', $keepmargins=false)
 Adds a new TOC (Table Of Content) page to the document.
 endTOCPage ()
 Terminate the current TOC (Table Of Content) page.
 AddPage ($orientation='', $format='', $keepmargins=false, $tocpage=false)
 Adds a new page to the document.
 endPage ($tocpage=false)
 Terminate the current page.
 startPage ($orientation='', $format='', $tocpage=false)
 Starts a new page to the document.
 setPageMark ()
 Set start-writing mark on current page stream used to put borders and fills.
 setHeaderData ($ln='', $lw=0, $ht='', $hs='', $tc=array(0, 0, 0), $lc=array(0, 0, 0))
 Set header data.
 setFooterData ($tc=array(0, 0, 0), $lc=array(0, 0, 0))
 Set footer data.
 getHeaderData ()
 Returns header data:
 setHeaderMargin ($hm=10)
 Set header margin.
 getHeaderMargin ()
 Returns header margin in user units.
 setFooterMargin ($fm=10)
 Set footer margin.
 getFooterMargin ()
 Returns footer margin in user units.
 setPrintHeader ($val=true)
 Set a flag to print page header.
 setPrintFooter ($val=true)
 Set a flag to print page footer.
 getImageRBX ()
 Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image.
 getImageRBY ()
 Return the right-bottom (or left-bottom for RTL) corner Y coordinate of last inserted image.
 resetHeaderTemplate ()
 Reset the xobject template used by Header() method.
 setHeaderTemplateAutoreset ($val=true)
 Set a flag to automatically reset the xobject template used by Header() method at each page.
 Header ()
 This method is used to render the page header.
 Footer ()
 This method is used to render the page footer.
 PageNo ()
 Returns the current page number.
 AddSpotColor ($name, $c, $m, $y, $k)
 Defines a new spot color.
 setSpotColor ($type, $name, $tint=100)
 Set the spot color for the specified type ('draw', 'fill', 'text').
 SetDrawSpotColor ($name, $tint=100)
 Defines the spot color used for all drawing operations (lines, rectangles and cell borders).
 SetFillSpotColor ($name, $tint=100)
 Defines the spot color used for all filling operations (filled rectangles and cell backgrounds).
 SetTextSpotColor ($name, $tint=100)
 Defines the spot color used for text.
 setColorArray ($type, $color, $ret=false)
 Set the color array for the specified type ('draw', 'fill', 'text').
 SetDrawColorArray ($color, $ret=false)
 Defines the color used for all drawing operations (lines, rectangles and cell borders).
 SetFillColorArray ($color, $ret=false)
 Defines the color used for all filling operations (filled rectangles and cell backgrounds).
 SetTextColorArray ($color, $ret=false)
 Defines the color used for text.
 setColor ($type, $col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='')
 Defines the color used by the specified type ('draw', 'fill', 'text').
 SetDrawColor ($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='')
 Defines the color used for all drawing operations (lines, rectangles and cell borders).
 SetFillColor ($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='')
 Defines the color used for all filling operations (filled rectangles and cell backgrounds).
 SetTextColor ($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='')
 Defines the color used for text.
 GetStringWidth ($s, $fontname='', $fontstyle='', $fontsize=0, $getarray=false)
 Returns the length of a string in user unit.
 GetArrStringWidth ($sa, $fontname='', $fontstyle='', $fontsize=0, $getarray=false)
 Returns the string length of an array of chars in user unit or an array of characters widths.
 GetCharWidth ($char, $notlast=true)
 Returns the length of the char in user unit for the current font considering current stretching and spacing (tracking).
 getRawCharWidth ($char)
 Returns the length of the char in user unit for the current font.
 GetNumChars ($s)
 Returns the numbero of characters in a string.
 unichr ($c)
 Returns the unicode caracter specified by the value.
 addTTFfont ($fontfile, $fonttype='', $enc='', $flags=32, $outpath='', $platid=3, $encid=1, $addcbbox=false)
 Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).
 AddFont ($family, $style='', $fontfile='', $subset='default')
 Imports a TrueType, Type1, core, or CID0 font and makes it available.
 SetFont ($family, $style='', $size=null, $fontfile='', $subset='default', $out=true)
 Sets the font used to print character strings.
 SetFontSize ($size, $out=true)
 Defines the size of the current font.
 getFontBBox ()
 Returns the bounding box of the current font in user units.
 getAbsFontMeasure ($s)
 Convert a relative font measure into absolute value.
 getCharBBox ($char)
 Returns the glyph bounding box of the specified character in the current font in user units.
 getFontDescent ($font, $style='', $size=0)
 Return the font descent value.
 getFontAscent ($font, $style='', $size=0)
 Return the font ascent value.
 isCharDefined ($char, $font='', $style='')
 Return true in the character is present in the specified font.
 replaceMissingChars ($text, $font='', $style='', $subs=array())
 Replace missing font characters on selected font with specified substitutions.
 SetDefaultMonospacedFont ($font)
 Defines the default monospaced font.
 AddLink ()
 Creates a new internal link and returns its identifier.
 SetLink ($link, $y=0, $page=-1)
 Defines the page and position a link points to.
 Link ($x, $y, $w, $h, $link, $spaces=0)
 Puts a link on a rectangular area of the page.
 Annotation ($x, $y, $w, $h, $text, $opt=array('Subtype'=>'Text'), $spaces=0)
 Puts a markup annotation on a rectangular area of the page.
 Text ($x, $y, $txt, $fstroke=false, $fclip=false, $ffill=true, $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M', $rtloff=false)
 Prints a text cell at the specified position.
 AcceptPageBreak ()
 Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value.
 Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
 Prints a cell (rectangular area) with optional borders, background color and character string.
 MultiCell ($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $valign='T', $fitcell=false)
 This method allows printing text with line breaks.
 getNumLines ($txt, $w=0, $reseth=false, $autopadding=true, $cellpadding='', $border=0)
 This method return the estimated number of lines for print a simple text string using Multicell() method.
 getStringHeight ($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0)
 This method return the estimated height needed for printing a simple text string using the Multicell() method.
 Write ($h, $txt, $link='', $fill=false, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0, $wadj=0, $margin='')
 This method prints text from the current position.
 Image ($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false, $alt=false, $altimgs=array())
 Puts an image in the page.
 Ln ($h='', $cell=false)
 Performs a line break.
 GetX ()
 Returns the relative X value of current position.
 GetAbsX ()
 Returns the absolute X value of current position.
 GetY ()
 Returns the ordinate of the current position.
 SetX ($x, $rtloff=false)
 Defines the abscissa of the current position.
 SetY ($y, $resetx=true, $rtloff=false)
 Moves the current abscissa back to the left margin and sets the ordinate.
 SetXY ($x, $y, $rtloff=false)
 Defines the abscissa and ordinate of the current position.
 SetAbsX ($x)
 Set the absolute X coordinate of the current pointer.
 SetAbsY ($y)
 Set the absolute Y coordinate of the current pointer.
 SetAbsXY ($x, $y)
 Set the absolute X and Y coordinates of the current pointer.
 Output ($name='doc.pdf', $dest='I')
 Send the document to a given destination: string, local file or browser.
 _destroy ($destroyall=false, $preserve_objcopy=false)
 Unset all class variables except the following critical variables.
 setExtraXMP ($xmp)
 Set additional XMP data to be added on the default XMP data just before the end of "x:xmpmeta" tag.
 setDocCreationTimestamp ($time)
 Set the document creation timestamp.
 setDocModificationTimestamp ($time)
 Set the document modification timestamp.
 getDocCreationTimestamp ()
 Returns document creation timestamp in seconds.
 getDocModificationTimestamp ()
 Returns document modification timestamp in seconds.
 setHeaderFont ($font)
 Set header font.
 getHeaderFont ()
 Get header font.
 setFooterFont ($font)
 Set footer font.
 getFooterFont ()
 Get Footer font.
 setLanguageArray ($language)
 Set language array.
 getPDFData ()
 Returns the PDF data.
 addHtmlLink ($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false)
 Output anchor link.
 pixelsToUnits ($px)
 Converts pixels to User's Units.
 unhtmlentities ($text_to_convert)
 Reverse function for htmlentities.
 SetProtection ($permissions=array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), $user_pass='', $owner_pass=null, $mode=0, $pubkeys=null)
 Set document protection Remark: the protection against modification is for people who have the full Acrobat product.
 StartTransform ()
 Starts a 2D tranformation saving current graphic state.
 StopTransform ()
 Stops a 2D tranformation restoring previous graphic state.
 ScaleX ($s_x, $x='', $y='')
 Horizontal Scaling.
 ScaleY ($s_y, $x='', $y='')
 Vertical Scaling.
 ScaleXY ($s, $x='', $y='')
 Vertical and horizontal proportional Scaling.
 Scale ($s_x, $s_y, $x='', $y='')
 Vertical and horizontal non-proportional Scaling.
 MirrorH ($x='')
 Horizontal Mirroring.
 MirrorV ($y='')
 Verical Mirroring.
 MirrorP ($x='', $y='')
 Point reflection mirroring.
 MirrorL ($angle=0, $x='', $y='')
 Reflection against a straight line through point (x, y) with the gradient angle (angle).
 TranslateX ($t_x)
 Translate graphic object horizontally.
 TranslateY ($t_y)
 Translate graphic object vertically.
 Translate ($t_x, $t_y)
 Translate graphic object horizontally and vertically.
 Rotate ($angle, $x='', $y='')
 Rotate object.
 SkewX ($angle_x, $x='', $y='')
 Skew horizontally.
 SkewY ($angle_y, $x='', $y='')
 Skew vertically.
 Skew ($angle_x, $angle_y, $x='', $y='')
 Skew.
 SetLineWidth ($width)
 Defines the line width.
 GetLineWidth ()
 Returns the current the line width.
 SetLineStyle ($style, $ret=false)
 Set line style.
 Line ($x1, $y1, $x2, $y2, $style=array())
 Draws a line between two points.
 Rect ($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array())
 Draws a rectangle.
 Curve ($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array())
 Draws a Bezier curve.
 Polycurve ($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array())
 Draws a poly-Bezier curve.
 Ellipse ($x0, $y0, $rx, $ry='', $angle=0, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=2)
 Draws an ellipse.
 Circle ($x0, $y0, $r, $angstr=0, $angend=360, $style='', $line_style=array(), $fill_color=array(), $nc=2)
 Draws a circle.
 PolyLine ($p, $style='', $line_style=array(), $fill_color=array())
 Draws a polygonal line.
 Polygon ($p, $style='', $line_style=array(), $fill_color=array(), $closed=true)
 Draws a polygon.
 RegularPolygon ($x0, $y0, $r, $ns, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array())
 Draws a regular polygon.
 StarPolygon ($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array())
 Draws a star polygon.
 RoundedRect ($x, $y, $w, $h, $r, $round_corner='1111', $style='', $border_style=array(), $fill_color=array())
 Draws a rounded rectangle.
 RoundedRectXY ($x, $y, $w, $h, $rx, $ry, $round_corner='1111', $style='', $border_style=array(), $fill_color=array())
 Draws a rounded rectangle.
 Arrow ($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15)
 Draws a grahic arrow.
 setDestination ($name, $y=-1, $page='', $x=-1)
 Add a Named Destination.
 getDestination ()
 Return the Named Destination array.
 setBookmark ($txt, $level=0, $y=-1, $page='', $style='', $color=array(0, 0, 0), $x=-1, $link='')
 Adds a bookmark - alias for Bookmark().
 Bookmark ($txt, $level=0, $y=-1, $page='', $style='', $color=array(0, 0, 0), $x=-1, $link='')
 Adds a bookmark.
 IncludeJS ($script)
 Adds a javascript.
 addJavascriptObject ($script, $onload=false)
 Adds a javascript object and return object ID.
 setFormDefaultProp ($prop=array())
 Set default properties for form fields.
 getFormDefaultProp ()
 Return the default properties for form fields.
 TextField ($name, $w, $h, $prop=array(), $opt=array(), $x='', $y='', $js=false)
 Creates a text field.
 RadioButton ($name, $w, $prop=array(), $opt=array(), $onvalue='On', $checked=false, $x='', $y='', $js=false)
 Creates a RadioButton field.
 ListBox ($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false)
 Creates a List-box field.
 ComboBox ($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false)
 Creates a Combo-box field.
 CheckBox ($name, $w, $checked=false, $prop=array(), $opt=array(), $onvalue='Yes', $x='', $y='', $js=false)
 Creates a CheckBox field.
 Button ($name, $w, $h, $caption, $action, $prop=array(), $opt=array(), $x='', $y='', $js=false)
 Creates a button field.
 setUserRights ($enable=true, $document='/FullSave', $annots='/Create/Delete/Modify/Copy/Import/Export', $form='/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate', $signature='/Modify', $ef='/Create/Delete/Modify/Import', $formex='')
 Set User's Rights for PDF Reader WARNING: This is experimental and currently do not work.
 setSignature ($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array())
 Enable document signature (requires the OpenSSL Library).
 setSignatureAppearance ($x=0, $y=0, $w=0, $h=0, $page=-1, $name='')
 Set the digital signature appearance (a cliccable rectangle area to get signature properties)
 addEmptySignatureAppearance ($x=0, $y=0, $w=0, $h=0, $page=-1, $name='')
 Add an empty digital signature appearance (a cliccable rectangle area to get signature properties)
 startPageGroup ($page='')
 Create a new page group.
 setStartingPageNumber ($num=1)
 Set the starting page number.
 getAliasRightShift ()
 Returns the string alias used right align page numbers.
 getAliasNbPages ()
 Returns the string alias used for the total number of pages.
 getAliasNumPage ()
 Returns the string alias used for the page number.
 getPageGroupAlias ()
 Return the alias for the total number of pages in the current page group.
 getPageNumGroupAlias ()
 Return the alias for the page number on the current page group.
 getGroupPageNo ()
 Return the current page in the group.
 getGroupPageNoFormatted ()
 Returns the current group page number formatted as a string.
 PageNoFormatted ()
 Returns the current page number formatted as a string.
 startLayer ($name='', $print=true, $view=true)
 Start a new pdf layer.
 endLayer ()
 End the current PDF layer.
 setVisibility ($v)
 Set the visibility of the successive elements.
 setOverprint ($stroking=true, $nonstroking='', $mode=0)
 Set overprint mode for stroking (OP) and non-stroking (op) painting operations.
 getOverprint ()
 Get the overprint mode array (OP, op, OPM).
 setAlpha ($stroking=1, $bm='Normal', $nonstroking='', $ais=false)
 Set alpha for stroking (CA) and non-stroking (ca) operations.
 getAlpha ()
 Get the alpha mode array (CA, ca, BM, AIS).
 setJPEGQuality ($quality)
 Set the default JPEG compression quality (1-100)
 setDefaultTableColumns ($cols=4)
 Set the default number of columns in a row for HTML tables.
 setCellHeightRatio ($h)
 Set the height of the cell (line height) respect the font height.
 getCellHeightRatio ()
 return the height of cell repect font height.
 setPDFVersion ($version='1.7')
 Set the PDF version (check PDF reference for valid values).
 setViewerPreferences ($preferences)
 Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print.
 colorRegistrationBar ($x, $y, $w, $h, $transition=true, $vertical=false, $colors='A, R, G, B, C, M, Y, K')
 Paints color transition registration bars.
 cropMark ($x, $y, $w, $h, $type='T, R, B, L', $color=array(0, 0, 0))
 Paints crop marks.
 registrationMark ($x, $y, $r, $double=false, $cola=array(0, 0, 0), $colb=array(255, 255, 255))
 Paints a registration mark.
 LinearGradient ($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0, 0, 1, 0))
 Paints a linear colour gradient.
 RadialGradient ($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0.5, 0.5, 0.5, 0.5, 1))
 Paints a radial colour gradient.
 CoonsPatchMesh ($x, $y, $w, $h, $col1=array(), $col2=array(), $col3=array(), $col4=array(), $coords=array(0.00, 0.0, 0.33, 0.00, 0.67, 0.00, 1.00, 0.00, 1.00, 0.33, 1.00, 0.67, 1.00, 1.00, 0.67, 1.00, 0.33, 1.00, 0.00, 1.00, 0.00, 0.67, 0.00, 0.33), $coords_min=0, $coords_max=1, $antialias=false)
 Paints a coons patch mesh.
 Gradient ($type, $coords, $stops, $background=array(), $antialias=false)
 Output gradient.
 PieSector ($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90)
 Draw the sector of a circle.
 PieSectorXY ($xc, $yc, $rx, $ry, $a, $b, $style='FD', $cw=false, $o=0, $nc=2)
 Draw the sector of an ellipse.
 ImageEps ($file, $x='', $y='', $w=0, $h=0, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false, $fixoutvals=false)
 Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files.
 setBarcode ($bc='')
 Set document barcode.
 getBarcode ()
 Get current barcode.
 write1DBarcode ($code, $type, $x='', $y='', $w='', $h='', $xres='', $style='', $align='')
 Print a Linear Barcode.
 write2DBarcode ($code, $type, $x='', $y='', $w='', $h='', $style='', $align='', $distort=false)
 Print 2D Barcode.
 getMargins ()
 Returns an array containing current margins:
 getOriginalMargins ()
 Returns an array containing original margins:
 getFontSize ()
 Returns the current font size.
 getFontSizePt ()
 Returns the current font size in points unit.
 getFontFamily ()
 Returns the current font family name.
 getFontStyle ()
 Returns the current font style.
 fixHTMLCode ($html, $default_css='', $tagvs='', $tidy_options='')
 Cleanup HTML code (requires HTML Tidy library).
 getCSSPadding ($csspadding, $width=0)
 Get the internal Cell padding from CSS attribute.
 getCSSMargin ($cssmargin, $width=0)
 Get the internal Cell margin from CSS attribute.
 getCSSBorderMargin ($cssbspace, $width=0)
 Get the border-spacing from CSS attribute.
 getHTMLFontUnits ($val, $refsize=12, $parent_size=12, $defaultunit='pt')
 Convert HTML string containing font size value to points.
 serializeTCPDFtagParameters ($pararray)
 Serialize an array of parameters to be used with TCPDF tag in HTML code.
 writeHTMLCell ($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true)
 Prints a cell (rectangular area) with optional borders, background color and html text string.
 writeHTML ($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='')
 Allows to preserve some HTML formatting (limited support).
 setLIsymbol ($symbol='!')
 Set the default bullet to be used as LI bullet symbol.
 SetBooklet ($booklet=true, $inner=-1, $outer=-1)
 Set the booklet mode for double-sided pages.
 setHtmlVSpace ($tagvs)
 Set the vertical spaces for HTML tags.
 setListIndentWidth ($width)
 Set custom width for list indentation.
 setOpenCell ($isopen)
 Set the top/bottom cell sides to be open or closed when the cell cross the page.
 setHtmlLinksStyle ($color=array(0, 0, 255), $fontstyle='U')
 Set the color and font style for HTML links.
 getHTMLUnitToUnits ($htmlval, $refsize=1, $defaultunit='px', $points=false)
 Convert HTML string containing value and unit of measure to user's units or points.
 movePage ($frompage, $topage)
 Move a page to a previous position.
 deletePage ($page)
 Remove the specified page.
 copyPage ($page=0)
 Clone the specified page to a new page.
 addTOC ($page='', $numbersfont='', $filler='.', $toc_name='TOC', $style='', $color=array(0, 0, 0))
 Output a Table of Content Index (TOC).
 addHTMLTOC ($page='', $toc_name='TOC', $templates=array(), $correct_align=true, $style='', $color=array(0, 0, 0))
 Output a Table Of Content Index (TOC) using HTML templates.
 startTransaction ()
 Stores a copy of the current TCPDF object used for undo operation.
 commitTransaction ()
 Delete the copy of the current TCPDF object used for undo operation.
 rollbackTransaction ($self=false)
 This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction().
 setEqualColumns ($numcols=0, $width=0, $y='')
 Set multiple columns of the same size.
 resetColumns ()
 Remove columns and reset page margins.
 setColumnsArray ($columns)
 Set columns array.
 selectColumn ($col='')
 Set position at a given column.
 getColumn ()
 Return the current column number.
 getNumberOfColumns ()
 Return the current number of columns.
 setTextRenderingMode ($stroke=0, $fill=true, $clip=false)
 Set Text rendering mode.
 setTextShadow ($params=array('enabled'=>false, 'depth_w'=>0, 'depth_h'=>0, 'color'=>false, 'opacity'=>1, 'blend_mode'=>'Normal'))
 Set parameters for drop shadow effect for text.
 getTextShadow ()
 Return the text shadow parameters array.
 hyphenateText ($text, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8)
 Returns text with soft hyphens.
 setRasterizeVectorImages ($mode)
 Enable/disable rasterization of vector images using ImageMagick library.
 setFontSubsetting ($enable=true)
 Enable or disable default option for font subsetting.
 getFontSubsetting ()
 Return the default option for font subsetting.
 stringLeftTrim ($str, $replace='')
 Left trim the input string.
 stringRightTrim ($str, $replace='')
 Right trim the input string.
 stringTrim ($str, $replace='')
 Trim the input string.
 isUnicodeFont ()
 Return true if the current font is unicode type.
 getFontFamilyName ($fontfamily)
 Return normalized font name.
 startTemplate ($w=0, $h=0, $group=false)
 Start a new XObject Template.
 endTemplate ()
 End the current XObject Template started with startTemplate() and restore the previous graphic state.
 printTemplate ($id, $x='', $y='', $w=0, $h=0, $align='', $palign='', $fitonpage=false)
 Print an XObject Template.
 setFontStretching ($perc=100)
 Set the percentage of character stretching.
 getFontStretching ()
 Get the percentage of character stretching.
 setFontSpacing ($spacing=0)
 Set the amount to increase or decrease the space between characters in a text.
 getFontSpacing ()
 Get the amount to increase or decrease the space between characters in a text.
 getPageRegions ()
 Return an array of no-write page regions.
 setPageRegions ($regions=array())
 Set no-write regions on page.
 addPageRegion ($region)
 Add a single no-write region on selected page.
 removePageRegion ($key)
 Remove a single no-write region.
 ImageSVG ($file, $x='', $y='', $w=0, $h=0, $link='', $align='', $palign='', $border=0, $fitonpage=false)
 Embedd a Scalable Vector Graphics (SVG) image.

Additional Inherited Members

- Protected Member Functions inherited from TCPDF
 setPageFormat ($format, $orientation='P')
 Change the format of the current page.
 adjustCellPadding ($brd=0)
 Adjust the internal Cell padding array to take account of the line width.
 setContentMark ($page=0)
 Set start-writing mark on selected page.
 setHeader ()
 This method is used to render the page header.
 setFooter ()
 This method is used to render the page footer.
 inPageBody ()
 Check if we are on the page body (excluding page header and footer).
 setTableHeader ()
 This method is used to render the table header on new page (if any).
 getFontsList ()
 Fill the list of available fonts ($this->fontlist).
 _putEmbeddedFiles ()
 Embedd the attached files.
 checkPageBreak ($h=0, $y='', $addpage=true)
 Add page if needed.
 getCellCode ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
 Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string.
 replaceChar ($oldchar, $newchar)
 Replace a char if is defined on the current font.
 getCellBorder ($x, $y, $w, $h, $brd)
 Returns the code to draw the cell border.
 getRemainingWidth ()
 Returns the remaining width between the current position and margins.
 fitBlock ($w, $h, $x, $y, $fitonpage=false)
 Set the block dimensions accounting for page breaks and page/column fitting.
 ImagePngAlpha ($file, $x, $y, $wpx, $hpx, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $filehash='')
 Extract info from a PNG image with alpha channel using the GD library.
 getGDgamma ($c)
 Get the GD-corrected PNG gamma value from alpha color.
 _dochecks ()
 Check for locale-related bug.
 getInternalPageNumberAliases ($a= '')
 Return an array containing variations for the basic page number alias.
 getAllInternalPageNumberAliases ()
 Return an array containing all internal page aliases.
 replaceRightShiftPageNumAliases ($page, $aliases, $diff)
 Replace right shift page number aliases with spaces to correct right alignment.
 setPageBoxTypes ($boxes)
 Set page boxes to be included on page descriptions.
 _putpages ()
 Output pages (and replace page number aliases).
 _putannotsrefs ($n)
 Output references to page annotations.
 _getannotsrefs ($n)
 Get references to page annotations.
 _putannotsobjs ()
 Output annotations objects for all pages.
 _putAPXObject ($w=0, $h=0, $stream='')
 Put appearance streams XObject used to define annotation's appearance states.
 _putfonts ()
 Output fonts.
 _puttruetypeunicode ($font)
 Adds unicode fonts.
 _putcidfont0 ($font)
 Output CID-0 fonts.
 _putimages ()
 Output images.
 _putxobjects ()
 Output Form XObjects Templates.
 _putspotcolors ()
 Output Spot Colors Resources.
 _getxobjectdict ()
 Return XObjects Dictionary.
 _putresourcedict ()
 Output Resources Dictionary.
 _putresources ()
 Output Resources.
 _putinfo ()
 Adds some Metadata information (Document Information Dictionary) (see Chapter 14.3.3 Document Information Dictionary of PDF32000_2008.pdf Reference)
 _putXMP ()
 Put XMP data object and return ID.
 _putcatalog ()
 Output Catalog.
 _putviewerpreferences ()
 Output viewer preferences.
 _putheader ()
 Output PDF File Header (7.5.2).
 _enddoc ()
 Output end of document (EOF).
 _beginpage ($orientation='', $format='')
 Initialize a new page.
 _endpage ()
 Mark end of page.
 _newobj ()
 Begin a new object and return the object number.
 _getobj ($objid='')
 Return the starting object string for the selected object ID.
 _dounderline ($x, $y, $txt)
 Underline text.
 _dounderlinew ($x, $y, $w)
 Underline for rectangular text area.
 _dolinethrough ($x, $y, $txt)
 Line through text.
 _dolinethroughw ($x, $y, $w)
 Line through for rectangular text area.
 _dooverline ($x, $y, $txt)
 Overline text.
 _dooverlinew ($x, $y, $w)
 Overline for rectangular text area.
 _datastring ($s, $n=0)
 Format a data string for meta information.
 _datestring ($n=0, $timestamp=0)
 Returns a formatted date for meta information.
 _textstring ($s, $n=0)
 Format a text string for meta information.
 _escapetext ($s)
 THIS METHOD IS DEPRECATED Format a text string.
 _getrawstream ($s, $n=0)
 get raw output stream.
 _getstream ($s, $n=0)
 Format output stream (DEPRECATED).
 _putstream ($s, $n=0)
 Output a stream (DEPRECATED).
 _out ($s)
 Output a string to the document.
 _objectkey ($n)
 Compute encryption key depending on object number where the encrypted data is stored.
 _encrypt_data ($n, $s)
 Encrypt the input string.
 _putencryption ()
 Put encryption on PDF document.
 _Uvalue ()
 Compute U value (used for encryption)
 _UEvalue ()
 Compute UE value (used for encryption)
 _Ovalue ()
 Compute O value (used for encryption)
 _OEvalue ()
 Compute OE value (used for encryption)
 _fixAES256Password ($password)
 Convert password for AES-256 encryption mode.
 _generateencryptionkey ()
 Compute encryption key.
 Transform ($tm)
 Apply graphic transformations.
 _outPoint ($x, $y)
 Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment.
 _outLine ($x, $y)
 Append a straight line segment from the current point to the point (x, y).
 _outRect ($x, $y, $w, $h, $op)
 Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions widthand height in user space.
 _outCurve ($x1, $y1, $x2, $y2, $x3, $y3)
 Append a cubic B�zier curve to the current path.
 _outCurveV ($x2, $y2, $x3, $y3)
 Append a cubic B�zier curve to the current path.
 _outCurveY ($x1, $y1, $x3, $y3)
 Append a cubic B�zier curve to the current path.
 _outellipticalarc ($xc, $yc, $rx, $ry, $xang=0, $angs=0, $angf=360, $pie=false, $nc=2, $startpoint=true, $ccw=true, $svg=false)
 Append an elliptical arc to the current path.
 _putdests ()
 Insert Named Destinations.
 sortBookmarks ()
 Sort bookmarks for page and key.
 _putbookmarks ()
 Create a bookmark PDF string.
 _putjavascript ()
 Create a javascript PDF string.
 _addfield ($type, $name, $x, $y, $w, $h, $prop)
 Adds a javascript form field.
 _putsignature ()
 Add certification signature (DocMDP or UR3) You can set only one signature type.
 getSignatureAppearanceArray ($x=0, $y=0, $w=0, $h=0, $page=-1, $name='')
 Get the array that defines the signature appearance (page and rectangle coordinates).
 _putocg ()
 Put pdf layers.
 addExtGState ($parms)
 Add transparency parameters to the current extgstate.
 setExtGState ($gs)
 Add an extgstate.
 _putextgstates ()
 Put extgstates for object transparency.
 Clip ($x, $y, $w, $h)
 Set a rectangular clipping area.
 _putshaders ()
 Output gradient shaders.
 getCSSBorderWidth ($width)
 Returns the border width from CSS property.
 getCSSBorderDashStyle ($style)
 Returns the border dash style from CSS property.
 getCSSBorderStyle ($cssborder)
 Returns the border style array from CSS border properties.
 getCSSFontSpacing ($spacing, $parent=0)
 Returns the letter-spacing value from CSS value.
 getCSSFontStretching ($stretch, $parent=100)
 Returns the percentage of font stretching from CSS value.
 getHtmlDomArray ($html)
 Returns the HTML DOM array.
 getSpaceString ()
 Returns the string used to find spaces.
 openHTMLTagHandler ($dom, $key, $cell)
 Process opening tags.
 closeHTMLTagHandler ($dom, $key, $cell, $maxbottomliney=0)
 Process closing tags.
 addHTMLVertSpace ($hbz=0, $hb=0, $cell=false, $firsttag=false, $lasttag=false)
 Add vertical spaces if needed.
 getBorderStartPosition ()
 Return the starting coordinates to draw an html border.
 drawHTMLTagBorder ($tag, $xmax)
 Draw an HTML block border and fill.
 swapMargins ($reverse=true)
 Swap the left and right margins.
 putHtmlListBullet ($listdepth, $listtype='', $size=10)
 Output an HTML list bullet or ordered item symbol.
 getGraphicVars ()
 Returns current graphic variables as array.
 setGraphicVars ($gvars, $extended=false)
 Set graphic variables.
 writeDiskCache ($filename, $data, $append=false)
 Writes data to a temporary file on filesystem.
 readDiskCache ($filename)
 Read data from a temporary file on filesystem.
 setBuffer ($data)
 Set buffer content (always append data).
 replaceBuffer ($data)
 Replace the buffer content.
 getBuffer ()
 Get buffer content.
 setPageBuffer ($page, $data, $append=false)
 Set page buffer content.
 getPageBuffer ($page)
 Get page buffer content.
 setImageBuffer ($image, $data)
 Set image buffer content.
 setImageSubBuffer ($image, $key, $data)
 Set image buffer content for a specified sub-key.
 getImageBuffer ($image)
 Get image buffer content.
 setFontBuffer ($font, $data)
 Set font buffer content.
 setFontSubBuffer ($font, $key, $data)
 Set font buffer content.
 getFontBuffer ($font)
 Get font buffer content.
 hyphenateWord ($word, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8)
 Returns an array of chars containing soft hyphens.
 checkPageRegions ($h, $x, $y)
 Check page for no-write regions and adapt current coordinates and page margins if necessary.
 convertSVGtMatrix ($tm)
 Convert SVG transformation matrix to PDF.
 SVGTransform ($tm)
 Apply SVG graphic transformation matrix.
 setSVGStyles ($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1, $clip_function='', $clip_params=array())
 Apply the requested SVG styles (*** TO BE COMPLETED ***)
 SVGPath ($d, $style='')
 Draws an SVG path.
 startSVGElementHandler ($parser, $name, $attribs, $ctm=array())
 Sets the opening SVG element handler function for the XML parser.
 endSVGElementHandler ($parser, $name)
 Sets the closing SVG element handler function for the XML parser.
 segSVGContentHandler ($parser, $data)
 Sets the character data handler function for the XML parser.
- Protected Attributes inherited from TCPDF
 $page
 Current page number.
 $n
 Current object number.
 $offsets = array()
 Array of object offsets.
 $pageobjects = array()
 Array of object IDs for each page.
 $buffer
 Buffer holding in-memory PDF.
 $pages = array()
 Array containing pages.
 $state
 Current document state.
 $compress
 Compression flag.
 $CurOrientation
 Current page orientation (P = Portrait, L = Landscape).
 $pagedim = array()
 Page dimensions.
 $k
 Scale factor (number of points in user unit).
 $fwPt
 Width of page format in points.
 $fhPt
 Height of page format in points.
 $wPt
 Current width of page in points.
 $hPt
 Current height of page in points.
 $w
 Current width of page in user unit.
 $h
 Current height of page in user unit.
 $lMargin
 Left margin.
 $rMargin
 Right margin.
 $clMargin
 Cell left margin (used by regions).
 $crMargin
 Cell right margin (used by regions).
 $tMargin
 Top margin.
 $bMargin
 Page break margin.
 $cell_padding = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0)
 Array of cell internal paddings ('T' => top, 'R' => right, 'B' => bottom, 'L' => left).
 $cell_margin = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0)
 Array of cell margins ('T' => top, 'R' => right, 'B' => bottom, 'L' => left).
 $x
 Current horizontal position in user unit for cell positioning.
 $y
 Current vertical position in user unit for cell positioning.
 $lasth
 Height of last cell printed.
 $LineWidth
 Line width in user unit.
 $CoreFonts
 Array of standard font names.
 $fonts = array()
 Array of used fonts.
 $FontFiles = array()
 Array of font files.
 $diffs = array()
 Array of encoding differences.
 $images = array()
 Array of used images.
 $cached_files = array()
 Array of cached files.
 $PageAnnots = array()
 Array of Annotations in pages.
 $links = array()
 Array of internal links.
 $FontFamily
 Current font family.
 $FontStyle
 Current font style.
 $FontAscent
 Current font ascent (distance between font top and baseline).
 $FontDescent
 Current font descent (distance between font bottom and baseline).
 $underline
 Underlining flag.
 $overline
 Overlining flag.
 $CurrentFont
 Current font info.
 $FontSizePt
 Current font size in points.
 $FontSize
 Current font size in user unit.
 $DrawColor
 Commands for drawing color.
 $FillColor
 Commands for filling color.
 $TextColor
 Commands for text color.
 $ColorFlag
 Indicates whether fill and text colors are different.
 $AutoPageBreak
 Automatic page breaking.
 $PageBreakTrigger
 Threshold used to trigger page breaks.
 $InHeader = false
 Flag set when processing page header.
 $InFooter = false
 Flag set when processing page footer.
 $ZoomMode
 Zoom display mode.
 $LayoutMode
 Layout display mode.
 $docinfounicode = true
 If true set the document information dictionary in Unicode.
 $title = ''
 Document title.
 $subject = ''
 Document subject.
 $author = ''
 Document author.
 $keywords = ''
 Document keywords.
 $creator = ''
 Document creator.
 $starting_page_number = 1
 Starting page number.
 $img_rb_x
 The right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image.
 $img_rb_y
 The right-bottom corner Y coordinate of last inserted image.
 $imgscale = 1
 Adjusting factor to convert pixels to user units.
 $isunicode = false
 Boolean flag set to true when the input text is unicode (require unicode fonts).
 $PDFVersion = '1.7'
 PDF version.
 $header_xobjid = -1
 ID of the stored default header template (-1 = not set).
 $header_xobj_autoreset = false
 If true reset the Header Xobject template at each page.
 $header_margin
 Minimum distance between header and top page margin.
 $footer_margin
 Minimum distance between footer and bottom page margin.
 $original_lMargin
 Original left margin value.
 $original_rMargin
 Original right margin value.
 $header_font
 Default font used on page header.
 $footer_font
 Default font used on page footer.
 $l
 Language templates.
 $barcode = false
 Barcode to print on page footer (only if set).
 $print_header = true
 Boolean flag to print/hide page header.
 $print_footer = true
 Boolean flag to print/hide page footer.
 $header_logo = ''
 Header image logo.
 $header_logo_width = 30
 Width of header image logo in user units.
 $header_title = ''
 Title to be printed on default page header.
 $header_string = ''
 String to pring on page header after title.
 $header_text_color = array(0,0,0)
 Color for header text (RGB array).
 $header_line_color = array(0,0,0)
 Color for header line (RGB array).
 $footer_text_color = array(0,0,0)
 Color for footer text (RGB array).
 $footer_line_color = array(0,0,0)
 Color for footer line (RGB array).
 $txtshadow = array('enabled'=>false, 'depth_w'=>0, 'depth_h'=>0, 'color'=>false, 'opacity'=>1, 'blend_mode'=>'Normal')
 Text shadow data array.
 $default_table_columns = 4
 Default number of columns for html table.
 $HREF = array()
 HTML PARSER: array to store current link and rendering styles.
 $fontlist = array()
 List of available fonts on filesystem.
 $fgcolor
 Current foreground color.
 $listordered = array()
 HTML PARSER: array of boolean values, true in case of ordered list (OL), false otherwise.
 $listcount = array()
 HTML PARSER: array count list items on nested lists.
 $listnum = 0
 HTML PARSER: current list nesting level.
 $listindent = 0
 HTML PARSER: indent amount for lists.
 $listindentlevel = 0
 HTML PARSER: current list indententation level.
 $bgcolor
 Current background color.
 $tempfontsize = 10
 Temporary font size in points.
 $lispacer = ''
 Spacer string for LI tags.
 $encoding = 'UTF-8'
 Default encoding.
 $internal_encoding
 PHP internal encoding.
 $rtl = false
 Boolean flag to indicate if the document language is Right-To-Left.
 $tmprtl = false
 Boolean flag used to force RTL or LTR string direction.
 $encrypted
 IBoolean flag indicating whether document is protected.
 $encryptdata = array()
 Array containing encryption settings.
 $last_enc_key
 Last RC4 key encrypted (cached for optimisation).
 $last_enc_key_c
 Last RC4 computed key.
 $file_id
 File ID (used on document trailer).
 $outlines = array()
 Outlines for bookmark.
 $OutlineRoot
 Outline root for bookmark.
 $javascript = ''
 Javascript code.
 $n_js
 Javascript counter.
 $linethrough
 line through state
 $ur = array()
 Array with additional document-wide usage rights for the document.
 $dpi = 72
 DPI (Dot Per Inch) Document Resolution (do not change).
 $newpagegroup = array()
 Array of page numbers were a new page group was started (the page numbers are the keys of the array).
 $pagegroups = array()
 Array that contains the number of pages in each page group.
 $currpagegroup = 0
 Current page group number.
 $extgstates
 Array of transparency objects and parameters.
 $jpeg_quality
 Set the default JPEG compression quality (1-100).
 $cell_height_ratio = K_CELL_HEIGHT_RATIO
 Default cell height ratio.
 $viewer_preferences
 PDF viewer preferences.
 $PageMode
 A name object specifying how the document should be displayed when opened.
 $gradients = array()
 Array for storing gradient information.
 $intmrk = array()
 Array used to store positions inside the pages buffer (keys are the page numbers).
 $bordermrk = array()
 Array used to store positions inside the pages buffer (keys are the page numbers).
 $emptypagemrk = array()
 Array used to store page positions to track empty pages (keys are the page numbers).
 $cntmrk = array()
 Array used to store content positions inside the pages buffer (keys are the page numbers).
 $footerpos = array()
 Array used to store footer positions of each page.
 $footerlen = array()
 Array used to store footer length of each page.
 $newline = true
 Boolean flag to indicate if a new line is created.
 $endlinex = 0
 End position of the latest inserted line.
 $linestyleWidth = ''
 PDF string for width value of the last line.
 $linestyleCap = '0 J'
 PDF string for CAP value of the last line.
 $linestyleJoin = '0 j'
 PDF string for join value of the last line.
 $linestyleDash = '[] 0 d'
 PDF string for dash value of the last line.
 $openMarkedContent = false
 Boolean flag to indicate if marked-content sequence is open.
 $htmlvspace = 0
 Count the latest inserted vertical spaces on HTML.
 $spot_colors = array()
 Array of Spot colors.
 $lisymbol = ''
 Symbol used for HTML unordered list items.
 $epsmarker = 'x#!#EPS#!#x'
 String used to mark the beginning and end of EPS image blocks.
 $transfmatrix = array()
 Array of transformation matrix.
 $transfmatrix_key = 0
 Current key for transformation matrix.
 $booklet = false
 Booklet mode for double-sided pages.
 $feps = 0.005
 Epsilon value used for float calculations.
 $tagvspaces = array()
 Array used for custom vertical spaces for HTML tags.
 $customlistindent = -1
 HTML PARSER: custom indent amount for lists.
 $opencell = true
 Boolean flag to indicate if the border of the cell sides that cross the page should be removed.
 $embeddedfiles = array()
 Array of files to embedd.
 $premode = false
 Boolean flag to indicate if we are inside a PRE tag.
 $transfmrk = array()
 Array used to store positions of graphics transformation blocks inside the page buffer.
 $htmlLinkColorArray = array(0, 0, 255)
 Default color for html links.
 $htmlLinkFontStyle = 'U'
 Default font style to add to html links.
 $numpages = 0
 Counts the number of pages.
 $pagelen = array()
 Array containing page lengths in bytes.
 $numimages = 0
 Counts the number of pages.
 $imagekeys = array()
 Store the image keys.
 $bufferlen = 0
 Length of the buffer in bytes.
 $diskcache = false
 If true enables disk caching.
 $numfonts = 0
 Counts the number of fonts.
 $fontkeys = array()
 Store the font keys.
 $font_obj_ids = array()
 Store the font object IDs.
 $pageopen = array()
 Store the fage status (true when opened, false when closed).
 $default_monospaced_font = 'courier'
 Default monospace font.
 $objcopy
 Cloned copy of the current class object.
 $cache_file_length = array()
 Array used to store the lengths of cache files.
 $thead = ''
 Table header content to be repeated on each new page.
 $theadMargins = array()
 Margins used for table header.
 $sign = false
 Boolean flag to enable document digital signature.
 $signature_data = array()
 Digital signature data.
 $signature_max_length = 11742
 Digital signature max length.
 $signature_appearance = array('page' => 1, 'rect' => '0 0 0 0')
 Data for digital signature appearance.
 $empty_signature_appearance = array()
 Array of empty digital signature appearances.
 $re_spaces = '/[^\S\xa0]/'
 Regular expression used to find blank characters (required for word-wrapping).
 $re_space = array('p' => '[^\S\xa0]', 'm' => '')
 Array of $re_spaces parts.
 $sig_obj_id = 0
 Digital signature object ID.
 $page_obj_id = array()
 ID of page objects.
 $form_obj_id = array()
 List of form annotations IDs.
 $default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128))
 Deafult Javascript field properties.
 $js_objects = array()
 Javascript objects array.
 $form_action = ''
 Current form action (used during XHTML rendering).
 $form_enctype = 'application/x-www-form-urlencoded'
 Current form encryption type (used during XHTML rendering).
 $form_mode = 'post'
 Current method to submit forms.
 $annotation_fonts = array()
 List of fonts used on form fields (fontname => fontkey).
 $radiobutton_groups = array()
 List of radio buttons parent objects.
 $radio_groups = array()
 List of radio group objects IDs.
 $textindent = 0
 Text indentation value (used for text-indent CSS attribute).
 $start_transaction_page = 0
 Store page number when startTransaction() is called.
 $start_transaction_y = 0
 Store Y position when startTransaction() is called.
 $inthead = false
 True when we are printing the thead section on a new page.
 $columns = array()
 Array of column measures (width, space, starting Y position).
 $num_columns = 1
 Number of colums.
 $current_column = 0
 Current column number.
 $column_start_page = 0
 Starting page for columns.
 $maxselcol = array('page' => 0, 'column' => 0)
 Maximum page and column selected.
 $colxshift = array('x' => 0, 's' => array('H' => 0, 'V' => 0), 'p' => array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0))
 Array of: X difference between table cell x start and starting page margin, cellspacing, cellpadding.
 $textrendermode = 0
 Text rendering mode: 0 = Fill text; 1 = Stroke text; 2 = Fill, then stroke text; 3 = Neither fill nor stroke text (invisible); 4 = Fill text and add to path for clipping; 5 = Stroke text and add to path for clipping; 6 = Fill, then stroke text and add to path for clipping; 7 = Add text to path for clipping.
 $textstrokewidth = 0
 Text stroke width in doc units.
 $strokecolor
 Current stroke color.
 $pdfunit = 'mm'
 Default unit of measure for document.
 $tocpage = false
 Boolean flag true when we are on TOC (Table Of Content) page.
 $rasterize_vector_images = false
 Boolean flag: if true convert vector images (SVG, EPS) to raster image using GD or ImageMagick library.
 $font_subsetting = true
 Boolean flag: if true enables font subsetting by default.
 $default_graphic_vars = array()
 Array of default graphic settings.
 $xobjects = array()
 Array of XObjects.
 $inxobj = false
 Boolean value true when we are inside an XObject.
 $xobjid = ''
 Current XObject ID.
 $font_stretching = 100
 Percentage of character stretching.
 $font_spacing = 0
 Increases or decreases the space between characters in a text by the specified amount (tracking).
 $page_regions = array()
 Array of no-write regions.
 $check_page_regions = true
 Boolean value true when page region check is active.
 $pdflayers = array()
 Array of PDF layers data.
 $dests = array()
 A dictionary of names and corresponding destinations (Dests key on document Catalog).
 $n_dests
 Object ID for Named Destinations.
 $efnames = array()
 Embedded Files Names.
 $svgdir = ''
 Directory used for the last SVG image.
 $svgunit = 'px'
 Deafult unit of measure for SVG.
 $svggradients = array()
 Array of SVG gradients.
 $svggradientid = 0
 ID of last SVG gradient.
 $svgdefsmode = false
 Boolean value true when in SVG defs group.
 $svgdefs = array()
 Array of SVG defs.
 $svgclipmode = false
 Boolean value true when in SVG clipPath tag.
 $svgclippaths = array()
 Array of SVG clipPath commands.
 $svgcliptm = array()
 Array of SVG clipPath tranformation matrix.
 $svgclipid = 0
 ID of last SVG clipPath.
 $svgtext = ''
 SVG text.
 $svgtextmode = array()
 SVG text properties.
 $svgstyles
 Array of SVG properties.
 $force_srgb = false
 If true force sRGB color profile for all document.
 $pdfa_mode = false
 If true set the document to PDF/A mode.
 $doc_creation_timestamp
 Document creation date-time.
 $doc_modification_timestamp
 Document modification date-time.
 $custom_xmp = ''
 Custom XMP data.
 $overprint = array('OP' => false, 'op' => false, 'OPM' => 0)
 Overprint mode array.
 $alpha = array('CA' => 1, 'ca' => 1, 'BM' => '/Normal', 'AIS' => false)
 Alpha mode array.
 $page_boxes = array('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox')
 Define the page boundaries boxes to be set on document.
 $tcpdflink = true
 If true print TCPDF meta link.
 $gdgammacache = array()
 Cache array for computed GD gamma values.

Detailed Description

!!! THIS CLASS IS UNDER DEVELOPMENT !!! PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.


Definition at line 59 of file tcpdf_import.php.

Member Function Documentation

TCPDF_IMPORT::importPDF (   $filename)

Import an existing PDF document.

Parameters
$filename(string) Filename of the PDF document to import.
Returns
true in case of success, false otherwise
Since
1.0.000 (2011-05-24)

Definition at line 68 of file tcpdf_import.php.

References $filename, and TCPDF\Error().

{
// load document
$rawdata = file_get_contents($filename);
if ($rawdata === false) {
$this->Error('Unable to get the content of the file: '.$filename);
}
// parse PDF data
$pdf = new TCPDF_PARSER($rawdata);
$data = $pdf->getParsedData();
// release some memory
unset($rawdata);
// ...
print_r($data); // DEBUG
unset($pdf);
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: