EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Signature WidgetProps font stretching

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#2949
Posted: 05/18/2007 04:15:17
by Richard Whytock (Standard support level)
Joined: 05/16/2007
Posts: 2

In attempting to apply a custom appearance for a digital signature, it appears that the widget seems to stretch fonts to fill the widget, regardless of the AutoFontSize properties.

E.g.

pdfSignature.WidgetProps.AutoSize = false;
pdfSignature.WidgetProps.AutoText = false;
pdfSignature.WidgetProps.AutoFontSize = false;
pdfSignature.WidgetProps.SectionTextFontSize = 4;
pdfSignature.WidgetProps.SectionTitleFontSize = 4;
pdfSignature.WidgetProps.TitleFontSize = 6;
pdfSignature.WidgetProps.Height = 40;
pdfSignature.WidgetProps.Width = 100;
pdfSignature.WidgetProps.Header = "Bodycote Testing (Teeside)";
pdfSignature.WidgetProps.SignerInfo = "Stevie Hastie" + Environment.NewLine + "General Manager";
pdfSignature.WidgetProps.SignerCaption = "Approved By :";

Using this code, the Title is trunacted, but still stretched to fit the width of the widget!

Is there a maximum length of text for these properties where the widget truncates? Is there anway to stop the fonts stretching?

I've attempted to use the CustomAppearance property, but it seems to end up empty.

Any assistance would be appreciated!

Ritchie
#2950
Posted: 05/18/2007 08:03:42
by Eugene Mayevski (EldoS Corp.)

Passed to the helpdesk for developer investigation


Sincerely yours
Eugene Mayevski
#3486
Posted: 07/31/2007 08:48:48
by Orlando Rodriguez (Standard support level)
Joined: 07/31/2007
Posts: 5

Hi,

I have the same situation.
How I can change the fonts stretching?

Thanks,

Orlando
#3487
Posted: 07/31/2007 08:52:44
by Richard Whytock (Standard support level)
Joined: 05/16/2007
Posts: 2

Orlando,

I raised a ticket for this, and recieved a debug assembly which solved the issue. Hopefully Eugene or someone else from Eldos will be able to say when this fix will be incorporated into a formal release.

Cheers
Ritchie.
#3489
Posted: 07/31/2007 09:17:11
by Eugene Mayevski (EldoS Corp.)

Looking at the dates, I believe that 5.2 betas already include the fix, so downloading 5.2 RC1 should solve the problem.


Sincerely yours
Eugene Mayevski
#20839
Posted: 07/19/2012 06:21:05
by James Griffiths (Basic support level)
Joined: 07/19/2012
Posts: 1

Hi,

I know this is an old post, i'm still getting the stretched font with version 9.0.202. It seems that as I increase the font size, the width adjusts together with the character spacing. Anything I can do to solve this please?

Many Thanks, James

Code:

sig.SignatureType = SBPDF.Unit.stDocument;
sig.WidgetProps.AutoText = false;
sig.WidgetProps.ShowTimestamp = true;

// set signature visual properties
sig.WidgetProps.IgnoreExistingAppearance = true;
sig.WidgetProps.AutoStretchBackground = false;
sig.AuthorName = signature.Name;
sig.AllowedChanges = SBPDF.Unit.sacComment;
sig.SigningTime = DateTime.UtcNow;
sig.ContactInfo = signature.ContactInfo;
sig.Reason = signature.Reason;
sig.Location = signature.Location;

// try to hide the certification signature
sig.Invisible = false; // - this causes and error when the GetSignatures method tries to load field value (field.GetValue())
sig.WidgetProps.NoView = false;
sig.WidgetProps.BackgroundStyle = TSBPDFWidgetBackgroundStyle.pbsNoBackground;
sig.WidgetProps.Header = signature.Name.ToString();
sig.WidgetProps.SignerCaption = "";

DateTime createdDate = Convert.ToDateTime(signature.CreationDate);
string createdDateString = string.Empty;
createdDateString = createdDate.ToString("dd MMM yyyy hh:mm");

sig.WidgetProps.AlgorithmInfo = "Digitally signed by " + signature.Name.ToString() + "\r\nReason: " + signature.Reason + "\r\nIP: " + signature.IPAddress + "\r\nDate: " + createdDateString;
sig.WidgetProps.AlgorithmCaption = "";
sig.WidgetProps.SignerInfo = "";

sig.WidgetProps.AutoSize = false;
sig.WidgetProps.Width = 90;
sig.WidgetProps.Height = 40;
sig.WidgetProps.AutoFontSize = false;
sig.WidgetProps.SectionTextFontSize = 2.5;
sig.WidgetProps.SectionTitleFontSize = 2.5;
sig.WidgetProps.TitleFontSize = 5;
sig.WidgetProps.ShowTimestamp = false;

storage.Add(certificate, true);
handler.CertStorage = storage;
handler.SignatureType = SBPDFSecurity.TSBPDFPublicKeySignatureType.pstPKCS7SHA1;
handler.CustomName = signature.HandlerName;
handler.Detached = true;

sig.Handler = handler;
sig.Validate();
#20840
Posted: 07/19/2012 06:32:40
by Vsevolod Ievgiienko (EldoS Corp.)

Hello.

First of all please check if the same problem occurs with the latest 9th build or even 10th beta version. If yes then please post a sample input and output PDF files via Helpdesk.
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 3276 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!