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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Sign pdf with associated image not showed
  FAQ FAQ  Forum Search   Register Register  Login Login

Sign pdf with associated image not showed

 Post Reply Post Reply
Author
Message
briast View Drop Down
Beginner
Beginner


Joined: 22 Oct 13
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote briast Quote  Post ReplyReply Direct Link To This Post Topic: Sign pdf with associated image not showed
    Posted: 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?
Back to Top
briast View Drop Down
Beginner
Beginner


Joined: 22 Oct 13
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote briast Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
briast View Drop Down
Beginner
Beginner


Joined: 22 Oct 13
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote briast Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store