32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-10-31 18:52:35 +00:00

6.0.076 (2014-05-06)

- A bug in Datamatrix Base256 encoding was fixed.
- Merged fix for SVG use/clip-gradient.
- Now it is possible to prefix a page number in Link methods with the * character to avoid been changed when adding/deleting/moving pages (see example_045.php).
This commit is contained in:
nicolaasuni 2014-05-06 19:41:12 +01:00
parent 04215e8359
commit 71d9a43e58
7 changed files with 112 additions and 69 deletions

View File

@ -1,3 +1,8 @@
6.0.076 (2014-05-06)
- A bug in Datamatrix Base256 encoding was fixed.
- Merged fix for SVG use/clip-gradient.
- Now it is possible to prefix a page number in Link methods with the * character to avoid been changed when adding/deleting/moving pages (see example_045.php).
6.0.075 (2014-05-05) 6.0.075 (2014-05-05)
- Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed. - Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 6.0.075 Version: 6.0.076
Release date: 2014-05-05 Release date: 2014-05-06
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2014: Copyright (c) 2002-2014:

View File

@ -1,6 +1,6 @@
{ {
"name": "tecnick.com/tcpdf", "name": "tecnick.com/tcpdf",
"version": "6.0.075", "version": "6.0.076",
"homepage": "http://www.tcpdf.org/", "homepage": "http://www.tcpdf.org/",
"type": "library", "type": "library",
"description": "TCPDF is a PHP class for generating PDF documents.", "description": "TCPDF is a PHP class for generating PDF documents.",

View File

@ -78,6 +78,11 @@ $pdf->Bookmark('Chapter 1', 0, 0, '', 'B', array(0,64,128));
// print a line using Cell() // print a line using Cell()
$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L'); $pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
// Create a fixed link to the first page using the * character
$index_link = $pdf->AddLink();
$pdf->SetLink($index_link, 0, '*1');
$pdf->Cell(0, 10, 'Link to INDEX', 0, 1, 'R', false, $index_link);
$pdf->AddPage(); $pdf->AddPage();
$pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(128,0,0)); $pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(128,0,0));
$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L'); $pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
@ -94,6 +99,11 @@ $pdf->AddPage();
$pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(128,0,0)); $pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(128,0,0));
$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L'); $pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
// fixed link to the first page using the * character
$html = '<a href="#*1" style="color:blue;">link to INDEX (page 1)</a>';
$pdf->writeHTML($html, true, false, true, false, '');
// add some pages and bookmarks // add some pages and bookmarks
for ($i = 2; $i < 12; $i++) { for ($i = 2; $i < 12; $i++) {
$pdf->AddPage(); $pdf->AddPage();
@ -123,7 +133,7 @@ $pdf->endTOCPage();
// --------------------------------------------------------- // ---------------------------------------------------------
//Close and output PDF document //Close and output PDF document
$pdf->Output('example_045.pdf', 'D'); $pdf->Output('example_045.pdf', 'I');
//============================================================+ //============================================================+
// END OF FILE // END OF FILE

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : datamatrix.php // File name : datamatrix.php
// Version : 1.0.006 // Version : 1.0.007
// Begin : 2010-06-07 // Begin : 2010-06-07
// Last Update : 2014-04-24 // Last Update : 2014-05-06
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -40,7 +40,7 @@
* *
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @author Nicola Asuni * @author Nicola Asuni
* @version 1.0.006 * @version 1.0.007
*/ */
// custom definitions // custom definitions
@ -277,6 +277,9 @@ class Datamatrix {
} }
} }
} }
echo implode(' ', $cw)."\n";// DEBUG
// add error correction codewords // add error correction codewords
$cw = $this->getErrorCorrection($cw, $params[13], $params[14], $params[15]); $cw = $this->getErrorCorrection($cw, $params[13], $params[14], $params[15]);
// initialize empty arrays // initialize empty arrays
@ -929,8 +932,6 @@ class Datamatrix {
if ($newenc != $enc) { if ($newenc != $enc) {
// 1. If the look-ahead test (starting at step J) indicates another mode, switch to that mode. // 1. If the look-ahead test (starting at step J) indicates another mode, switch to that mode.
$enc = $newenc; $enc = $newenc;
$cw[] = $this->getSwitchEncodingCodeword($enc);
++$cw_num;
break; // exit from B256 mode break; // exit from B256 mode
} else { } else {
// 2. Otherwise, process the next character in Base 256 encodation. // 2. Otherwise, process the next character in Base 256 encodation.

View File

@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version. * Current TCPDF version.
* @private static * @private static
*/ */
private static $tcpdf_version = '6.0.075'; private static $tcpdf_version = '6.0.076';
/** /**
* String alias for total number of pages. * String alias for total number of pages.

145
tcpdf.php
View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 6.0.075 // Version : 6.0.076
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2014-05-05 // Last Update : 2014-05-06
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -104,7 +104,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p> * Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @author Nicola Asuni * @author Nicola Asuni
* @version 6.0.075 * @version 6.0.076
*/ */
// TCPDF configuration // TCPDF configuration
@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.php');
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br> * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions. * @brief PHP class for generating PDF documents without requiring external extensions.
* @version 6.0.075 * @version 6.0.076
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -3148,22 +3148,22 @@ class TCPDF {
// adjust outlines // adjust outlines
$tmpoutlines = $this->outlines; $tmpoutlines = $this->outlines;
foreach ($tmpoutlines as $key => $outline) { foreach ($tmpoutlines as $key => $outline) {
if ($outline['p'] > $this->numpages) { if (!$outline['f'] AND ($outline['p'] > $this->numpages)) {
$this->outlines[$key]['p'] = ($outline['p'] + 1); $this->outlines[$key]['p'] = ($outline['p'] + 1);
} }
} }
// adjust dests // adjust dests
$tmpdests = $this->dests; $tmpdests = $this->dests;
foreach ($tmpdests as $key => $dest) { foreach ($tmpdests as $key => $dest) {
if ($dest['p'] > $this->numpages) { if (!$dest['f'] AND ($dest['p'] > $this->numpages)) {
$this->dests[$key]['p'] = ($dest['p'] + 1); $this->dests[$key]['p'] = ($dest['p'] + 1);
} }
} }
// adjust links // adjust links
$tmplinks = $this->links; $tmplinks = $this->links;
foreach ($tmplinks as $key => $link) { foreach ($tmplinks as $key => $link) {
if ($link[0] > $this->numpages) { if (!$link['f'] AND ($link['p'] > $this->numpages)) {
$this->links[$key][0] = ($link[0] + 1); $this->links[$key]['p'] = ($link['p'] + 1);
} }
} }
} }
@ -4696,9 +4696,9 @@ class TCPDF {
* @see Cell(), Write(), Image(), Link(), SetLink() * @see Cell(), Write(), Image(), Link(), SetLink()
*/ */
public function AddLink() { public function AddLink() {
//Create a new internal link // create a new internal link
$n = count($this->links) + 1; $n = count($this->links) + 1;
$this->links[$n] = array(0, 0); $this->links[$n] = array('p' => 0, 'y' => 0, 'f' => false);
return $n; return $n;
} }
@ -4706,19 +4706,25 @@ class TCPDF {
* Defines the page and position a link points to. * Defines the page and position a link points to.
* @param $link (int) The link identifier returned by AddLink() * @param $link (int) The link identifier returned by AddLink()
* @param $y (float) Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page) * @param $y (float) Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page)
* @param $page (int) Number of target page; -1 indicates the current page. This is the default value * @param $page (int) Number of target page; -1 indicates the current page (default value). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
* @public * @public
* @since 1.5 * @since 1.5
* @see AddLink() * @see AddLink()
*/ */
public function SetLink($link, $y=0, $page=-1) { public function SetLink($link, $y=0, $page=-1) {
$fixed = false;
if (!empty($page) AND ($page[0] == '*')) {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;
}
if ($page < 0) {
$page = $this->page;
}
if ($y == -1) { if ($y == -1) {
$y = $this->y; $y = $this->y;
} }
if ($page == -1) { $this->links[$link] = array('p' => $page, 'y' => $y, 'f' => $fixed);
$page = $this->page;
}
$this->links[$link] = array($page, $y);
} }
/** /**
@ -8398,8 +8404,8 @@ class TCPDF {
} elseif (isset($this->links[$pl['txt']])) { } elseif (isset($this->links[$pl['txt']])) {
// internal link ID // internal link ID
$l = $this->links[$pl['txt']]; $l = $this->links[$pl['txt']];
if (isset($this->page_obj_id[($l[0])])) { if (isset($this->page_obj_id[($l['p'])])) {
$annots .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l[0])], ($this->pagedim[$l[0]]['h'] - ($l[1] * $this->k))); $annots .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l['p'])], ($this->pagedim[$l['p']]['h'] - ($l['y'] * $this->k)));
} }
} }
$hmodes = array('N', 'I', 'O', 'P'); $hmodes = array('N', 'I', 'O', 'P');
@ -10405,14 +10411,11 @@ class TCPDF {
* @public * @public
*/ */
public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) { public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) {
if (isset($url[1]) AND ($url[0] == '#') AND is_numeric($url[1])) { if (isset($url[1]) AND ($url[0] == '#')) {
// convert url to internal link // convert url to internal link
$lnkdata = explode(',', $url); $lnkdata = explode(',', $url);
if (isset($lnkdata[0])) { if (isset($lnkdata[0]) ) {
$page = intval(substr($lnkdata[0], 1)); $page = substr($lnkdata[0], 1);
if (empty($page) OR ($page <= 0)) {
$page = $this->page;
}
if (isset($lnkdata[1]) AND (strlen($lnkdata[1]) > 0)) { if (isset($lnkdata[1]) AND (strlen($lnkdata[1]) > 0)) {
$lnky = floatval($lnkdata[1]); $lnky = floatval($lnkdata[1]);
} else { } else {
@ -12234,7 +12237,7 @@ class TCPDF {
* NOTE: destination names are unique, so only last entry will be saved. * NOTE: destination names are unique, so only last entry will be saved.
* @param $name (string) Destination name. * @param $name (string) Destination name.
* @param $y (float) Y position in user units of the destiantion on the selected page (default = -1 = current position; 0 = page start;). * @param $y (float) Y position in user units of the destiantion on the selected page (default = -1 = current position; 0 = page start;).
* @param $page (int) Target page number (leave empty for current page). * @param $page (int|string) Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
* @param $x (float) X position in user units of the destiantion on the selected page (default = -1 = current position;). * @param $x (float) X position in user units of the destiantion on the selected page (default = -1 = current position;).
* @return (string) Stripped named destination identifier or false in case of error. * @return (string) Stripped named destination identifier or false in case of error.
* @public * @public
@ -12261,13 +12264,19 @@ class TCPDF {
} elseif ($x > $this->w) { } elseif ($x > $this->w) {
$x = $this->w; $x = $this->w;
} }
$fixed = false;
if (!empty($page) AND ($page[0] == '*')) {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;
}
if (empty($page)) { if (empty($page)) {
$page = $this->PageNo(); $page = $this->PageNo();
if (empty($page)) { if (empty($page)) {
return; return;
} }
} }
$this->dests[$name] = array('x' => $x, 'y' => $y, 'p' => $page); $this->dests[$name] = array('x' => $x, 'y' => $y, 'p' => $page, 'f' => $fixed);
return $name; return $name;
} }
@ -12307,7 +12316,7 @@ class TCPDF {
* @param $txt (string) Bookmark description. * @param $txt (string) Bookmark description.
* @param $level (int) Bookmark level (minimum value is 0). * @param $level (int) Bookmark level (minimum value is 0).
* @param $y (float) Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;). * @param $y (float) Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;).
* @param $page (int) Target page number (leave empty for current page). * @param $page (int|string) Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
* @param $style (string) Font style: B = Bold, I = Italic, BI = Bold + Italic. * @param $style (string) Font style: B = Bold, I = Italic, BI = Bold + Italic.
* @param $color (array) RGB color array (values from 0 to 255). * @param $color (array) RGB color array (values from 0 to 255).
* @param $x (float) X position in user units of the bookmark on the selected page (default = -1 = current position;). * @param $x (float) X position in user units of the bookmark on the selected page (default = -1 = current position;).
@ -12323,7 +12332,7 @@ class TCPDF {
* @param $txt (string) Bookmark description. * @param $txt (string) Bookmark description.
* @param $level (int) Bookmark level (minimum value is 0). * @param $level (int) Bookmark level (minimum value is 0).
* @param $y (float) Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;). * @param $y (float) Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;).
* @param $page (int) Target page number (leave empty for current page). * @param $page (int|string) Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages.
* @param $style (string) Font style: B = Bold, I = Italic, BI = Bold + Italic. * @param $style (string) Font style: B = Bold, I = Italic, BI = Bold + Italic.
* @param $color (array) RGB color array (values from 0 to 255). * @param $color (array) RGB color array (values from 0 to 255).
* @param $x (float) X position in user units of the bookmark on the selected page (default = -1 = current position;). * @param $x (float) X position in user units of the bookmark on the selected page (default = -1 = current position;).
@ -12358,13 +12367,19 @@ class TCPDF {
} elseif ($x > $this->w) { } elseif ($x > $this->w) {
$x = $this->w; $x = $this->w;
} }
$fixed = false;
if (!empty($page) AND ($page[0] == '*')) {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;
}
if (empty($page)) { if (empty($page)) {
$page = $this->PageNo(); $page = $this->PageNo();
if (empty($page)) { if (empty($page)) {
return; return;
} }
} }
$this->outlines[] = array('t' => $txt, 'l' => $level, 'x' => $x, 'y' => $y, 'p' => $page, 's' => strtoupper($style), 'c' => $color, 'u' => $link); $this->outlines[] = array('t' => $txt, 'l' => $level, 'x' => $x, 'y' => $y, 'p' => $page, 'f' => $fixed, 's' => strtoupper($style), 'c' => $color, 'u' => $link);
} }
/** /**
@ -12468,8 +12483,8 @@ class TCPDF {
} elseif (isset($this->links[$o['u']])) { } elseif (isset($this->links[$o['u']])) {
// internal link ID // internal link ID
$l = $this->links[$o['u']]; $l = $this->links[$o['u']];
if (isset($this->page_obj_id[($l[0])])) { if (isset($this->page_obj_id[($l['p'])])) {
$out .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l[0])], ($this->pagedim[$l[0]]['h'] - ($l[1] * $this->k))); $out .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l['p'])], ($this->pagedim[$l['p']]['h'] - ($l['y'] * $this->k)));
} }
} }
} elseif (isset($this->page_obj_id[($o['p'])])) { } elseif (isset($this->page_obj_id[($o['p'])])) {
@ -17364,7 +17379,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$startliney = $this->y; $startliney = $this->y;
$this->newline = false; $this->newline = false;
} }
$this->y += ($this->getCellHeight($curfontsize / $this->k) - ($curfontdescent * $this->cell_height_ratio) - $imgh); // DEBUG $this->y += ($this->getCellHeight($curfontsize / $this->k) - ($curfontdescent * $this->cell_height_ratio) - $imgh);
$minstartliney = min($this->y, $minstartliney); $minstartliney = min($this->y, $minstartliney);
$maxbottomliney = ($startliney + $this->getCellHeight($curfontsize / $this->k)); $maxbottomliney = ($startliney + $this->getCellHeight($curfontsize / $this->k));
} }
@ -20950,28 +20965,34 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// adjust outlines // adjust outlines
$tmpoutlines = $this->outlines; $tmpoutlines = $this->outlines;
foreach ($tmpoutlines as $key => $outline) { foreach ($tmpoutlines as $key => $outline) {
if (($outline['p'] >= $topage) AND ($outline['p'] < $frompage)) { if (!$outline['f']) {
$this->outlines[$key]['p'] = ($outline['p'] + 1); if (($outline['p'] >= $topage) AND ($outline['p'] < $frompage)) {
} elseif ($outline['p'] == $frompage) { $this->outlines[$key]['p'] = ($outline['p'] + 1);
$this->outlines[$key]['p'] = $topage; } elseif ($outline['p'] == $frompage) {
$this->outlines[$key]['p'] = $topage;
}
} }
} }
// adjust dests // adjust dests
$tmpdests = $this->dests; $tmpdests = $this->dests;
foreach ($tmpdests as $key => $dest) { foreach ($tmpdests as $key => $dest) {
if (($dest['p'] >= $topage) AND ($dest['p'] < $frompage)) { if (!$dest['f']) {
$this->dests[$key]['p'] = ($dest['p'] + 1); if (($dest['p'] >= $topage) AND ($dest['p'] < $frompage)) {
} elseif ($dest['p'] == $frompage) { $this->dests[$key]['p'] = ($dest['p'] + 1);
$this->dests[$key]['p'] = $topage; } elseif ($dest['p'] == $frompage) {
$this->dests[$key]['p'] = $topage;
}
} }
} }
// adjust links // adjust links
$tmplinks = $this->links; $tmplinks = $this->links;
foreach ($tmplinks as $key => $link) { foreach ($tmplinks as $key => $link) {
if (($link[0] >= $topage) AND ($link[0] < $frompage)) { if (!$link['f']) {
$this->links[$key][0] = ($link[0] + 1); if (($link['p'] >= $topage) AND ($link['p'] < $frompage)) {
} elseif ($link[0] == $frompage) { $this->links[$key]['p'] = ($link['p'] + 1);
$this->links[$key][0] = $topage; } elseif ($link['p'] == $frompage) {
$this->links[$key]['p'] = $topage;
}
} }
} }
// adjust javascript // adjust javascript
@ -21133,28 +21154,34 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// adjust outlines // adjust outlines
$tmpoutlines = $this->outlines; $tmpoutlines = $this->outlines;
foreach ($tmpoutlines as $key => $outline) { foreach ($tmpoutlines as $key => $outline) {
if ($outline['p'] > $page) { if (!$outline['f']) {
$this->outlines[$key]['p'] = $outline['p'] - 1; if ($outline['p'] > $page) {
} elseif ($outline['p'] == $page) { $this->outlines[$key]['p'] = $outline['p'] - 1;
unset($this->outlines[$key]); } elseif ($outline['p'] == $page) {
unset($this->outlines[$key]);
}
} }
} }
// adjust dests // adjust dests
$tmpdests = $this->dests; $tmpdests = $this->dests;
foreach ($tmpdests as $key => $dest) { foreach ($tmpdests as $key => $dest) {
if ($dest['p'] > $page) { if (!$dest['f']) {
$this->dests[$key]['p'] = $dest['p'] - 1; if ($dest['p'] > $page) {
} elseif ($dest['p'] == $page) { $this->dests[$key]['p'] = $dest['p'] - 1;
unset($this->dests[$key]); } elseif ($dest['p'] == $page) {
unset($this->dests[$key]);
}
} }
} }
// adjust links // adjust links
$tmplinks = $this->links; $tmplinks = $this->links;
foreach ($tmplinks as $key => $link) { foreach ($tmplinks as $key => $link) {
if ($link[0] > $page) { if (!$link['f']) {
$this->links[$key][0] = $link[0] - 1; if ($link['p'] > $page) {
} elseif ($link[0] == $page) { $this->links[$key]['p'] = $link['p'] - 1;
unset($this->links[$key]); } elseif ($link['p'] == $page) {
unset($this->links[$key]);
}
} }
} }
// adjust javascript // adjust javascript
@ -21234,14 +21261,14 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$tmpoutlines = $this->outlines; $tmpoutlines = $this->outlines;
foreach ($tmpoutlines as $key => $outline) { foreach ($tmpoutlines as $key => $outline) {
if ($outline['p'] == $page) { if ($outline['p'] == $page) {
$this->outlines[] = array('t' => $outline['t'], 'l' => $outline['l'], 'x' => $outline['x'], 'y' => $outline['y'], 'p' => $this->page, 's' => $outline['s'], 'c' => $outline['c']); $this->outlines[] = array('t' => $outline['t'], 'l' => $outline['l'], 'x' => $outline['x'], 'y' => $outline['y'], 'p' => $this->page, 'f' => $outline['f'], 's' => $outline['s'], 'c' => $outline['c']);
} }
} }
// copy links // copy links
$tmplinks = $this->links; $tmplinks = $this->links;
foreach ($tmplinks as $key => $link) { foreach ($tmplinks as $key => $link) {
if ($link[0] == $page) { if ($link['p'] == $page) {
$this->links[] = array($this->page, $link[1]); $this->links[] = array('p' => $this->page, 'y' => $link['y'], 'f' => $link['f']);
} }
} }
// return to last page // return to last page
@ -24185,7 +24212,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$attribs['style'] = str_replace(';;',';',';'.$use['attribs']['style'].$attribs['style']); $attribs['style'] = str_replace(';;',';',';'.$use['attribs']['style'].$attribs['style']);
} }
$attribs = array_merge($use['attribs'], $attribs); $attribs = array_merge($use['attribs'], $attribs);
$this->startSVGElementHandler('use-tag', $use['name'], $attribs); $this->startSVGElementHandler($parser, $use['name'], $attribs);
return; return;
} }
} }