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!
![]() |
Sign pdf with associated image not showed |
Post Reply
|
| Author | |
briast
Beginner
Joined: 22 Oct 13 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: Sign pdf with associated image not showedPosted: 22 Oct 13 at 9:58AM |
|
Hello. Using 9.16, I try to sign a pdf with a PFX and add an image signature.
I use the next code from Roman Moderator on this thread: http://www.quickpdf.org/forum/topic2563&OB=ASC.html ------------------------------------------------ procedure TForm7.btnNewSignProcessFromFileClick(Sender: TObject); var SignProcessID: Integer; begin DPL := TDebenuPDFLibrary0914.Create; if DPL.UnlockKey('..license_key_goes_here') = 1 then begin DPL.DrawText(100, 700, 'This is the file to be signed'); DPL.SaveToFile('TheUnsignedFile.pdf'); SignProcessID := DPL.NewSignProcessFromFile('TheUnsignedFile.pdf', ''); if (SignProcessID > 0) then begin DPL.SetSignProcessPFXFromFile(SignProcessID, 'qpl_test.pfx', 'testing'); DPL.SetSignProcessInfo(SignProcessID, 'To test digital signatures', 'The World', 'Contact me'); DPL.SetSignProcessField(SignProcessID, 'Contract Signature'); DPL.SetSignProcessFieldBounds(SignProcessID, 100, 600, 200, 100); DPL.SetSignProcessFieldImageFromFile(SignProcessID, 'visualsignature.jpg', 0); DPL.EndSignProcessToFile(SignProcessID, 'TheSignedFile.pdf'); end; end; end; ------------------------------------------------ The PDF file is signed good, but I can't see the image. I have tried changing the bounds, but nothing changes. Any suggestion?
|
|
![]() |
|
briast
Beginner
Joined: 22 Oct 13 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 Oct 13 at 11:40AM |
|
Hi. I have found the problem.
If before the sign process you change file permission with EncodePermission and Encrypt, then after sign process, the file is correctly signed but image is hidden. I don't know if that is correct or no.
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Oct 13 at 7:31AM |
|
Hi Briast,
i didn't try it but perhaps it's the line: DPL.SetSignProcessFieldBounds(SignProcessID, 100, 600, 200, 100); The coordinates are for x1, y1, x2, y2 ... i think ;-) So if shown or not have to do where to start and how are the dimensions of your jpg. I think you should use SetOrigin first. Cheers and welcome here, Ingo Edited by Ingo - 23 Oct 13 at 7:31AM |
|
|
Cheers,
Ingo |
|
![]() |
|
briast
Beginner
Joined: 22 Oct 13 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Oct 13 at 8:55AM |
|
Hi. Thanks for your help but as I said, the problem is if I change the permission.
If I don't change it, the image is showed without error. I have another question that is how to make this image transparent. I try with png with transparency but it doesn't work. |
|
![]() |
|
Rowan
Moderator Group
Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 Nov 13 at 3:42AM |
|
Hi briast,
It is not currently possible to digitally sign a PDF that has already been encrypted. It is also not possible to apply the document permissions to the PDF after it has been signed as that would invalidate the digital signature. Cheers, - Rowan.
|
|
![]() |
|
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