EldoS | Feel safer!

Software components for data protection, secure storage and transfer

BackgroundStyle

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#2496
Posted: 03/13/2007 12:45:10
by Qualisoft CQPD (Standard support level)
Joined: 03/13/2007
Posts: 55

How can i add an background imagem in a PDF Signature
ElPDFSignatureWidgetProps.BackgroundStyle = TSBPDFWidgetBackgroundStyle.pbsCustom
and then??

What kind of images is supported? JPEG, BMP, ICO?

#2497
Posted: 03/13/2007 13:09:24
by Eugene Mayevski (EldoS Corp.)

If you use Custom style, you need to put raw pdf data there.
To put an image in JPG2000 format, use Image style.
PDF doesn't support anything but JPG2000 as a background.


Sincerely yours
Eugene Mayevski
#2508
Posted: 03/14/2007 10:15:36
by Qualisoft CQPD (Standard support level)
Joined: 03/13/2007
Posts: 55

Thanks for help.
I can´t put the image to work....
my code:
Dim buffer() as byte
Dim FSimg As New FileStream("d:\image.jp2", FileMode.Open)
ReDim Buffer(FSimg.Length - 1)
FSimg.Read(Buffer, 0, Buffer.Length)
FSimg.Close()
Sig.WidgetProps.Background.Data = Buffer
Sig.WidgetProps.Background.ImageType=TSBPDFImageType.pitJPEG2000
Sig.WidgetProps.BackgroundStyle=SBPDFWidgetBackgroundStyle.pbsCustom
thanks
#2509
Posted: 03/14/2007 10:20:30
by Ken Ivanov (EldoS Corp.)

You also have to specify the correct image dimensions via Width and Height properties of TElPDFSignature.WidgetProps.Background object.
#2510
Posted: 03/14/2007 11:42:10
by Qualisoft CQPD (Standard support level)
Joined: 03/13/2007
Posts: 55

Can you send me an example with image and code?
#2511
Posted: 03/14/2007 12:19:58
by Ken Ivanov (EldoS Corp.)

The following code (C#) does work for us:
Code
Sig.WidgetProps.BackgroundStyle = SBPDF.TSBPDFWidgetBackgroundStyle.pbsCustom;
byte[] imgData;
FileStream f = new FileStream("TranspSig.jp2", FileMode.Open);
try
{
   imgData = new byte[f.Length];
   f.Read(imgData, 0, imgData.Length);
}
finally
{
   f.Close();
}
Sig.WidgetProps.Background.Data = imgData;
Sig.WidgetProps.Background.Width = 120;
Sig.WidgetProps.Background.Height = 120;


The TranspSig.jp2 image file is attached.


[ Download ]
#2512
Posted: 03/14/2007 12:56:08
by Qualisoft CQPD (Standard support level)
Joined: 03/13/2007
Posts: 55

thanks, it works.
I think my "Width" and "Height" is wrong.

thanks for help
#22037
Posted: 10/16/2012 15:29:58
by Marc Meister (Standard support level)
Joined: 08/19/2011
Posts: 10

Hi Eugene,

Can I receive the same code also, I am a customer.

I am looking to add an image instead of the standard signature in the PDF file, using a jpg file, specifiyng width and heigt.

Innokentiy Ivanov inviste some customer to download code which I cannot access

Thank you,

Marc
#22038
Posted: 10/16/2012 15:39:57
by Ken Ivanov (EldoS Corp.)

Marc,

I am not sure that I understand what code are you asking about. The only code corresponding to this topic is shown publicly three messages above. Attached there (and not available any more, sorry) was a sample JPEG2000 image.
#22048
Posted: 10/17/2012 03:16:06
by Marc Meister (Standard support level)
Joined: 08/19/2011
Posts: 10

Hi Innokentiy,

Sorry,

Yes, I followed your help file when installing the product, the reference explains my issue and now it works. So please discard this question for the moment.

Thanks for your quick answer.

Marc
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 5412 times

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




|

Back to top

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

Got it!