# TCPDF -> tc-lib-pdf Delegation Mapping

Generated by `php scripts/mapping.php` from the curated map in that script
(single source of truth). Do not edit this file manually.

Statuses: `stub` (not implemented), `delegated`, `adapter`, `shim`,
`intentional-noop`, `blocked`.

## Summary

| Family | Total | Delegated | Adapter | Shim | Noop | Blocked | Stub |
|---|---:|---:|---:|---:|---:|---:|---:|
| Bootstrap/Lifecycle/Output | 33 | 10 | 8 | 12 | 3 | 0 | 0 |
| Document/Page state | 60 | 0 | 20 | 40 | 0 | 0 | 0 |
| Header/Footer | 19 | 0 | 0 | 17 | 2 | 0 | 0 |
| Text/Font/metrics | 45 | 5 | 21 | 19 | 0 | 0 | 0 |
| HTML/CSS | 18 | 2 | 3 | 10 | 3 | 0 | 0 |
| Graphics/Transforms/Images | 71 | 4 | 58 | 7 | 1 | 1 | 0 |
| Forms/Annotations/Links/JS | 20 | 3 | 15 | 2 | 0 | 0 | 0 |
| Signatures/Security | 6 | 0 | 6 | 0 | 0 | 0 | 0 |
| Barcodes | 4 | 0 | 2 | 2 | 0 | 0 | 0 |
| Columns/TOC/Templates/Regions | 17 | 0 | 9 | 6 | 0 | 2 | 0 |
| **Total** | **293** | **24** | **142** | **115** | **9** | **3** | **0** |

## Bootstrap/Lifecycle/Output

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| __construct | `\Com\Tecnick\Pdf\Tcpdf::__construct` | adapter | map (orientation,unit,format,unicode,encoding,diskcache,pdfa) onto (unit,isunicode,subsetfont,compress,mode); orientation/format become per-page defaults |
| __destruct | `-` | shim | release delegate |
| __get | `-` | shim | legacy protected properties (AutoPageBreak, lMargin, ...) read by user subclasses |
| __isset | `-` | shim | companion of __get |
| Error | `-` | shim | throw/die per K_TCPDF_THROW_EXCEPTION_ERROR |
| Open | `-` | shim | legacy state flag only |
| Close | `-` | adapter | renders deferred header/footer decorations for all pages, then builds the PDF |
| Output | `Output::getOutPDFString/savePDF/renderPDF/downloadPDF` | adapter | dest switch I/D/F/S/FI/FD/E |
| getPDFData | `Output::getOutPDFString` | delegated |  |
| setCompression | `Tcpdf::$compress` | intentional-noop | compression is always enabled at engine construction; legacy off-switch dropped |
| setSRGBmode | `MetaInfo::setSRGB` | delegated |  |
| setDocInfoUnicode | `-` | intentional-noop | tc-lib handles doc-info encoding internally |
| setTitle | `MetaInfo::setTitle` | delegated |  |
| setSubject | `MetaInfo::setSubject` | delegated |  |
| setAuthor | `MetaInfo::setAuthor` | delegated |  |
| setKeywords | `MetaInfo::setKeywords` | delegated |  |
| setCreator | `MetaInfo::setCreator` | delegated |  |
| setAllowLocalFiles | `Tcpdf::$fileOptions` | intentional-noop | engine file access is constructor-bound; facade passes legacy-compatible allowed paths |
| setDisplayMode | `Tcpdf::setDisplayMode` | delegated |  |
| setPDFVersion | `Base::setPDFVersion` | delegated |  |
| setViewerPreferences | `MetaInfo::setViewerPreferences` | adapter |  |
| setExtraXMP | `MetaInfo::setCustomXMP` | adapter |  |
| setExtraXMPRDF | `MetaInfo::setCustomXMP` | adapter |  |
| setExtraXMPPdfaextension | `MetaInfo::setCustomXMP` | adapter |  |
| setDocCreationTimestamp | `MetaInfo::$doctime` | shim | facade state; the engine stamps output with its own clock |
| setDocModificationTimestamp | `MetaInfo::$docmodtime` | shim | facade state; the engine stamps output with its own clock |
| getDocCreationTimestamp | `MetaInfo::$doctime` | shim |  |
| getDocModificationTimestamp | `MetaInfo::$docmodtime` | shim |  |
| setLanguageArray | `Tcpdf::setLanguageArray` | adapter | English defaults built in; overridable via K_TCPDF_DEFAULT_LANGUAGE or this method |
| setSpacesRE | `Tcpdf::setSpaceRegexp` | delegated |  |
| startTransaction | `-` | shim | deep snapshot via serialize/unserialize of the facade+engine graph |
| commitTransaction | `-` | shim |  |
| rollbackTransaction | `-` | shim |  |

