Skip to main content
Skip table of contents

Embedded files

Examples for adding and removing embedded files in PDFs. These examples were written in answer to the question Click How to delete attachments in PDF using iText?

addembeddedfile

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/annotations/AddEmbeddedFile.java##

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/annotations/AddEmbeddedFile.cs##

addembeddedfiles

We've encountered an issue exporting this macro. Please try exporting again later.

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/annotations/AddEmbeddedFiles.cs##

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/annotations/RemoveEmbeddedFile.cs##

removeembeddedfile

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/annotations/RemoveEmbeddedFiles.java##

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/annotations/RemoveEmbeddedFiles.cs##

removeembeddedfiles

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/annotations/RemoveEmbeddedFile.java##

Resources

https://github.com/itext/i7js-examples/blob/develop/src/main/resources/pdfs/hello.pdf

https://github.com/itext/i7js-examples/blob/develop/src/main/resources/pdfs/hello_with_attachment.pdf

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.