From 3e905de378a2b5398fe6934713197b92add3d983 Mon Sep 17 00:00:00 2001 From: Gabo Date: Mon, 7 Oct 2024 18:02:49 +0200 Subject: [PATCH] Add nodrm to poopler --- src/pdf_features/PdfFeatures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pdf_features/PdfFeatures.py b/src/pdf_features/PdfFeatures.py index 2625304..d44388c 100644 --- a/src/pdf_features/PdfFeatures.py +++ b/src/pdf_features/PdfFeatures.py @@ -114,10 +114,10 @@ def from_pdf_path(pdf_path, xml_path: str | Path = None): if PdfFeatures.is_pdf_encrypted(pdf_path): subprocess.run(["qpdf", "--decrypt", "--replace-input", pdf_path]) - subprocess.run(["pdftohtml", "-i", "-xml", "-zoom", "1.0", pdf_path, xml_path]) + subprocess.run(["pdftohtml", "-nodrm", "-i", "-xml", "-zoom", "1.0", pdf_path, xml_path]) if not PdfFeatures.contains_text(xml_path): - subprocess.run(["pdftohtml", "-i", "-hidden", "-xml", "-zoom", "1.0", pdf_path, xml_path]) + subprocess.run(["pdftohtml", "-nodrm", "-i", "-hidden", "-xml", "-zoom", "1.0", pdf_path, xml_path]) pdf_features = PdfFeatures.from_poppler_etree(xml_path, file_name=Path(pdf_path).name)