Completed
Last Updated: 01 Mar 2021 12:10 by ADMIN
Release LIB 2021.1.309 (9/3/2021)
Dimitar
Created on: 09 Dec 2019 11:48
Category: PdfProcessing
Type: Bug Report
4
PdfProcessing: ArgumentException when merging or splitting files with PdfStreamWriter

When merging or splitting files that contain the "159 '\u009f'" char, ArgumentException("The encoding is not supported.") is thrown.

This issue can also result in ArgumentException in client applications with the message: currentIndirectObject should be null.

Workaround:

Use PdfFormatProvider or reflection to register the char (check the comments).

4 comments
ADMIN
Peshito
Posted on: 01 Mar 2021 12:10

Hello,

This item will be available in R2 2021 Release. 

 

It is also available with the following internal builds:

  • Telerik UI for WPF - LIB 2021.1.309 (9/3/2021). 
  • Telerik UI for Xamarin - LIB 2021.1.315 (15/3/2021)

Regards,
Peshito
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

ADMIN
Martin
Posted on: 18 Aug 2020 14:38

Hello Maik,

Thank you very much for the suggested workaround. 

I am going to include it in our internal item in order to have it in mind when the development of this issue begins.

Regards,
Martin
Progress Telerik

Maik
Posted on: 18 Aug 2020 10:18

We found another workaround without the performance decrease.

Type adobeGlyph = Type.GetType("Telerik.Windows.Documents.Fixed.Model.Fonts.Encoding.AdobeGlyphList, Telerik.Windows.Documents.Fixed");
if (adobeGlyph != null)
{
	MethodInfo dynMethod = adobeGlyph.GetMethod("RegisterPair",
		BindingFlags.NonPublic | BindingFlags.Static);
	if (dynMethod != null)
	{
		object invoke = dynMethod.Invoke(null, new object[] { ".notdef", '□' });
		return;
	}
}

Maik
Posted on: 18 Aug 2020 07:20
This should be fixed, as .notdef char are common and in my tests the workaround is 10 times slower.