## Document/Page state

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| setPageUnit | `-` | shim | re-creates the engine; only valid before the first page |
| setPageOrientation | `Page (per-page data)` | shim |  |
| setPage | `Page::setCurrentPage` | adapter |  |
| lastPage | `Page::setCurrentPage` | adapter |  |
| getPage | `Page::getPageId` | adapter | 1-based vs 0-based |
| getNumPages | `Page::getPages` | adapter |  |
| AddPage | `Text::addPage` | adapter | apply facade margins/format; re-emit font+colors |
| endPage | `-` | shim | headers/footers deferred to Close(); resets tocpage flag |
| startPage | `Text::addPage` | adapter |  |
| setPageMark | `Page::addContentMark` | adapter |  |
| PageNo | `Page::getPageId` | adapter |  |
| getPageDimensions | `Page::getPage` | adapter | legacy array shape |
| getPageWidth | `Page::getPage` | adapter |  |
| getPageHeight | `Page::getPage` | adapter |  |
| getBreakMargin | `Page::getPage` | adapter |  |
| getScaleFactor | `Tcpdf::$kunit` | shim | points per unit |
| setMargins | `Page margins` | shim | facade state + future pages |
| setLeftMargin | `Page margins` | shim |  |
| setTopMargin | `Page margins` | shim |  |
| setRightMargin | `Page margins` | shim |  |
| getMargins | `-` | shim | facade state accessor |
| getOriginalMargins | `-` | shim |  |
| setCellPadding | `Cell::setDefaultCellPadding` | adapter |  |
| setCellPaddings | `Cell::setDefaultCellPadding` | adapter |  |
| getCellPaddings | `Tcpdf::$defcell` | shim |  |
| setCellMargins | `Cell::setDefaultCellMargin` | adapter |  |
| getCellMargins | `Tcpdf::$defcell` | shim |  |
| setAutoPageBreak | `Page margins (CB)` | adapter |  |
| getAutoPageBreak | `-` | shim |  |
| Ln | `-` | shim | cursor shim |
| GetX | `-` | shim | cursor shim |
| GetAbsX | `-` | shim |  |
| GetY | `-` | shim |  |
| setX | `-` | shim |  |
| setY | `-` | shim |  |
| setXY | `-` | shim |  |
| setAbsX | `-` | shim |  |
| setAbsY | `-` | shim |  |
| setAbsXY | `-` | shim |  |
| AcceptPageBreak | `-` | shim | page-break policy hook |
| movePage | `Page::move` | adapter | engine move() only supports moving pages backward (same as legacy) |
| deletePage | `Page::delete` | adapter |  |
| copyPage | `-` | adapter | clones format/margins/content into a new page |
| startPageGroup | `Page group` | shim | group applies from the next added page |
| setStartingPageNumber | `-` | shim |  |
| getAliasRightShift | `-` | shim | legacy alias machinery |
| getAliasNbPages | `-` | shim | returns real total during deferred decoration; placeholder otherwise (body substitution pending) |
| getAliasNumPage | `-` | shim | returns real number during deferred decoration; placeholder otherwise |
| getPageGroupAlias | `-` | shim | real total during deferred decoration; placeholder otherwise |
| getPageNumGroupAlias | `-` | shim | real number during deferred decoration; placeholder otherwise |
| getGroupPageNo | `-` | adapter |  |
| getGroupPageNoFormatted | `-` | shim |  |
| PageNoFormatted | `-` | shim |  |
| setBooklet | `Page margins (booklet)` | shim |  |
| setLastH | `-` | shim | cursor shim |
| getLastH | `-` | shim |  |
| resetLastH | `-` | shim |  |
| getCellHeight | `-` | shim | fontsize*ratio+padding |
| setCellHeightRatio | `-` | shim |  |
| getCellHeightRatio | `-` | shim |  |

