mikehaertl/php-pdftk

Open PDF from raw ?

alexis-riot opened this issue · 3 comments

Hello,

Is there is a way with this library to directly open a PDF from a RAW. I'm generating PDF and don't want to store this file during the process, is it not possible to directly open from the raw ? Like something:

$this->merge->addRaw($this->entity->pdf()->output());

What do you mean by RAW? What type/class is your $this->entity->pdf()?

Just want to pass the content of the PDF as parameter instead of the filepath.

$merger->addDocument(
   SetaPDF_Core_Document::loadByFilename('files/pdfs/camtown/Order-Form.pdf')
);

Like an other example below.

That's not supported. The pdftk command requires a file anyway so if you have the content as a string you should write it to a file.