This is a migrated thread and some comments may be shown as answers.

Getting OutOfMemory exception when exporting document to PDF

1 Answer 12 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Phuc
Top achievements
Rank 1
Phuc asked on 29 Mar 2017, 11:06 PM

Hi there,
I'm having a Word document (6MB) which has 11 pages with image.
I'm using RadRichTextBox to load it into and then export it to a MemoryStream, then I got an OutOfMemoryException.
Here is the code sample:
                IDocumentFormatProvider pdf = DocumentFormatProvidersManager.GetProviderByExtension(ext);
                pdf.Export(radRichTextBox1.Document, stream);
When debugging, I observed that the stream is quite big (33MB). Could you please let me know why the stream is really big like that.

FYI: I'm using the 2015 version

How can I fix the issue?

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 03 Apr 2017, 08:46 AM
Hello Phuc,

I have already replied in the other thread you have opened for the same problem.

Regards,
Mihail
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
RichTextBox
Asked by
Phuc
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or