## Header/Footer

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| setHeaderData | `-` | shim | facade-rendered page decoration |
| setFooterData | `-` | shim |  |
| getHeaderData | `-` | shim |  |
| setHeaderMargin | `-` | shim |  |
| getHeaderMargin | `-` | shim |  |
| setFooterMargin | `-` | shim |  |
| getFooterMargin | `-` | shim |  |
| setPrintHeader | `-` | shim | per-page flag frozen when the page starts |
| setPrintFooter | `-` | shim | per-page flag, updatable until the page ends |
| getImageRBX | `-` | shim | image bottom-right cursor |
| getImageRBY | `-` | shim |  |
| resetHeaderTemplate | `-` | intentional-noop | facade renders headers directly, no cached XObject template |
| setHeaderTemplateAutoreset | `-` | intentional-noop | facade renders headers directly, no cached XObject template |
| Header | `-` | shim | deferred to Close(); painted behind the body content (legacy z-order) |
| Footer | `-` | shim | deferred rendering at Close-time; real page numbers (no alias substitution needed) |
| setHeaderFont | `-` | shim |  |
| getHeaderFont | `-` | shim |  |
| setFooterFont | `-` | shim |  |
| getFooterFont | `-` | shim |  |

## Text/Font/metrics

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| setRTL | `Base::setRTL` | adapter | plus resetx cursor handling |
| getRTL | `Tcpdf::$rtl` | shim |  |
| setTempRTL | `-` | shim | forcedir on text calls |
| isRTLTextDir | `-` | shim |  |
| GetStringWidth | `Font metrics` | adapter |  |
| GetArrStringWidth | `Font metrics` | adapter |  |
| GetCharWidth | `Font metrics` | adapter |  |
| getRawCharWidth | `Font metrics` | adapter |  |
| GetNumChars | `Unicode conv` | adapter |  |
| AddFont | `Font\Stack::insert` | adapter | tc-lib font model only (breaking change): import new fonts with the tc-lib-pdf-font importer |
| setFont | `Font\Stack::insert` | adapter | tc-lib font model only (breaking change): legacy .php/.z font definitions unsupported |
| setFontSize | `Font\Stack::insert` | adapter |  |
| getFontBBox | `Font metrics` | adapter |  |
| getAbsFontMeasure | `Font metrics` | shim |  |
| getCharBBox | `Font metrics` | adapter |  |
| getFontDescent | `Font metrics` | adapter |  |
| getFontAscent | `Font metrics` | adapter |  |
| isCharDefined | `Font metrics` | adapter |  |
| replaceMissingChars | `Font metrics` | adapter |  |
| setDefaultMonospacedFont | `-` | shim | state |
| getFontSize | `-` | shim | state accessor |
| getFontSizePt | `-` | shim |  |
| getFontFamily | `-` | shim |  |
| getFontStyle | `-` | shim |  |
| getFontFamilyName | `-` | delegated | family name normalization |
| isUnicodeFont | `Font metrics` | delegated |  |
| setFontSubsetting | `Font\Stack subset flag` | shim |  |
| getFontSubsetting | `-` | shim |  |
| setFontStretching | `Font\Stack::insert stretching` | shim | ambient Tz text-state operator (engine spacing/stretching conventions are inconsistent) |
| getFontStretching | `-` | shim |  |
| setFontSpacing | `Font\Stack::insert spacing` | shim | ambient Tc text-state operator (engine spacing/stretching conventions are inconsistent) |
| getFontSpacing | `-` | shim |  |
| Text | `Text::getTextCell` | adapter | absolute-position Cell |
| Cell | `Text::getTextCell` | adapter | cursor model + page-break in facade; stretch modes 1/2 via horizontal-scaling CTM, 3/4 via ambient Tc spacing |
| MultiCell | `Text::getTextCell` | adapter | height grows to fit text (legacy minimum-height semantics); ln=0 returns to the starting page |
| Write | `Text::getTextCell` | adapter | flowing text |
| getNumLines | `Text line split` | shim | greedy-wrap approximation; engine splitLines is protected |
| getStringHeight | `Text line split` | shim | derived from getNumLines approximation |
| hyphenateText | `Text::setTexHyphenPatterns` | adapter | configures engine TeX patterns; engine hyphenates at render time, text returned unchanged |
| setTextRenderingMode | `getTextCell stroke/fill/clip args` | shim |  |
| setTextShadow | `getTextCell shadow arg` | adapter | native engine shadow for Cell/MultiCell/Write/Text; HTML shadows emulated with an offset alpha-blended copy of the rendered text objects; header/footer render shadow-free (legacy parity) |
| getTextShadow | `-` | shim |  |
| stringLeftTrim | `HTML::strTrimLeft` | delegated |  |
| stringRightTrim | `HTML::strTrimRight` | delegated |  |
| stringTrim | `HTML::strTrim` | delegated |  |

