mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-22 03:44:54 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce8b68900d |
@@ -423,6 +423,11 @@ class TikaDocumentParser:
|
||||
logger.info("Converting %s to PDF as %s", document_path, pdf_path)
|
||||
|
||||
with self._gotenberg_client.libre_office.to_pdf() as route:
|
||||
# Preserve document fields as authored. updateIndexes (Gotenberg's
|
||||
# default) triggers a refresh() that rewrites dynamic fields like
|
||||
# auto-dates to the current date.
|
||||
route.update_indexes(update_indexes=False)
|
||||
|
||||
# Set the output format of the resulting PDF.
|
||||
# OutputTypeConfig reads the database-stored ApplicationConfiguration
|
||||
# first, then falls back to the PAPERLESS_OCR_OUTPUT_TYPE env var.
|
||||
|
||||
@@ -223,4 +223,11 @@ class TestTikaParser:
|
||||
|
||||
assert form_field_found
|
||||
|
||||
# Field updates must be disabled so LibreOffice preserves document
|
||||
# fields (e.g. auto-date fields) as authored rather than refreshing
|
||||
# them to the current date.
|
||||
assert any(
|
||||
b'name="updateIndexes"' in part and b"false" in part for part in parts
|
||||
)
|
||||
|
||||
httpx_mock.reset()
|
||||
|
||||
Reference in New Issue
Block a user