URL к PDF Python - PullRequest
       38

URL к PDF Python

0 голосов
/ 27 октября 2019

У меня есть следующий код, который пытается сгенерировать PDF из URL, поэтому не работает с этим URL:

http://windte1910.acepta.com/v01/0EF57BFD40060E245941AE43E3F7DAB700A06338

import pdfkit

path_wkthmltopdf = r'C:\Program Files\wkhtmltopdf\bin\\wkhtmltopdf.exe'
config = pdfkit.configuration(wkhtmltopdf = path_wkthmltopdf)

pdfkit.from_url("http://windte1910.acepta.com/v01/0EF57BFD40060E245941AE43E3F7DAB700A06338", "out2.pdf", configuration=config)

Вывод:

Loading pages (1/6)
Warning: A finished ResourceObject received a loading progress signal. This might be an indication of an iframe taking too long to load.
Warning: A finished ResourceObject received a loading finished signal. This might be an indication of an iframe taking too long to load.
Counting pages (2/6)
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Done                                                                      
True

Есть ли другой способ сделать это?

Этот код просто генерирует пустой PDF-файл. Я пытался с URL на PNG / Image, но не работает с этим URL.

...