We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Remove images

Hi,

I have a suggestion, because this will solve my problem:
I want to have a method to add an image to an existing PDF and this image will get an user-defined ID.
After saving this PDF I want to reopen it to remove the image with that ID.

Is this possible? When it will be possible? I need a solution fast. :slight_smile:


Thank you.

Hi,

We can provide an api for adding an image with user-difined ID. But function removing the image with ID can not be provided shortly because of technical reasons.

Hi,

You could use Aspose.Pdf.Kit.Form.FillImageField() function to solve your problem. The relative url is
http://www.aspose.com/Products/Aspose.Pdf.Kit/Api/Aspose.Pdf.Kit.Form.html and
http://www.aspose.com/Products/Aspose.Pdf.Kit/Api/Aspose.Pdf.Kit.Form.FillImageField1.html

You could do this in two steps:
1) Create the pdf with a button field with the GUI tools.
2) Use the Form.FillImageField(fieldName, imageFileName) to add a image into the pdf and remove the field with FormEditor.RemoveField(fieldName). http://www.aspose.com/Products/Aspose.Pdf.Kit/Api/Aspose.Pdf.Kit.FormEditor.RemoveField.html

Best regards.

Great… thanks!

Hi, tiredwarlord,

Thanks for considering Aspose.Pdf.Kit for .NET.

I would like to add some complementarity to Ken's reply. Functions are also provided to add field (including push button field) to PDF template programmatically. Please refer to http://www.aspose.com/Products/Aspose.Pdf.Kit/Api/Aspose.Pdf.Kit.FormEditor.AddField.html.

Best regards.