| 1 |
<?phpFile in a test directory |
| 99 |
'line-height' => 1.0, |
| 100 |
'list-style-position' => 'outside', |
| 101 |
'listtype' => '',References stty terminal command |
| 102 |
'float' => 'none', |
| 103 |
'margin' => ['T' => 0.0, 'R' => 0.0, 'B' => 0.0, 'L' => 0.0], |
| 823 |
$obj = $this->getTestObject(); |
| 824 |
$html = '<html><head><style>p { COLOR: RED; }</style></head><body><p>Hello</p><br></body></h…Generates HTML tags |
| 825 |
$out = $obj->tidyHTML($html, 'body{font-size:10pt;}'); |
| 4374 |
/** @var array<string, array<string, int|float>> $dests */ |
| 4375 |
$dests = $this->getObjectProperty($obj, 'dests'); |
| 4376 |
/** @var \Com\Tecnick\Pdf\Encrypt\Encrypt $encrypt */Encryption API usage markers |
| 4377 |
$encrypt = $this->getObjectProperty($obj, 'encrypt'); |
| 4378 |
/** @var \Com\Tecnick\Pdf\Page\Page $page */ |
| 5532 |
$html = |
| 5533 |
'<body>'Generates HTML tags |
| 5534 |
. '<a href="https://example.com">' |
| 7724 |
$listImageDataUri = |
| 7725 |
'data:image/svg+xml;base64,' |
| 7726 |
. 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9Ijgi'Encoded payload detected: base64 |
| 7727 |
. 'PjxjaXJjbGUgY3g9IjQiIGN5PSI0IiByPSI0IiBmaWxsPSJyZWQiLz48L3N2Zz4='; |
| 7728 |
$obj->addHTMLCell( |
| 7748 |
'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmci'Encoded payload detected: base64 |
| 7749 |
. 'IHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgogIDxjaXJjbGUgY3g9IjQiIGN5PSI0IiByPSIzIiBmaWxsPSJyZWQi' |
| 9482 |
$nowrapHeight = $extractFillSpan($outNoWrap);PHP obfuscation patterns |
| 9483 |
$wrapHeight = $extractFillSpan($outWrap); |
| 13550 |
$html = '<head><style>p{color:red;}</style></head><p>A</p><script>x</script>';Generates HTML tags |
| 14421 |
$svg = (string) realpath(__DIR__ . '/../examples/images/testsvg.svg');Resolves real path |
| 14561 |
public function testAddHTMLCellBlocksTempImagesByDefault(): void |
| 14562 |
{ |
| 14563 |
$tmpImage = (string) \tempnam(\sys_get_temp_dir(), 'tc-html-img-');Windows Temp directory path |
| 14564 |
\unlink($tmpImage);PHP unlink function symbol |
| 14565 |
$tmpImage .= '.png'; |
| 14566 |
\copy(__DIR__ . '/../examples/images/tcpdf_cell.png', $tmpImage); |
| 17724 |
$previousScriptFilename = $_SERVER['SCRIPT_FILENAME'];Generic $_SERVER superglobal access |
| 17725 |
$_SERVER['SCRIPT_FILENAME'] = (string) \realpath(__DIR__ . '/../examples/E043_html_tables.ph… |
| 1 |
<?phpHigh entropy identifiers |
| 12 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 13 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 14 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 15 |
* |
| 16 |
* This file is part of tc-lib-pdf software library.English language detection |
| 17 |
*/ |
| 426 |
'list-style-image', |
| 427 |
'list-style-position', |
| 428 |
'listtype',References stty terminal command |
| 429 |
'orphans', |
| 430 |
'overflow-wrap', |
| 446 |
*/ |
| 447 |
protected const HTML_VALID_TAGS = |
| 448 |
'<marker/><a><b><blockquote><body><br><br/><code><dd><del><div><dl><dt><em>'Generates HTML tags |
| 449 |
. '<button><caption><col><colgroup><figure><figcaption><font><form>' |
| 450 |
. '<h1><h2><h3><h4><h5><h6><hr><hr/><i><img><input><label>' |
| 666 |
public function strTrimLeft(string $str, string $replace = ''): string |
| 667 |
{ |
| 668 |
return \preg_replace('/^[^\S\xa0]+/u', $replace, $str) ?? '';Decoded unicode-escape content |
| 669 |
} |
| 731 |
} |
| 732 |
while (\preg_match("'<xre([^\\>]*)>(.*?)[^\\S\\xa0](.*?)</pre>'ui", $html_b) === 1) {Decoded unicode-escape content |
| 733 |
// preserve spaces on <pre> tag |
| 902 |
$html = \preg_replace('/<\/(td|th)>/', '<marker style="font-size:0"/></\\1>', $html) ?? ''; |
| 903 |
$html = \preg_replace('/<\/table>([\s]*)<marker style="font-size:0"\/>/', '</table>', $html)… |
| 904 |
$html = \preg_replace('/[^\\S\\xa0]+<img/u', chr(32) . '<img', $html) ?? '';Character code manipulation |
| 905 |
$html = \preg_replace('/<img([^\>]*)>[\s]+([^\<])/xi', '<img\\1> \\2', $html) ?? ''; |
| 906 |
$html = \preg_replace('/<img([^\>]*)>/xi', '<img\\1><span><marker style="font-size:0"/></spa… |
| 1082 |
// create a custom tag to contain the encoded CSS data array (used for table content). |
| 1083 |
$jcss = \json_encode($css);JSON encoding for data output |
| 1084 |
$cssarray = ''; |
| 1085 |
if ($jcss !== false) { |
| 2256 |
$arg = \strtolower(\trim($arg, " \t\n\r\0\x0B\"'"));Decoded unicode-escape content |
| 2257 |
if ($arg === '') { |
| 8424 |
if ($source !== '' && $source[0] !== '@' && !\str_contains($source, '://')) { |
| 8425 |
$baseDirs = []; |
| 8426 |
$scriptFilename = $_SERVER['SCRIPT_FILENAME'];Generic $_SERVER superglobal access |
| 8427 |
$baseDirs[] = \dirname($scriptFilename); |
| 13550 |
$flush = $this->flushOpenBlockBuffers($hrc, $tpy); |
| 13551 |
if ($flush !== '') { |
| 13552 |
$appendFragment($flush);PHP obfuscation patterns |
| 13553 |
} |
| 13554 |
} |
| 16147 |
* @throws \Com\Tecnick\Color\Exception |
| 16148 |
* @throws \Com\Tecnick\File\Exception |
| 16149 |
* @throws \Com\Tecnick\Pdf\Encrypt\ExceptionEncryption API usage markers |
| 16150 |
* @throws \Com\Tecnick\Pdf\Font\Exception |
| 16151 |
* @throws \Com\Tecnick\Pdf\Image\Exception |
| 1 |
<?phpFile in a test directory |
| 10 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 11 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 12 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 13 |
* |
| 14 |
* This file is part of tc-lib-pdf software library.English language detection |
| 15 |
*/ |
| 17 |
namespace Test;Source or test keyword |
| 38 |
/** @throws \Throwable */ |
| 39 |
public function testAddSVGStoresInlineSvgObject(): voidPHP file is PHPUnit test or test-framework vendor code |
| 40 |
{ |
| 41 |
$obj = $this->getTestObject(); |
| 50 |
$this->assertSame(1, $soid);PHPUnit assertion method call |
| 51 |
/** @var array<int, array<string, mixed>> $svgobjs */ |
| 52 |
$svgobjs = $this->getObjectProperty($obj, 'svgobjs'); |
| 474 |
$obj->patchSvgObj(3, [ |
| 475 |
'defs' => [PHP dense array-pair data table |
| 476 |
'patEmpty' => [ |
| 477 |
'name' => 'pattern', |
| 545 |
$tmp = \tempnam(\sys_get_temp_dir(), 'tc-svg-');Any temporary directory path reference |
| 546 |
$this->assertNotFalse($tmp); |
| 547 |
\file_put_contents($tmp, $inline);Creates or overwrites a local file |
| 548 |
try { |
| 549 |
$this->assertSame($inline, $obj->exposeGetRawSVGData($tmp)); |
| 550 |
} finally { |
| 551 |
if (\file_exists($tmp)) { |
| 552 |
\unlink($tmp);PHP unlink function symbol |
| 553 |
} |
| 554 |
} |
| 1680 |
'attr' => [ |
| 1681 |
'id' => 'patRef', |
| 1682 |
'href' => 'https://example.com/patterns.svg#patBase',HTTPS protocol prefix |
| 1683 |
'x' => '1', |
| 1684 |
'y' => '1', |
| 3629 |
60, |
| 3630 |
[ |
| 3631 |
'xlink:href' => 'data:image/png;base64,' . $onePx,base64 encoding keyword |
| 3632 |
'x' => '0', |
| 3633 |
'y' => '0', |
| 4227 |
// Missing both href attributes → empty.npmrc benign context |
| 4228 |
$this->assertSame('', $obj->exposeParseSVGTagSTARTimage($parser, 84, [], $base, $base)); |
| 6506 |
…// ── sampleTextPathArc ────────────────────────…Box drawing text banner |
tecnickcom-tc-lib-pdf-8.46.0.zip
zip
| 0x0 |
504b03040a00000000004c14cf5c0000 |
PK........L..\..Zip archive path |
| 0x10 |
000000000000000000001e0009007465 |
..............te |
| 0x20 |
636e69636b636f6d2d74632d6c69622d |
cnickcom-tc-lib- |
| 0x30 |
7064662d353637353462652f55540500 |
pdf-56754be/UT.. |
| 10 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 11 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 12 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 13 |
* |
| 14 |
* This file is part of tc-lib-pdf software library.English language detection |
| 15 |
*/ |
| 17 |
// NOTE: run make deps fonts in the project root to generate the dependencies and example fonts.Project/workspace keyword |
| 58 |
// test images directorySource or test keyword |
| 59 |
$imgdir = \realpath(__DIR__ . '/../vendor/tecnickcom/tc-lib-pdf-image/test/images/'); |
E073_css_supported_categories.php
php
| 4 |
* E073_css_supported_categories.php |
| 5 |
* |
| 6 |
* Demonstrates the major CSS feature categories supported by tc-lib-pdf,English language detection |
| 7 |
* including table/float/clear interaction, CSS shorthand inherit propagation,Cleanup verb |
| 8 |
* fieldset and inline-block element styling, overflow-wrap, complexoverflow keyword |
| 9 |
* CSS selector combinators, and a global base stylesheet registered once via |
| 10 |
* setGlobalCSS() and injected into every HTML rendering call. |
| 16 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 17 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 18 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 19 |
* |
| 20 |
* This file is part of tc-lib-pdf software library. |
| 21 |
*/ |
| 23 |
// NOTE: run make deps fonts in the project root to generate the dependencies and example fonts.Project/workspace keyword |
| 209 |
<div class="page-break"></div> |
| 210 |
<h2>11) Admin Float + Table Clearance</h2>admin keyword |
| 211 |
<p>The table top border must start below the dotted guide and below both KPI cards, without touc… |
| 212 |
<style> |
| 508 |
<h2>17) Non-Font Shorthand Stress Cases</h2> |
| 509 |
<p>This section focuses on shorthand combinations that are often normalized conservatively in st… |
| 510 |
…ry target here is complex <code>background</code> shorthand token ordering and mixed token sets.</p>Credential-related keyword present |
| 511 |
<style> |
| 512 |
.nf2-wrap { border: 0.4pt solid #9fb0be; padding: 5pt; background: #fcfdff; } |
E037_image_methods.php
php
| 1 |
<?phpBenign context: high comment-to-code ratio (≥35%) |
| 10 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 11 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 12 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 13 |
* |
| 14 |
* This file is part of tc-lib-pdf software library.English language detection |
| 15 |
*/ |
| 17 |
// NOTE: run make deps fonts in the project root to generate the dependencies and example fonts.Project/workspace keyword |
| 58 |
// test images directorySource or test keyword |
| 59 |
$imgdir = \realpath(__DIR__ . '/../vendor/tecnickcom/tc-lib-pdf-image/test/images/'); |
E031_html_features.php
php
| 1 |
<?phpMultiple long lines (>1000 chars) |
| 10 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 11 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 12 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 13 |
* |
| 14 |
* This file is part of tc-lib-pdf software library.English language detection |
| 15 |
*/ |
| 17 |
// NOTE: run make deps fonts in the project root to generate the dependencies and example fonts.Project/workspace keyword |
E078_htmlcell_page_margins.php
php
| 1 |
<?phpBenign context: high comment-to-code ratio (≥35%) |
| 10 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 11 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 12 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 13 |
* |
| 14 |
* This file is part of tc-lib-pdf software library.English language detection |
| 15 |
*/ |
| 17 |
// NOTE: run make deps fonts in the project root to generate the dependencies and example fonts.Project/workspace keyword |
| 108 |
// An explicit cell height is passed so each block is treated as an |
| 109 |
// absolutely-positioned bounded box. Without it, content placed below the |
| 110 |
// content region (e.g. the bottom margin) is treated as overflow and theoverflow keyword |
| 111 |
// HTML cursor is reset to the top of the content area. |
| 112 |
$cellH = 20.0; |
E077_html_table_header_px_unit.php
php
| 1 |
<?phpBenign context: high comment-to-code ratio (≥35%) |
| 10 |
* @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD |
| 11 |
* @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) |
| 12 |
* @link https://github.com/tecnickcom/tc-lib-pdfEncoded URL documentation context |
| 13 |
* |
| 14 |
* This file is part of tc-lib-pdf software library.English language detection |
| 15 |
*/ |
| 17 |
// NOTE: run make deps fonts in the project root to generate the dependencies and example fonts.Project/workspace keyword |
Showing the top 10 files for legibility — 1 more file (3 results) hidden. Open a file directly to see its full context.