Rank: Member
Groups: Registered
Joined: 2/21/2019(UTC) Posts: 15
|
Hi, I have a barcode image that I need to insert into a field / control on a pdf. I have a PdfBitmap object with the barcode. Code:
FS_RECTF FieldRect = barCodeField.Controls[0].BoundRect;
PdfBitmap imageMap = PdfBitmap.FromFile(@"C:\image.png");
PdfImageObject imageObject = PdfImageObject.Create(Document, imageMap, 0, 0);
imageObject.Matrix = new FS_MATRIX(FieldRect.Width, 0, 0, FieldRect.Height, FieldRect.left, FieldRect.bottom);
The code above works okay with getting the image onto the pdf. The problem is the location is off a little. I need it to be exactly where the control / field is. Thank You
|
|
|
|
|
|
Rank: Member
Groups: Registered
Joined: 2/21/2019(UTC) Posts: 15
|
Additionally does Pdfium have a native way to handle barcode generation and insertion to Pdfs?
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
Could you please provide a PDF document and a screenshot which indicates where exactly the barcode should be placed
|
|
|
|
|
|
Rank: Member
Groups: Registered
Joined: 2/21/2019(UTC) Posts: 15
|
Sorry for the long time between replies. I figured out the issue. I was flipping the coordinate system and the conversion from inches to pixels. Thanks for the help
|
|
|
|
|
|
Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close