## HTML/CSS

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| writeHTML | `HTML::addHTMLCell` | adapter | markup pre-processing: malformed hex colors repaired, relative resource paths resolved, styled inline parents with nested children flattened (engine paints inline backgrounds only at depth 1) |
| writeHTMLCell | `HTML::addHTMLCell` | adapter | ln=0 returns to the starting page (legacy column flows); tcpdf-in-HTML tags executed when K_TCPDF_CALLS_IN_HTML is set |
| fixHTMLCode | `HTML::tidyHTML` | delegated |  |
| addHtmlLink | `-` | shim | rendered via Write() with link color/style state |
| unhtmlentities | `-` | shim | html_entity_decode |
| getCSSPadding | `CSS helpers` | shim | CSS shorthand parser |
| getCSSMargin | `CSS helpers` | shim | CSS shorthand parser |
| getCSSBorderMargin | `CSS helpers` | shim | CSS shorthand parser |
| getHTMLFontUnits | `CSS helpers` | shim |  |
| getHTMLUnitToUnits | `CSS helpers` | shim |  |
| serializeTCPDFtag | `-` | shim | payload format consumed by the writeHTML tcpdf-tag executor |
| setLIsymbol | `HTML::setULLIDot` | delegated |  |
| setHtmlVSpace | `HTML::setHtmlVSpace` | adapter |  |
| setListIndentWidth | `-` | intentional-noop | list indentation is computed by the engine HTML renderer |
| setOpenCell | `-` | intentional-noop | block continuation borders are handled by the engine HTML renderer |
| setHtmlLinksStyle | `-` | shim | state consumed by addHtmlLink |
| setDefaultTableColumns | `-` | intentional-noop | table layout is computed by the engine HTML renderer |
| pixelsToUnits | `-` | shim | px / (k * imgscale) |

