Skip to content

Commit

Permalink
Add nodrm to poopler
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Oct 7, 2024
1 parent 67365bb commit 3e905de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pdf_features/PdfFeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3e905de

Please sign in to comment.