I want to put an image like jpg image on the middle of one PDF page. But this is not all i need. I would like define a certain position in PDF page and place the images. So, is there a way to put images in positions on PDF page? Sometime, i will also change its orientation, like vertically or horizontally. To my knowledge, the size issue, in point, pixel, or millimeter is not so easy to control.
I checked online, there is no article exactly help me. So what are the steps to do this manipulation using your library? Please let me know.
Answers
What you mentioned here are all supported. You can define the image position and control size measurement. To be exactly, XUnit can be used to do all size conversion. What’s more, you are allowed to change image width & height, re-sizing it to smaller, or even larger.
We suggest you to have a try with XsPDF basic library for .NET. It will help you quickly center an image on PDF page in C#.
Thank you for your quick response.
XUnit would be the way to solve my problem and i’ve already downloaded your trial pack and will give it a try.
Supplementary explanation.
XUnit provides the way to resize image fromCentimeter, fromMillimeter, fromInch, fromPoint. To help you have quick start. Please directly refer to the following snippet code to get it done.
XImage img = XImage.FromFile(filename);
Unit height = Unit.FromInch(img.PixelHeight / img.VerticalResolution);
Unit width = Unit.FromInch(img.PixelWidth / img.HorizontalResolution
Wow, nice reference! It works.
Thanks for all your effort on this.