EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PDF Signature Image

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
Posted: 09/26/2006 01:42:50
by Igor Sever (Standard support level)
Joined: 07/19/2006
Posts: 4

I cannot figure out how to use Image in WidgetProps. Can somebody help me out with an example?

Posted: 09/26/2006 06:03:14
by Eugene Mayevski (Team)

set BackgroundStyle to pbsCustom, then assign the image binary data in JPEG2000 (NOT JPEG!!!) format to the Image property.

Sincerely yours
Eugene Mayevski
Posted: 09/26/2006 07:27:07
by Igor Sever (Standard support level)
Joined: 07/19/2006
Posts: 4

I am getting blank signature, no image, no text, no error. My code is:

FileStream fs = new FileStream("C:\\temp2\\tmlogo.jp2", FileMode.Open, FileAccess.Read);
byte[] image = new byte[fs.Length];
fs.Read(image, 0, (int)image.Length);

TElPDFSignature Sig = Document.get_Signatures(index);
TElPDFSignatureWidgetProps Props = Sig.WidgetProps;
Props.BackgroundStyle = TSBPDFWidgetBackgroundStyle.pbsCustom;
Props.AutoPos = false;
Props.OffsetX = 450;
Props.OffsetY = 700;

TElPDFImage sigimage = new TElPDFImage();
sigimage.Data = image;

Sig.Handler = PublicKeyHandler;
Sig.AuthorName = signerCN;
Sig.SigningTime = DateTime.Now;
Posted: 09/27/2006 07:54:12
by Ken Ivanov (Team)

Please use the following code to set up the background image:
Sig.WidgetProps.BackgroundStyle = SBPDF.TSBPDFWidgetBackgroundStyle.pbsCustom;
byte[] imgData;
FileStream f = new FileStream("D:\\Temp\\TranspSig.jp2", FileMode.Open);
   imgData = new byte[f.Length];
   f.Read(imgData, 0, imgData.Length);
Sig.WidgetProps.Background.Data = imgData;
Sig.WidgetProps.Background.Width = 120;
Sig.WidgetProps.Background.Height = 120;



Topic viewed 4570 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!