System.ArgumentException in Aspose.Pdf.Kit.PdfExtractor.ExtractText()


#1

Hi,

PDF document causing this is in the attachment. The document was produced using Aspose.Words & Aspose.Pdf.

I’m using .NET Framework 2.0 and Pdf.Kit 2.1.0.0.

Here is the test code:

PdfExtractor e = new PdfExtractor();
e.BindPdf(@“C:\Temp\PdfKitTest.pdf”);
e.ExtractText();


Here is the exception:

System.ArgumentException: The output char buffer is too small to contain the decoded characters, encoding ‘Unicode (UTF-8)’ fallback ‘System.Text.DecoderReplacementFallback’.
Parameter name: chars
at System.Text.Encoding.ThrowCharsOverflow()
at System.Text.Encoding.ThrowCharsOverflow(DecoderNLS decoder, Boolean nothingDecoded)
at System.Text.UTF8Encoding.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, DecoderNLS baseDecoder)
at System.Text.DecoderNLS.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, Boolean flush)
at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex, Boolean flush)
at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex)
at System.IO.BinaryReader.InternalReadOneChar()
at ?.?.?.Read()
at ?.?.¢()
at ?.?.?()
at ?.?.?()
at ?.?.?()
at ?.?.?()
at ?.?.?()
at ?.?.?()
at ?.?.?()
at ?.?.?()
at ?.?.?(Stream ?, String ?, Int32 ?, Int32 ?)
at Aspose.Pdf.Kit.PdfExtractor.ExtractText()

Please try to resolve it ASAP, because we have this error ocurring in production (never seen this error before with other pdf-files).

Thank you

Robik

BTW your forum does not accept the PDF extension when trying to upload an attachment.


#2

Thanks for considering Aspose.

You can compress the PDF as a rar extension with WinRar when uploading an attachment or directly mail to kevin.zuo@aspose.com

We will check it out and give you an answer ASAP.


#3

hi,

i actually attached the zip-compressed pdf here, but somehow it it was lost when i later editet the message. anyway here it is again.

thank you

robik


#4

Hi Robik,

The problem you have is reproduced on my machine. We need time to find out bugs which bring out this error. Our developers will give you an answer ASAP.

Thanks for your patience.


#5
									Dear Customer,<br>We have fixed this bug, a hotfix will be release soon.

#6

Dear customer,

Please refer to this thread and download the dll and test it.

Best regards.


#7

hi,
the problem seems to be fixed in the hotfix dll.

thank you

Robert