Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CheckSum to PdfEmbeddedFileStream #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

julienrffr
Copy link

@julienrffr julienrffr commented Oct 16, 2023

add the ability to fill the /CheckSum of PdfEmbeddedFileStream

checksum has to be a MD5 hash of the file (according to spec)

Example usage:

From the document helper .AddEmbeddedFile:
var path = @"C:\Users\userxxx\Downloads\avion2.jpg"; document.AddEmbeddedFile("filename.jpg", path, "4f98ab027f9b64a1f7325aedfabe8c9f");

Or directly on PdfEmbeddedFileStream's constructor:
var embeddedFileStream = new PdfEmbeddedFileStream(Owner, stream, "4f98ab027f9b64a1f7325aedfabe8c9f");

HelloWorld-FB59FCE0CB3E4341B9C63E9D626484AB_tempfile.pdf

fileattachmentchecksum

NB: this feature is available in PDFsharp-extended nuget package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant