mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
feat(pdf): Support for password-protected PDF documents (#2499)
* add test and example for PDF with password Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * use docling-parse with new password feature Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add pdfbackendoptions Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * generalize backend_options and add PdfBackendOptions Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add pdf-password option Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * update exception test Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * fix docs description Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> --------- Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
@@ -130,7 +130,7 @@ def test_in_doc_with_backend_options():
|
||||
assert not doc.backend_options.enable_local_fetch
|
||||
assert not doc.backend_options.enable_remote_fetch
|
||||
|
||||
with pytest.raises(ValueError, match="Incompatible types"):
|
||||
with pytest.raises(AttributeError, match="no attribute 'source_uri'"):
|
||||
doc = InputDocument(
|
||||
path_or_stream=test_doc_path,
|
||||
format=InputFormat.HTML,
|
||||
|
||||
Reference in New Issue
Block a user