Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Insert signature field with PDFPoints coordinates |
Post Reply |
Author | |
AlessandroRimoldi
Beginner Joined: 01 Aug 12 Location: Italy Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 10 Oct 13 at 8:49AM |
Hello, i must create a signature field or add an image to a PDF and the destination coordinate and values for size are in PDFPoints. How can i do?
Thank You!
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Alessandro!
I want to create a car ... please tell me how to do ;-) There are "first-step-guids" online and you have documentation with your installation. Please read inside the developer guide and the online reference. Start with an easy app... step by step... and then you should post about special problems with one function or another function ... :) Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
Hi Alessandro,
Thanks for your post. The information you need is in the Developer Guide for Debenu Quick PDF Library (provided with the installer). Origin point for drawing operations The origin has coordinates of “0,0” and is the starting point for finding all other points. The origin point for a page in a PDF typically starts at a page corner. The default origin for Debenu Quick PDF Library is the bottom left page corner. Using the SetOrigin function in Debenu Quick PDF Library you can change the point of origin to be any page corner (bottom left, top left, top right, bottom right). By default calling DrawText(10, 10, “Test”) will result in the text being drawn at 10 points in from the left of the page and 10 points up from the bottom of the page, but if you call SetOrigin(1) prior to DrawText then the text will be drawn at 10 points in from the left of the page and 10 points down from the top of the page because passing the value 1 to the Origin parameter for the SetOrigin function changes the origin to top left of the page. The default point of origin in Adobe Acrobat was the bottom left page corner up until Acrobat 8, at which point Adobe switched the point of origin to the top left page corner. As mentioned above, you can set Debenu Quick PDF Library to use any page corner in a PDF. In version 7.25 of Debenu Quick PDF Library we added a new function called NormalizePage that moves and/or rotates the contents of the page so that subsequent drawing operations are at the expected position on the page. All the page boundary boxes are adjusted to the physical size of the page and the page's rotation attribute is reset to zero. Measurement units In PDF the coordinate system is called default user space. The default for the size of the unit in default user space (1/72 inch) is approximately the same as a point, a unit widely used in the printing industry. It is not exactly the same, however; there is no universal definition of a point. Lastly, here is a knowledge base article for adding a digital signature field and and adding an image to a PDF programmaticaly. Cheers, - Rowan.
|
|
Marat.Chariev
Team Player Joined: 18 Oct 13 Status: Offline Points: 24 |
Post Options
Thanks(0)
|
I decided to post my question here since you guys talking
about placing digital signature into existed PDF file. Here are the steps I follow: Create
an instance of the library : lnInstanceId = DPLCreateLibrary() Get
selected document (default) ID: lnSelectedDocumentID
= DPLGetDocumentID(lnInstanceID, 1) Set
origin coordinates (Top-Left): lnResult =
DPLSetOrigin(lnInstanceID, 1) Set other
settings: lnResult =
DPLSetNeedAppearances(lnInstanceID, 1) lnResult =
DPLSetPageDimensions(lnInstanceID, lnPhysicalPaperWidth, lnPhysicalPaperLength) lnResult =
DPLSelectPage(lnInstanceID, 1) lnLayer =
DPLNewContentStream(lnInstanceID) Then I draw the text into PDF file and save it as lcPDFFile: lnResult =
DPLSaveToFile(lnInstanceId, lcPDFFile) lnResult = DPLRemoveDocument(lnInstanceId,
lnSelectedDocumentID) After that I open newly created PDF file in order to place “visual”
digital signature using same instance of the library: lnSignProcessID = DPLNewSignProcessFromFile(lnInstanceID,
tcFileName, lcPassword) Set
origin coordinates (Top-Left) again, because after DPLRemoveDocument() command it was reset to
0: lnResult
= DPLSetOrigin(lnInstanceID, 1) Now
my origin coordinates are set to Top-Left. But when I try to bound field it shows
it in the wrong place (looks like it uses default origin coordinates (Bottom-Left))
: lnResult = DPLSetSignProcessPFXFromFile(lnInstanceID,
lnSignProcessID, lcPFXFileName, lcPFXFilePassword) lnResult =
DPLSetSignProcessInfo(lnInstanceID, lnSignProcessID, lcReason, lcLocation,
lcContactInfo) lnResult =
DPLSetSignProcessField(lnInstanceID, lnSignProcessID, lcTitleOfFormField) lnResult =
DPLSetSignProcessFieldBounds(lnInstanceID, lnSignProcessID, lnLeft, lnTop,
lnWidth, lnHeight) lnResult =
DPLSetSignProcessFieldImageFromFile(lnInstanceID, lnSignProcessID, lcSignatureImageFileName,
0) lnResult =
DPLEndSignProcessToFile(lnInstanceID, lnSignProcessID, lcTempFileName) Am
I missing something? |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store