## Graphics/Transforms/Images

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| getAllSpotColors | `Color spot registry` | delegated |  |
| AddSpotColor | `Color spot registry` | adapter | CMYK components 0-100 mapped to the engine color model |
| setSpotColor | `Color spot registry` | adapter |  |
| setDrawSpotColor | `Color spot registry` | adapter |  |
| setFillSpotColor | `Color spot registry` | adapter |  |
| setTextSpotColor | `Color spot registry` | adapter |  |
| setColorArray | `Color\Pdf` | adapter | legacy array conventions (gray/RGB/CMYK) |
| setDrawColorArray | `Color\Pdf` | adapter |  |
| setFillColorArray | `Color\Pdf` | adapter |  |
| setTextColorArray | `Color\Pdf` | adapter |  |
| setColor | `Color\Pdf` | adapter |  |
| setDrawColor | `Color\Pdf` | adapter |  |
| setFillColor | `Color\Pdf` | adapter |  |
| setTextColor | `Color\Pdf` | adapter |  |
| setLineWidth | `Graph style` | adapter |  |
| GetLineWidth | `-` | shim |  |
| setLineStyle | `Graph style` | adapter | legacy style array translation |
| Line | `Graph\Draw::getLine` | adapter |  |
| Rect | `Graph\Draw::getRect` | adapter |  |
| Curve | `Graph\Draw raw ops` | adapter |  |
| Polycurve | `Graph\Draw raw ops` | adapter |  |
| Ellipse | `Graph\Draw::getEllipse` | adapter |  |
| Circle | `Graph\Draw::getCircle` | adapter |  |
| PolyLine | `Graph\Draw::getPolygon` | adapter |  |
| Polygon | `Graph\Draw::getPolygon` | adapter | per-segment line styles collapsed to a single style |
| RegularPolygon | `Graph\Draw::getRegularPolygon` | adapter |  |
| StarPolygon | `Graph\Draw::getStarPolygon` | adapter |  |
| RoundedRect | `Graph\Draw::getRoundedRect` | adapter |  |
| RoundedRectXY | `Graph\Draw::getRoundedRect` | adapter |  |
| Arrow | `Graph\Draw` | adapter |  |
| StartTransform | `Graph\Draw::getStartTransform` | delegated |  |
| StopTransform | `Graph\Draw::getStopTransform` | delegated |  |
| ScaleX | `Graph transform` | adapter |  |
| ScaleY | `Graph transform` | adapter |  |
| ScaleXY | `Graph transform` | adapter |  |
| Scale | `Graph transform` | adapter | legacy percentages mapped to engine ratios |
| MirrorH | `Graph transform` | adapter |  |
| MirrorV | `Graph transform` | adapter |  |
| MirrorP | `Graph transform` | adapter |  |
| MirrorL | `Graph transform` | adapter |  |
| TranslateX | `Graph transform` | adapter |  |
| TranslateY | `Graph transform` | adapter |  |
| Translate | `Graph transform` | adapter |  |
| Rotate | `Graph transform` | adapter |  |
| SkewX | `Graph transform` | adapter |  |
| SkewY | `Graph transform` | adapter |  |
| Skew | `Graph transform` | adapter |  |
| setAlpha | `Graph ExtGState` | adapter |  |
| getAlpha | `-` | shim |  |
| setOverprint | `Graph ExtGState` | adapter |  |
| getOverprint | `-` | shim |  |
| setVisibility | `Tcpdf::newLayer` | adapter | mapped onto optional-content layers |
| startLayer | `Tcpdf::newLayer` | adapter |  |
| endLayer | `Tcpdf::closeLayer` | adapter |  |
| colorRegistrationBar | `Graph\Draw` | adapter | legacy letter list mapped to engine color pairs |
| cropMark | `Graph\Draw` | adapter |  |
| registrationMark | `Graph\Draw::getRegistrationMark` | adapter | secondary color ignored (engine derives the inverse) |
| registrationMarkCMYK | `Graph\Draw::getCmykRegistrationMark` | delegated |  |
| LinearGradient | `Graph gradients` | adapter |  |
| RadialGradient | `Graph gradients` | adapter |  |
| CoonsPatchMesh | `Graph gradients` | adapter | corner order verified against the reference renderer (engine names use PDF y-up coordinates) |
| Gradient | `Graph gradients` | adapter |  |
| PieSector | `Graph\Draw::getPieSector` | adapter | legacy cw/origin angle convention translated |
| PieSectorXY | `Graph\Draw::getPieSector` | shim | elliptical sector approximated by scaling a circular sector |
| Image | `Image\Import::add + Graph` | adapter | placement, @-string data, dpi/imgscale sizing, fitbox, palign, masks via engine |
| ImageEps | `-` | blocked | unsupported (breaking change): no PostScript interpreter in the engine — convert EPS/AI artwork to SVG and use ImageSVG(); SVG/raster inputs are dispatched to ImageSVG()/Image() |
| ImageSVG | `SVG::addSVG` | adapter |  |
| setImageScale | `-` | shim | state |
| getImageScale | `-` | shim |  |
| setJPEGQuality | `Image quality arg` | shim |  |
| setRasterizeVectorImages | `-` | intentional-noop | the engine renders vector images natively |

