Budget: 5000 UAH Deadline: 30 days
To solve the problem of detecting counterfeits in text PDF files, it is not enough to simply compare text. A tool is needed that analyzes the internal structure of PDF objects, as any intervention through an editor leaves "digital traces" that are invisible to the eye but obvious to the code.
Technical implementation strategy (Python):
Metadata and signature analysis (Metadata & Producer check): Each institution uses specific software to generate statements (for example, IText, Quartz, ReportLab). If tags from Adobe Acrobat, NitroPDF, or Preview appear in the file, or if ModDate significantly differs from CreationDate — this is an immediate signal of intervention.
Object structure verification (Incremental Updates): PDF editors often save changes by adding new objects to the end of the file (incremental updates). The tool will check for the presence of multiple XREF tables and %%EOF markers. This allows for the detection of even those changes where the text has been altered to one of identical length.
Font and encoding control (Font & Encoding Consistency): Original systems usually use font subsets. When manually editing, the editor often substitutes a system font or changes character encoding. We will compare the hash sums of embedded fonts with "reference" ones for this institution.
Coordinate analysis (Layout X/Y Verification): Statement generation systems align text with an accuracy of thousandths of a pixel. Manual editing almost always leads to micro-shifts along the X or Y axes, which the tool will capture through the pdfminer.six library.
Economics and scalability:
Cost: Verification in Python (libraries PyMuPDF, pdfminer) is performed locally without involving third-party APIs or AI, so the cost of one verification is essentially equal to the cost of a few seconds of your server's work.
Versatility: The system is built on a modular principle. A separate "profile-mask" with reference characteristics of the structure is created for each new institution.
Clarifying question:
Do you have access to 10-20 guaranteed original statements from this institution to create an initial "digital snapshot" (reference) of the structure?