pdfjinja icon indicating copy to clipboard operation
pdfjinja copied to clipboard

PDFJinja object creation using file stream/object.

Open lvimalchandran opened this issue 3 years ago • 1 comments

Hi, Is there a way to initialize PDFJinja object using file stream/object instead of filepath and name. I have a scenario where the PDF file is located in an URL which in need to load and file form attributes.

Thanks.

lvimalchandran avatar Aug 31 '21 21:08 lvimalchandran

I am getting the below error, when I tried to use example.py code from the pdfjinja project.

Traceback (most recent call last): File "P:\Professional\Python\CR\workspace\workspace-local\myplaybook\pdf_pdfjinja.py", line 10, in rendered_pdf = template_pdf({ File "P:\Professional\Python\Softwares\python-3.9.6\lib\site-packages\pdfjinja.py", line 240, in call filled = PdfFileReader(self.exec_pdftk(self.rendered)) File "P:\Professional\Python\Softwares\python-3.9.6\lib\site-packages\pdfjinja.py", line 212, in exec_pdftk p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) File "P:\Professional\Python\Softwares\python-3.9.6\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "P:\Professional\Python\Softwares\python-3.9.6\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

lvimalchandran avatar Sep 02 '21 01:09 lvimalchandran