## Forms/Annotations/Links/JS

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| AddLink | `JavaScript::addInternalLink` | adapter | facade tokens resolved to engine internal links at use time |
| setLink | `JavaScript::addInternalLink` | adapter |  |
| Link | `JavaScript::setLink` | adapter |  |
| Annotation | `JavaScript::setAnnotation` | adapter | option keys lowercased; unreadable attachment sources skipped (legacy parity) |
| EmbedFile | `JavaScript::addEmbeddedFile` | adapter |  |
| EmbedFileFromString | `JavaScript::addContentAsEmbeddedFile` | delegated |  |
| IncludeJS | `JavaScript::appendRawJavaScript` | delegated |  |
| addJavascriptObject | `JavaScript::addRawJavaScriptObj` | delegated |  |
| setFormDefaultProp | `JavaScript::setDefJSAnnotProp` | adapter |  |
| getFormDefaultProp | `JavaScript::getDefJSAnnotProp` | shim |  |
| TextField | `JavaScript::addFFText/addJSText` | adapter |  |
| RadioButton | `JavaScript::addFFRadioButton` | adapter |  |
| ListBox | `JavaScript::addFFListBox` | adapter |  |
| ComboBox | `JavaScript::addFFComboBox` | adapter |  |
| CheckBox | `JavaScript::addFFCheckBox` | adapter |  |
| Button | `JavaScript::addFFButton` | adapter |  |
| setDestination | `JavaScript::setNamedDestination` | adapter |  |
| getDestination | `-` | shim |  |
| setBookmark | `JavaScript::setBookmark` | adapter |  |
| Bookmark | `JavaScript::setBookmark` | adapter |  |

## Signatures/Security

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| setProtection | `Encrypt\Encrypt (constructor)` | adapter | re-initializes the engine with an Encrypt object; must be called before pages; legacy RC4 deprecation muted |
| setUserRights | `Tcpdf::setUserRights` | adapter |  |
| setSignature | `Tcpdf::setSignature` | adapter |  |
| setSignatureAppearance | `Tcpdf::setSignatureAppearance` | adapter |  |
| addEmptySignatureAppearance | `Tcpdf::addEmptySignatureAppearance` | adapter |  |
| setTimeStamp | `Tcpdf::setSignTimeStamp` | adapter |  |

## Barcodes

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| setBarcode | `-` | shim | header barcode state |
| getBarcode | `-` | shim |  |
| write1DBarcode | `Tcpdf::getBarcode` | adapter | natural width from module count x xres; fg/bg colors, border, position, label text; legacy-only types skipped |
| write2DBarcode | `Tcpdf::getBarcode` | adapter | RAW/RAW2 mapped to engine SRAW; fg/bg colors, border, position |

## Columns/TOC/Templates/Regions

| TCPDF method | tc-lib target | Status | Notes |
|---|---|---|---|
| addTOCPage | `-` | shim |  |
| endTOCPage | `-` | shim |  |
| addTOC | `Tcpdf::addTOC` | adapter | engine builds the TOC from the bookmark outline; filler/font args not applied |
| addHTMLTOC | `-` | shim | approximated with the engine bookmark TOC; HTML templates not applied |
| setEqualColumns | `Page regions (columns)` | adapter | columns become regions of pages added after the call |
| resetColumns | `Page regions` | shim |  |
| setColumnsArray | `Page regions` | adapter | applies to pages added after the call |
| selectColumn | `Page regions` | adapter |  |
| getColumn | `Page regions` | adapter |  |
| getNumberOfColumns | `Page regions` | adapter |  |
| startTemplate | `JavaScript::newXObjectTemplate` | adapter | facade routes content and registers fonts/images/extgstates in the XObject resources; page breaks suppressed inside templates |
| endTemplate | `JavaScript::exitXObjectTemplate` | adapter |  |
| printTemplate | `JavaScript::getXObjectTemplate` | adapter |  |
| getPageRegions | `Page regions` | shim |  |
| setPageRegions | `Page regions` | blocked | legacy regions are no-write exclusion zones; the engine only supports writable regions - stored for page creation, exclusion semantics not reproduced |
| addPageRegion | `Page regions` | blocked | see setPageRegions |
| removePageRegion | `Page regions` | shim |  |

