Hi,
Hi Andrew,
// Open document<o:p></o:p>
Document pdfDocument = new Document("c:/pdftest/56A_38853.pdf");
// Setup new file to be added as attachment
FileSpecification fileSpecification = new FileSpecification(new FileStream("c:/pdftest/PDF_File_Security_Settings.PNG", FileMode.Open) , "Sample Imge file");
// Add attachment to document's attachment collection
pdfDocument.EmbeddedFiles.Add(fileSpecification);
// Save new output
pdfDocument.Save(“c:/pdftest/Attachment_from_Stream.pdf”);
Hi,
Hi Andrew,
Hi Andrew,
Document pdfDocument = new Document(“c:/pdftest/Converted.pdf”);<o:p></o:p>
// Setup new file to be added as attachment
FileSpecification fileSpecification = new FileSpecification(new FileStream("c:/pdftest/Form_Display.PNG", FileMode.Open), "Sample Imge file");
fileSpecification.Name = "Form_Display.PNG";
// Add attachment to document's attachment collection
pdfDocument.EmbeddedFiles.Add(fileSpecification);
// Save new output
pdfDocument.Save(“c:/pdftest/Attachment_from_Stream.pdf”);