Dim signProp As New SignatureDataProperties
signProp.ContactInfo = strContactInfo
signProp.Name = strSignersName
signProp.Reason = strReason
signProp.Location = strLocation
signProp.TimeOfSigning = DateTime.Now
Dim signatureName As String = "EsignSignature"
Dim signatureField1 As SignatureField = New SignatureField(signatureName)
UseSignatureProperties = 1
If UseSignatureProperties = 1 Then
Dim sign1 = New Signature(certificate)
signatureField1.Signature = sign1
signatureField1.Signature.Properties = signProp 'THIS WOULD FAIL
Else
signatureField1.Signature = New Signature(certificate)
signatureField1.Signature.Properties.ContactInfo = strContactInfo
signatureField1.Signature.Properties.Location = strLocation
signatureField1.Signature.Properties.Name = strSignersName
signatureField1.Signature.Properties.Reason = strReason
signatureField1.Signature.Properties.TimeOfSigning = DateTime.Now 'THIS WORKS
End If
Observed: the following dialog appears:
They are exported with the /EmbeddedFiles switch. This would allow adding external files to the PDF document.
You can convert the document to PDF and use the approach bellow: Currently, silent async printing may be achieved by using RadPdfViewer WPF control. Sample demo showing how to achieve this may be seen at the following forum post: http://www.telerik.com/forums/pdfviewer-print-makes-ui-unresponsive#js0YdzFWc0Oa8C3g6a18lg The RadPdfViewer WPF control used does not need to be displayed, making this demo a good workaround for ASP.NET AJAX clients.
When characters are in the ranges 61472-61566, 61565-61695, 65535-65535 they are correctly exported with Wingdings font. However, when the character value is outside these ranges the font fallback mechanism exports them with different font and this causes wrong glyph rendering in the resulted PDF.
The following code snippet shows how the Wingdings characters can be modified so that they are correctly exported to PDF when converting from WordsProcessing's RadFlowDocument:
RadFlowDocument document = new DocxFormatProvider().Import(File.ReadAllBytes(@"test_document.docx"));
foreach (Run run in document.EnumerateChildrenOfType<Run>())
{
if (run.FontFamily.GetActualValue(document.Theme).Source.Contains("Wingdings"))
{
StringBuilder modifiedText = new StringBuilder();
foreach (char character in run.Text)
{
modifiedText.Append(character > 256 ? character : (char)(character + 61440));
}
run.Text = modifiedText.ToString();
}
}
Workaround: When creating a RadFixedDocument:
using (RadFixedDocumentEditor editor = new RadFixedDocumentEditor(this.fixedDocument))
{
byte[] data = File.ReadAllBytes(@"CustomFont.ttf");
FontsRepository.RegisterFont(new FontFamily("CustomFont"), FontStyles.Normal, FontWeights.Normal, data);
FontBase customFont;
FontsRepository.TryCreateFont(new FontFamily("CustomFont"), FontStyles.Normal, FontWeights.Normal, out customFont);
editor.CharacterProperties.Font = customFont;
string text = "w";
StringBuilder modifiedText = new StringBuilder();
foreach (char character in text)
{
modifiedText.Append(character > 256 ? character : (char)(character + 61440));
}
text = modifiedText.ToString();
editor.InsertRun(text);
}