Quote:
When I flatten a document, the fields that contain a "." are not flattened while other fields do.
The current implementation only sets fields on the outermost hierarchy-level to read-only, child-fields are not handled.
Beside that, i do not see what setting fields to read-only has to do with flattening, even when it's done correctly.
This process can be easily reverted by simply removing the read-only flag from the fields.
I have not found an official description about what "flattening" actually means, but this sentence comes close to what i consider as "flattening":
Quote:
Forms flattening is the process of removing this separate form data and adding it as text, images and shapes into the actual PDF data stream.
The PDF will still look the same but the user can no longer interact with the forms.
Source:
https://blog.idrsolutions.com/2011/01/w ... lattening/I am in the process of evaluating the current 1.5 release for our production environment.
We are currently using a custom 1.32 version, where we have made some enhancements especially for Acro-Forms.
I forked PdfSharp on GitHub and shifted over some changes we made for 1.32; that includes "real" Form-Flattening (meaning there are no fields anymore after flattening).
Especially Font-handling for AcroFields may need a big overhaul as i think, the current state handles only the most basic font-related issues.
(e.g. Fields rendered with embedded fonts using some special encoding are not handled correctly at all...)
The current status of this fork is "experimental", as i have not (yet) done extensive testing with it.
But please take a look, and report whether it works for you:
https://github.com/packdat/PDFsharp/tree/AcroForms