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

Free Support Forum - aspose.com

Stamp Or Draw Pixel onto PDF Page

I have an PDF and I am trying to determine the best way to create a template to stamp information onto a PDF. The measurements I have are in inches and I need a way to draw or stamp a pixel onto the pdf. I think something the size of a pixel with give me the greatest chance of creating an accurate template.

@aultmike

Thank you for contacting support.

Please note that the basic measuring unit in Aspose.PDF for .NET is point, where 1 inch = 72 points and 1 cm = 1/2.54 inch = 0.3937 inch = 28.3 points. So you can convert inches to points and then you can specify position of a stamp with XIndent and YIndent properties as explained in Working with Stamps and Watermarks.

Please let us know if we have not properly understood your requirements or have missed some point and we would be more than happy to assist you further.

Thank you for the information. My solution was to create a jpeg one pixel wide by one pixel tall. Then i will stamp that jpeg onto the PDF thus giving me an accurate way to calibrate my other images and text.

Additionally where can I find information on what the background and opacity properties of the ImageStamp do. There was nothing in the API reference.

@aultmike

We are glad to know that suggested information has helped you to achieve your requirements. Moreover, ImageStamp.Background is a Boolean property which can be used to bring content in-front of the stamp and making the stamp as background content, behind some text for instance. Whereas, the Opacity property specifies transparency value of an image as you may try to set different values as per your requirements. Minimum, maximum and default values are mentioned in API references of ImageStamp class.

We hope this will be helpful. Please feel free to contact us if you need any further assistance.