EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Signature WidgetProps font stretching

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.


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!

Posted: 05/18/2007 08:03:42
by Eugene Mayevski (Team)

Passed to the helpdesk for developer investigation

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


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


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


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.

Posted: 07/31/2007 09:17:11
by Eugene Mayevski (Team)

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
Posted: 07/19/2012 06:21:05
by James Griffiths (Basic support level)
Joined: 07/19/2012
Posts: 1


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


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;
Posted: 07/19/2012 06:32:40
by Vsevolod Ievgiienko (Team)


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.



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