Commit Graph

19 Commits

Author SHA1 Message Date
Paul van Brouwershaven
b9112bb85b Add initial support for signature appearance 2024-12-16 15:05:27 +01:00
Paul van Brouwershaven
e5cdb61bea Refactor object handling 2024-12-11 16:24:26 +01:00
Paul van Brouwershaven
bacc810a68 Fix linting errors 2024-11-14 13:33:46 +01:00
Paul van Brouwershaven
7946d5266d Fixes and support for ApprovalSignature and TimeStampSignature 2024-11-14 13:00:58 +01:00
Paul van Brouwershaven
77cc6791aa Refactor and improve xref stream writing
- Split writeXrefStream into smaller, focused functions
- Improve error handling and messages in xref related functions
- Enhance code readability and maintainability
- Use io.WriteString for more efficient string writing

This refactoring aims to make the xref stream writing process more modular, easier to understand, and slightly more efficient, while maintaining the existing functionality.
2024-07-07 17:38:17 +02:00
Paul van Brouwershaven
08b31dc8f9 Add error handling for context.InputFile.Seek operation 2024-07-07 16:42:04 +02:00
Paul van Brouwershaven
a0da9873d4 Fix writeXrefTable to handle PDFs with multiple revisions
- Refactor xref table writing logic to correctly parse existing entries
- Add support for variable first object ID in xref table
- Implement dynamic calculation of new xref entries
- Improve error handling and reporting

This change resolves issue #4 with malformed xref tables when signing PDFs
that have undergone multiple revisions.
2024-07-07 16:42:04 +02:00
Paul van Brouwershaven
44ac3c7806 Check errors 2022-06-30 18:04:25 +02:00
Paul van Brouwershaven
2ce268ea4d Fix fpr PDF 2.0 xref tables 2022-06-29 21:04:33 +02:00
Jeroen Bobbeldijk
679656fb8d Changed file to writer/reader 2017-09-23 16:37:39 +02:00
Jeroen Bobbeldijk
8c60336e04 Dont parse twice in test, fix some bugs with special pdfs 2017-09-17 15:24:57 +02:00
Jeroen Bobbeldijk
3d7049d4e8 Fix up stream 2017-09-17 12:33:49 +02:00
Jeroen Bobbeldijk
fa31007f97 Add proper predictor, switch between up/sub, fix up sub 2017-09-17 11:15:42 +02:00
Jeroen Bobbeldijk
e9e71178d7 Add encoding 2017-09-17 11:00:06 +02:00
Jeroen Bobbeldijk
b06975647c Fix Index 2017-09-10 17:37:42 +02:00
Jeroen Bobbeldijk
d3dbbaa81b Xref stream progress 2017-09-10 17:26:01 +02:00
Jeroen Bobbeldijk
7b19471330 Valid signature 2017-07-11 08:21:18 +02:00
Jeroen Bobbeldijk
db69b6a4c0 Append instead of replace 2017-07-08 14:55:31 +02:00
Jeroen Bobbeldijk
41a9627fee Add sign functionality 2017-07-04 20:44:52 +02:00