Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/PdfLibAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ public function openPdiPage($document, $page, $options = [])
*/
public function closePdiPage($page)
{
$this->lib->close_pdi_page($this->getHandleFrom($page));
try {
$this->lib->close_pdi_page($this->getHandleFrom($page));
} catch (\PDFlibException $e) {
//TODO unknown cause for this
}
}

/**
Expand Down Expand Up @@ -370,7 +374,7 @@ public function infoPvf($path, $key)
*/
public function fillTextBlock($page, $name, $contents, $options = [])
{
$this->lib->fill_textblock($this->getHandleFrom($page), $name, $contents, $this->createOptionList($options));
return $this->lib->fill_textblock($this->getHandleFrom($page), $name, $contents, $this->createOptionList($options));
}

/**
Expand Down
17 changes: 17 additions & 0 deletions src/Pps/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,21 @@ public function getAdapter()
{
return $this->adapter;
}

/**
* Return all properties
*
* @return array
*/
public function getProperties()
{
$propertiesArray = $this->properties;

if (isset($propertiesArray['custom'])) {
$propertiesArray['custom'] = $propertiesArray['custom']->toArray();
}

return $propertiesArray;
}

}
2 changes: 1 addition & 1 deletion src/Pps/TextBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class TextBlock extends Block
*/
public function fill($contents, array $options = ['embedding'])
{
$this->adapter->fillTextBlock($this->page, $this->name, $contents, $options);
return $this->adapter->fillTextBlock($this->page, $this->name, $contents, $options);
}
}