You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Form flattening has a specific meaning in PDFs where the form fields will be removed as a result of the process. In many circumstances, flattening is just used to disable editing but it has other side effects such as changing the document structure and reducing file size that specific use cases are dependent on. Form flattening is non-trivial to implement, and while this workaround accomplishes the desired effect in some use cases it introduces confusing bugs when the user is performing actions dependent on the form being truly "flattened". In my opinion this function is useful but should be given a different name such as MakeReadOnly, ReadOnly, DisableEditing, etc. that doesn't conflict with the common meaning of flatten.
Expected Behavior
The form fields will be removed and replaced with their contents as regular markup objects
Actual Behavior
The form fields are set to read only mode.
This is a great project that has been extremely useful for me, and I'm definitely nitpicking here but I think it's worth considering so that other consumers of the library don't end up down the same confusing debugging road I did. Thanks for the great work!
The text was updated successfully, but these errors were encountered:
and its flatten method is flattening my text fields properly (except there's a slight alignment issue).
Hope this info will help future implementation of the flatten method.
Reporting an Issue Here
https://github.com/empira/PDFsharp/blob/5aa7afeb13270aaca36ad21edcf3cc62d6c5446c/src/PdfSharp/Pdf/PdfDocument.cs#L854-L863
Form flattening has a specific meaning in PDFs where the form fields will be removed as a result of the process. In many circumstances, flattening is just used to disable editing but it has other side effects such as changing the document structure and reducing file size that specific use cases are dependent on. Form flattening is non-trivial to implement, and while this workaround accomplishes the desired effect in some use cases it introduces confusing bugs when the user is performing actions dependent on the form being truly "flattened". In my opinion this function is useful but should be given a different name such as MakeReadOnly, ReadOnly, DisableEditing, etc. that doesn't conflict with the common meaning of flatten.
Expected Behavior
The form fields will be removed and replaced with their contents as regular markup objects
Actual Behavior
The form fields are set to read only mode.
This is a great project that has been extremely useful for me, and I'm definitely nitpicking here but I think it's worth considering so that other consumers of the library don't end up down the same confusing debugging road I did. Thanks for the great work!
The text was updated successfully, but these errors were encountered: