CellSelection.SetValue method causes memory leak of CellReferenceRangeExpression objects in some cases when cell value is referenced by formulas. The memory leak is small, but the remaining CellReferenceRangeExpression continue to listen to some events, causing performance issues when their number become large - the time to set the value increases with each set.
When signing a PDF document with an image using the PdfStreamSigner, the signature is broken. This is the used approach for signing the document: https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/features/digital-signature/pdfstreamsigner
However, instead of using the DrawText method, the DrawImage method is used.
When a worksheet has name that has spaces and a hyperlink to this worksheet is being inserted in Excel, quotes are used to surround the name (ex: 'Sheet 12'!A1) for a valid hyperlink. If quotes are not added, the hyperlink is invalid. In RadSpreadsheet, it is the opposite: (Sheet 12!A1 is correct, while 'Sheet 12'!A1 is incorrect). Thus, opening such an exported document from RadSpreadsheet in Excel loads it with incorrect hyperlinks; and importing such an Excel document in RadSpreadsheet loads it with incorrect hyperlinks. A way to workaround this issue is to modify the hyperlinks on import/export from/to RadSpreadsheet. You can find attached a project demonstrating this approach.
LineInfo objects are not cleared when there are tables in the document being exported to PDF which leads to OutOfMemoryException.
NotImplementedException is thrown for GetCapHeight method of CFFFontSource.
System.NotImplementedException: The method or operation is not implemented.Text frames are paragraphs of text in a document which are positioned in a separate region or frame in the document and can be positioned with a specific size and position relative to non-frame paragraphs in the current document. More information about it is available in section 22.9.2.18 ST_XAlign (Horizontal Alignment Location) of Open Office XML.
When table with table border without color set is created (the color is null), and the document is exported to PDF, ArgumentNullException is thrown.
Workaround: Explicitly set a color where the color is null.
private void PdfExport()
{
var tables = this.document.EnumerateChildrenOfType<Table>();
foreach (var table in tables)
{
TableBorders coloredClone = this.CopyTableBorders_SetColorWhenOmitted(table);
table.Borders = coloredClone;
using (Stream output = new FileStream(fileName, FileMode.OpenOrCreate))
{
provider.Export(this.document, output);
}
}
}
private TableBorders CopyTableBorders_SetColorWhenOmitted(Table table)
{
var leftBorder = new Border(table.Borders.Left.Thickness,
table.Borders.Left.Style,
table.Borders.Left.Color ?? new ThemableColor(Colors.Transparent),
table.Borders.Left.Shadow,
table.Borders.Left.Frame,
table.Borders.Left.Spacing);
var rightBorder = new Border(table.Borders.Right.Thickness,
table.Borders.Right.Style,
table.Borders.Right.Color ?? new ThemableColor(Colors.Transparent),
table.Borders.Right.Shadow,
table.Borders.Right.Frame,
table.Borders.Right.Spacing);
var bottomBorder = new Border(table.Borders.Bottom.Thickness,
table.Borders.Bottom.Style,
table.Borders.Bottom.Color ?? new ThemableColor(Colors.Transparent),
table.Borders.Bottom.Shadow,
table.Borders.Bottom.Frame,
table.Borders.Bottom.Spacing);
var topBorder = new Border(table.Borders.Top.Thickness,
table.Borders.Top.Style,
table.Borders.Top.Color ?? new ThemableColor(Colors.Transparent),
table.Borders.Top.Shadow,
table.Borders.Top.Frame,
table.Borders.Top.Spacing);
var insideHorizontalBorder = new Border(table.Borders.InsideHorizontal.Thickness,
table.Borders.InsideHorizontal.Style,
table.Borders.InsideHorizontal.Color ?? new ThemableColor(Colors.Transparent),
table.Borders.InsideHorizontal.Shadow,
table.Borders.InsideHorizontal.Frame,
table.Borders.InsideHorizontal.Spacing);
var insideVerticalBorder = new Border(table.Borders.InsideVertical.Thickness,
table.Borders.InsideVertical.Style,
table.Borders.InsideVertical.Color ?? new ThemableColor(Colors.Transparent),
table.Borders.InsideVertical.Shadow,
table.Borders.InsideVertical.Frame,
table.Borders.InsideVertical.Spacing);
var tableBorders = new TableBorders(leftBorder, topBorder, rightBorder, bottomBorder, insideHorizontalBorder, insideVerticalBorder);
return tableBorders;
}
<w:pict w14:anchorId="324D5836">
<v:rect id="_x0000_i1025" style="width:0;height:1.5pt" o:hralign="center" o:hrstd="t" o:hr="t" fillcolor="#a0a0a0" stroked="f"/>
</w:pict>When importing a document containing an invalid PDF object dictionary key an exception is thrown.
When importing a document with button field with missing type, an error occurs.
51 0 obj << /Kids [ 70 0 R 71 0 R 72 0 R 73 0 R 74 0 R 75 0 R 76 0 R 77 0 R 78 0 R 79 0 R 80 0 R 81 0 R 82 0 R 83 0 R 84 0 R 85 0 R 86 0 R 87 0 R 88 0 R 89 0 R 90 0 R 91 0 R 92 0 R 93 0 R 94 0 R 95 0 R 96 0 R 97 0 R 98 0 R 99 0 R 100 0 R 101 0 R 102 0 R 103 0 R 104 0 R 105 0 R 106 0 R 107 0 R 108 0 R 109 0 R 110 0 R 111 0 R 112 0 R 113 0 R 114 0 R 115 0 R 116 0 R 14 0 R ] /T (Button 70) >> endobj
Workaround: Handle the exception: https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/features/handling-document-exceptions
Declined: This task is obsolete following the introduction of the current Licensing Mechanism.
------------------------------------------------------------------
Currently EULA requires Telerik assemblies to be protected against unauthorized redistribution, by following specific guidelines for the different types of technology:
- for WPF: https://docs.telerik.com/devtools/wpf/installation-and-deployment/deploying-telerik-ui/protecting-telerik-assembly - for ASP.NET AJAX: https://docs.telerik.com/devtools/aspnet-ajax/deployment/protecting-the-telerik-asp.net-ajax-assembly - for WinForms: https://docs.telerik.com/devtools/winforms/installation-deployment-and-distribution/redistributing-telerik-ui-for-winforms When the guidelines for WinForms or AJAX are followed (namely the call to ValidatePassPhrase() is uncommented in AssemblyProtection.IsValid() method, the following license message is added to the generated documents: "This document was generated by a copy of Telerik Document Processing licensed for use only by '<MyApp>'."Workaround: Set the application name as resource in the Application.Current, using the following code:
newSystem.Windows.Application();System.Windows.Application.Current.Resources.Add("Telerik.Windows.Controls.Key","MyApp");where 'MyApp' should be replaced with the actual application name. References to PresentationFramework and WindowsBase .NET Framework assemblies should be added in order for this approach to work.
As Ghiath reported in the forum thread, I am seeing this same error.
I am using RadFixedDocument and am generating a PdfFormatProvider. As Ghiath mentioned it will work fine (weeks, months) and then it seems the the font file is locked and it cannot export.
System.IO.IOException: I/O error when opening file 'C:\WINDOWS\FONTS\MSYH.TTC'. System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.IOException: I/O error when opening file 'C:\WINDOWS\FONTS\MSYH.TTC'. at MS.Internal.FontCache.FileMapping.OpenFile(String fileName) at MS.Internal.FontCache.FontSource.GetUnmanagedStream() at System.Windows.Media.GlyphTypeface.ComputeSubset(ICollection`1 glyphs) at Telerik.Windows.Documents.Fixed.Model.Fonts.CidType2Font.ComputeSubset(IEnumerable`1 usedCharacters) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontStream.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontStream.CopyPropertiesFrom(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontDescriptor.CreateFontFile(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontDescriptor.ExportFontFile(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontDescriptor.CopyPropertiesFrom(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontObject.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontObject.CopyPropertiesFrom(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.Type0FontObject.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.WriteFontsFromContext(PdfWriter writer, IPdfExportContext context) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.Export(IRadFixedDocumentExportContext context, Stream output) at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ExportOverride(RadFixedDocument document, Stream output) at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
It will throw the exception on the line where it is doing the export. The document is typically a multi-page document with images, etc. As I mentioned it might work fine for weeks and then once it fails the only solution is to recycle the web service.
We use the PDF viewer in an WPF project and see sometimes faulty pdfs in the telerik viewer. If I open the pdf file in acrobat it lloks fine. Do you know this problem ?
Attached you find the original file and a screenshot from PDF viewer. Other files are shown correct in the telerik viewer.