Skip to content

Commit a8c0ba7

Browse files
Updated demos for new class names
1 parent e63b25b commit a8c0ba7

File tree

38 files changed

+77
-77
lines changed

38 files changed

+77
-77
lines changed

classes/Annotation/Widget/PushbuttonAnnotation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use setasign\SetaPDF2\Core\Parser\Content;
1818
use setasign\SetaPDF2\Core\Resource\ResourceInterface;
1919
use setasign\SetaPDF2\Core\Text\Text;
20-
use setasign\SetaPDF2\Core\Text\Block;
20+
use setasign\SetaPDF2\Core\Text\TextBlock;
2121
use setasign\SetaPDF2\Core\Type\AbstractType;
2222
use setasign\SetaPDF2\Core\Type\Dictionary\DictionaryHelper;
2323
use setasign\SetaPDF2\Core\Type\IndirectObjectInterface;
@@ -373,7 +373,7 @@ protected function _createAppearance()
373373
$daValues = $this->_getDaValues();
374374

375375
$font = $this->getFont();
376-
$textBlock = new Block($font, null);
376+
$textBlock = new TextBlock($font, null);
377377

378378
$borderDoubled = (
379379
$_borderStyle === BorderStyle::BEVELED ||

classes/Annotation/Widget/TextFieldAnnotation.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use setasign\SetaPDF2\Core\Parser\Content;
1818
use setasign\SetaPDF2\Core\Resource\ResourceInterface;
1919
use setasign\SetaPDF2\Core\Text\Text;
20-
use setasign\SetaPDF2\Core\Text\Block;
20+
use setasign\SetaPDF2\Core\Text\TextBlock;
2121
use setasign\SetaPDF2\Core\Type\AbstractType;
2222
use setasign\SetaPDF2\Core\Type\Dictionary\DictionaryHelper;
2323
use setasign\SetaPDF2\Core\Type\IndirectObjectInterface;
@@ -29,7 +29,7 @@
2929
use setasign\SetaPDF2\Core\Type\PdfString;
3030
use setasign\SetaPDF2\Core\Writer\Writer;
3131
use setasign\SetaPDF2\Core\XObject\Form;
32-
use setasign\SetaPDF2\Exception\NotImplemented;
32+
use setasign\SetaPDF2\NotImplementedException;
3333

3434
/**
3535
* Example class representing a text field.
@@ -164,7 +164,7 @@ public function setAppearanceFont(FontInterface $appearanceFont)
164164
* @throws \setasign\SetaPDF2\Core\SecHandler\Exception
165165
* @throws \setasign\SetaPDF2\Core\Type\Exception
166166
* @throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
167-
* @throws NotImplemented
167+
* @throws NotImplementedException
168168
*/
169169
public function getFont()
170170
{
@@ -323,7 +323,7 @@ protected function _getDaValues()
323323
* @throws \setasign\SetaPDF2\Core\SecHandler\Exception
324324
* @throws \setasign\SetaPDF2\Core\Type\Exception
325325
* @throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
326-
* @throws NotImplemented
326+
* @throws NotImplementedException
327327
*/
328328
protected function _createAppearance()
329329
{
@@ -496,7 +496,7 @@ protected function _createAppearance()
496496
$daValues = $this->_getDaValues();
497497

498498
$font = $this->_appearanceFont ?: $this->getFont();
499-
$textBlock = new Block($font, null);
499+
$textBlock = new TextBlock($font, null);
500500
$textBlock->setAlign($this->getAlign());
501501

502502
$borderDoubled = (
@@ -589,7 +589,7 @@ protected function _createAppearance()
589589
* @throws \setasign\SetaPDF2\Core\SecHandler\Exception
590590
* @throws \setasign\SetaPDF2\Core\Type\Exception
591591
* @throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
592-
* @throws NotImplemented
592+
* @throws NotImplementedException
593593
*/
594594
public function getIndirectObject(?Document $document = null)
595595
{

classes/ContentStreamProcessor/ColorProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use setasign\SetaPDF2\Core\XObject\Form;
2424
use setasign\SetaPDF2\Core\XObject\Image;
2525
use setasign\SetaPDF2\Exception;
26-
use setasign\SetaPDF2\Exception\NotImplemented;
26+
use setasign\SetaPDF2\NotImplementedException;
2727

2828
/**
2929
* Class ColorsProcessor
@@ -149,7 +149,7 @@ protected function _resolveColorSpace(ColorSpace $colorSpace, string $info)
149149
*
150150
* @param array $args
151151
* @throws Exception
152-
* @throws NotImplemented
152+
* @throws NotImplementedException
153153
*/
154154
public function _paintXObject(array $args)
155155
{

classes/ContentStreamProcessor/ImageProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use setasign\SetaPDF2\Core\Type\PdfIndirectReference;
1212
use setasign\SetaPDF2\Core\XObject\XObject;
1313
use setasign\SetaPDF2\Core\XObject\Form;
14-
use setasign\SetaPDF2\Exception\NotImplemented;
14+
use setasign\SetaPDF2\NotImplementedException;
1515

1616
/**
1717
* Class ImageProcessor
@@ -198,7 +198,7 @@ public function _onCurrentTransformationMatrix(array $arguments)
198198
* Callback for the content parser which is called if a "Do" operator/token is found.
199199
*
200200
* @param array $arguments
201-
* @throws NotImplemented
201+
* @throws NotImplementedException
202202
*/
203203
public function _onFormXObject(array $arguments)
204204
{

classes/Inspector/FontInspector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use setasign\SetaPDF2\Core\Type\PdfStream;
1111
use setasign\SetaPDF2\Core\XObject\XObject;
1212
use setasign\SetaPDF2\Core\XObject\Form;
13-
use setasign\SetaPDF2\Exception\NotImplemented;
13+
use setasign\SetaPDF2\NotImplementedException;
1414

1515
/**
1616
* Class FontInspector
@@ -152,7 +152,7 @@ protected function _resolveFonts($object)
152152
*
153153
* @param Font $font
154154
* @return bool
155-
* @throws NotImplemented
155+
* @throws NotImplementedException
156156
*/
157157
public function isFontEmbedded(Font $font)
158158
{
@@ -192,7 +192,7 @@ public function isFontEmbedded(Font $font)
192192

193193
return false;
194194
case 'Type3':
195-
throw new NotImplemented('Type3 fonts are not supported.');
195+
throw new NotImplementedException('Type3 fonts are not supported.');
196196
}
197197
}
198198
}

classes/Inspector/TransparencyInspector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use setasign\SetaPDF2\Core\XObject\XObject;
99
use setasign\SetaPDF2\Core\XObject\Form;
1010
use setasign\SetaPDF2\Core\XObject\Image;
11-
use setasign\SetaPDF2\Exception\NotImplemented;
11+
use setasign\SetaPDF2\NotImplementedException;
1212

1313
/**
1414
* Class TransparencyInspector
@@ -119,7 +119,7 @@ protected function _processGraphicStates(PdfDictionary $graphicStates)
119119
* Check XObjects for transparency.
120120
*
121121
* @param PdfDictionary $xObjects
122-
* @throws NotImplemented
122+
* @throws NotImplementedException
123123
*/
124124
protected function _processXObjects(PdfDictionary $xObjects)
125125
{

public/demos/1-Core/annotations/1-add-link/script.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use setasign\SetaPDF2\Core\Document\Page\Annotation\LinkAnnotation;
66
use setasign\SetaPDF2\Core\Font\Standard\Helvetica;
77
use setasign\SetaPDF2\Core\PageFormats;
8-
use setasign\SetaPDF2\Core\Text\Block;
8+
use setasign\SetaPDF2\Core\Text\TextBlock;
99
use setasign\SetaPDF2\Core\Writer\HttpWriter;
1010

1111
// load and register the autoload function
@@ -25,7 +25,7 @@
2525
$font = Helvetica::create($document);
2626

2727
// use the text block helper to draw the text
28-
$text = new Block($font, 12);
28+
$text = new TextBlock($font, 12);
2929
$text->setText('This is a link to www.setasign.com!');
3030
$x = $page->getWidth() / 2 - $text->getWidth() / 2;
3131
$y = $page->getHeight() - 100;

public/demos/1-Core/annotations/10-add-freetext-to-signed-pdf/script.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use setasign\SetaPDF2\Core\Font\Standard\Helvetica;
77
use setasign\SetaPDF2\Core\Geometry\Vector;
88
use setasign\SetaPDF2\Core\Text\Text;
9-
use setasign\SetaPDF2\Core\Text\Block;
9+
use setasign\SetaPDF2\Core\Text\TextBlock;
1010
use setasign\SetaPDF2\Core\Type\PdfString;
1111
use setasign\SetaPDF2\Core\Writer\HttpWriter;
1212
use setasign\SetaPDF2\Core\XObject\Form;
@@ -39,7 +39,7 @@
3939
$fontSize = 12;
4040

4141
// now we create a text block first to know the final size:
42-
$box = new Block($font, $fontSize);
42+
$box = new TextBlock($font, $fontSize);
4343
$box->setTextColor($textColor);
4444
$box->setBorderWidth($borderWidth);
4545
$box->setBorderColor($borderColor);

public/demos/1-Core/annotations/2-add-push-buttons/demo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"name": "Add Push-Buttons",
33
"teaserText": "This demo adds two push-buttons to an existing PDF document.",
44
"faIcon": "",
5-
"previewFiles": ["../../../../../classes/Annotation/Widget/Pushbutton.php"]
5+
"previewFiles": ["../../../../../classes/Annotation/Widget/PushbuttonAnnotation.php"]
66
}

public/demos/1-Core/annotations/2-add-push-buttons/script.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use setasign\SetaPDF2\Core\Document\Page\Annotation\BorderStyle;
88
use setasign\SetaPDF2\Core\Font\Standard\Courier;
99
use setasign\SetaPDF2\Core\Font\Standard\Helvetica;
10-
use setasign\SetaPDF2\Core\Text\Block;
10+
use setasign\SetaPDF2\Core\Text\TextBlock;
1111
use setasign\SetaPDF2\Core\Writer\HttpWriter;
1212

1313
// load and register the autoload function
@@ -18,7 +18,7 @@
1818
$writer = new HttpWriter();
1919
$document = new Document($writer);
2020
$canvas = $document->getCatalog()->getPages()->create('a4')->getCanvas();
21-
$text = new Block(Courier::create($document), 12);
21+
$text = new TextBlock(Courier::create($document), 12);
2222
$text->setText(print_r($_POST, true));
2323
$text->draw($canvas, 0, $canvas->getHeight() - $text->getHeight());
2424
$document->save()->finish();
@@ -32,7 +32,7 @@
3232
}
3333

3434
// require the pushbutton class
35-
require_once('../../../../../classes/Annotation/Widget/Pushbutton.php');
35+
require_once('../../../../../classes/Annotation/Widget/PushbuttonAnnotation.php');
3636

3737
//$pdfFile = $assetsDirectory . '/pdfs/tektown/Order-Form.pdf';
3838
$pdfFile = $assetsDirectory . '/pdfs/tektown/Subscription-tekMag.pdf';

0 commit comments

Comments
 (0)