In PDF Javascript gespeicherte Feldoptionen verwenden
Die Kosten-pro-Tag-Berechnung und die Drop-Down-Optionen im Anwesenheitsfeld werden per Javsacript gemacht. JS funktioniert aber in pyumpdf nicht, darum werden die korrekten Optionen aus dem JS ausgelesen und dieses 1:1 in den Feldern gesetzt. Mittels Schalter in der config können auch wieder die Rohwerte aus dem Excel gesetzt werden. (PDF muss dann von Hand geöffnet und gespeichert werden damit die entgültigen passenden Werte enthalten sind).
This commit is contained in:
1 parent
c51eddcb73
commit
2433478680
4 files changed
+77
-5
No files matched your search
@@ -15,12 +15,12 @@ A fixture is discovered automatically when:
|
||||
|
||||
Rendering
|
||||
---------
|
||||
Both reference and generated PDFs are rendered to images using pymupdf
|
||||
(no browser required). The images are then compared pixel-by-pixel.
|
||||
Both reference and generated PDFs are rendered to images using pymupdf.
|
||||
The images are then compared pixel-by-pixel.
|
||||
|
||||
Similarity threshold
|
||||
--------------------
|
||||
SIMILARITY_THRESHOLD (default 95 %) — fraction of pixels whose R, G, B channels
|
||||
SIMILARITY_THRESHOLD (100%) — fraction of pixels whose R, G, B channels
|
||||
each differ by at most PIXEL_TOLERANCE (default 5) between reference and generated PDF.
|
||||
|
||||
Diff images
|
||||
@@ -47,7 +47,7 @@ from PIL import Image
|
||||
# Constants
|
||||
# ---------------------------------------------------------------------------
|
||||
FIXTURES_DIR = Path(__file__).parent / "fixtures"
|
||||
SIMILARITY_THRESHOLD = 0.95 # minimum fraction of matching pixels per page
|
||||
SIMILARITY_THRESHOLD = 1.00 # minimum fraction of matching pixels per page
|
||||
PIXEL_TOLERANCE = 5 # max per-channel delta still counted as "same"
|
||||
RENDER_DPI = 150 # rendering resolution for PDF → image
|
||||
|
||||
|
||||
Reference in new issue
Block a user