$ account flytkgl
PDFQFZ is a Chinese-language Windows Forms desktop application that overlays seal/stamp images onto existing PDFs, including cross-page seam stamps (骑缝章) split across page edges. It supports file/folder batch processing, configurable stamp size/opacity/rotation/placement, white-background transparency removal, PDF password encryption, and optional digital signatures using self-generated or imported PFX certificates. A "merge" mode rasterizes PDF pages at 300 DPI and reconstructs them to flatten content. The app accepts PDF files as command-line arguments and supports drag-and-drop input. The architecture is a single large Form1.cs WinForms monolith for UI and orchestration, with a small Library/ folder of extracted helper classes: a generic PageCache<T> for lazy page preview loading, pure stamp policy predicates, layout calculators, numeric input sanitizers, an async request gate for stale preview cancellation, and an image transparency helper. A separate xUnit test project targets net9.0-windows and compiles linked Library sources to test these helpers, but the main project targets .NET Framework 4.7.2 and is not included in the solution file. The data flow is straightforward: users select source PDFs and a stamp image; pdfGz() iterates files, opens each PDF with iTextSharp PdfReader/PdfStamper, splits the stamp into segments via subImages(), and places them according to seam-stamp mode and position settings. The preview path renders pages lazily through PDFRender4NET at low DPI and uses PageCache plus PreviewOverlayRequestGate to avoid UI hangs on large PDFs. Maintenance is recent and tests exist, but the main application still depends on abandoned/legacy libraries, references an external DLL via an out-of-repo Downloads path, includes committed probe artifacts, and contains a fair amount of monolith-style code debt.