EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Custom PDF widget image not showing

Posted: 07/10/2013 05:07:46
by Kees de Wit (Standard support level)
Joined: 06/13/2013
Posts: 17

I'm trying to make the PDF widget show my custom image, but the image never shows. This is the code I use to configure the widget:

signature.WidgetProps.AutoPos = false;
signature.WidgetProps.AutoSize = false;
signature.WidgetProps.AutoText = false;

signature.WidgetProps.OffsetX = 63;
signature.WidgetProps.OffsetY = 550;
signature.WidgetProps.Width = 180;
signature.WidgetProps.Height = 70;
signature.WidgetProps.BackgroundStyle =  TSBPDFWidgetBackgroundStyle.pbsCustom;
signature.WidgetProps.Background.ImageType =  TSBPDFImageType.pitJPEG;
signature.WidgetProps.Background.Height = 480;
signature.WidgetProps.Background.Width = 180;

signature.WidgetProps.Background.Data = File.ReadAllBytes(context.Server.MapPath("~/data/Handtekening1.jpg"));
signature.WidgetProps.AutoStretchBackground = true;
signature.WidgetProps.AutoFontSize = false;
signature.WidgetProps.HideDefaultText = true;

I have two questions:
1) Why it doesn't show the image with the above code?
2) Is it possible to use png image format, if so, how?
Posted: 07/10/2013 06:40:23
by Ken Ivanov (Team)

Hello Kees,

1) Are you creating a new signature widget or signing an existing signature field?

2) I am afraid it is not possible to use PNG format at the moment.
Posted: 07/10/2013 06:47:23
by Kees de Wit (Standard support level)
Joined: 06/13/2013
Posts: 17

Hello Ken,

I am creating a new signature field. I managed to get the image visible, but it seems that it MUST be in jpeg2000 format. If it only allows jpeg2000 then why is the ImageType settable? What types does it support? The good old jpeg?
Posted: 07/10/2013 07:00:51
by Ken Ivanov (Team)

The pitJPEG setting should also work fine. We'd better have a deeper look into the issue. Could you please upload the JPEG file to the Helpdesk ticket I've created for you so that we could try to reproduce the problem locally?



Topic viewed 883 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!