Forum


Replies: 1   Views: 3233
Handling exception.
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 09-05-2018 - 06:28

Hello,

Please read the information available on:

https://www.phpdocx.com/documentation/cookbook/repair-PDF

You need to use not protected documents or unprotect them.

If you need to handle the Exception, you just need to catch it:

try {
  $merge->mergePdf(array('document1.pdf', 'document2.pdf'), 'output.pdf');
} catch (Exception $e) {
  // handle the exception
}

Regards.