ButtonField.AddImage accepts an Image, but this Image is System.Drawing.Image which is only available on windows. how do i add image to button so that it works on linux?
@compagniedsdr
You are using the Aspose.Pdf.Drawing library, right?
How is the image you want to use represented?
Thank you it works. I have another question: How to add background colour to button? I add an image to the button but then the image doesn’t cover the entire button. Would be nice if the button can have a white background colour, or maybe the image can be stretched to fit the button.
The simplest thing here would be:
- create a white bitmap by button size to fit it to the button
- in it, in the right place, display the image for the button
- add the resulting bitmap to the button
how would i do this on linux?
i have license for Aspose.Imaging too. I find out that ButtonField.AddImage can only have 1 image because it overwrites. I want to make a white background image the size of the button, but then I want to overlay the actual image on top of this image.
@compagniedsdr
The Aspose.Imaging support forum will provide more accurate and reliable information on how to do this. In this regard, I advise you to contact them.