HI, I have a problem to export my document to PDF file radrichtexbox to the error shown is: "Operation is not valid due to the current state of the object".
This happens sometimes, it seems the problem is in the format that takes the document to put bullets.
My process for creating the PDF document is:
Try
ProviderPdf Dim As New PdfFormatProvider PdfFormatProvider = ()
Using output As Stream = File.Open (AppDomain.CurrentDomain.BaseDirectory & "\ temp \" & Label1.Content &. "Pdf", FileMode.Create)
providerPdf.Export (RadRichTextBox1.Document, output)
End Using
Catch ex As Exception
MsgBox (ex.ToString)
End Try
The stack trace is:
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfFontPool.get_Item (Span span) in 54
in writer, Paragraph Paragraph, RectangleF rect) in 64
in writer, Paragraph paragraph) in 84
in sectionBox, PdfContentsWriter writer) in 283
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.ExportPage (SectionLayoutBox sectionBox, PdfContentsWriter writer) in 343
in contentsWriter) in 375
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfContents.WriteContents (pdfwrite writer) in 22
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfStream.WriteToCore (pdfwrite writer) in 57
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfObject.WriteTo (pdfwrite writer) in 42
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfWriter.WritePdfObject (PdfObject obj) in 56
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.Export () in 386
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfFormatProvider.Export (RadDocument document, Stream output) at 56
in WPF_Dictado.Window1.parametrospdf () in C: \ Documents and Settings \ Administrator \ Desktop \ WPD_Dictado RIS \ WPF Dictation \ Window1.xaml.vb: line 1066
I would greatly appreciate the help I can provide.
This happens sometimes, it seems the problem is in the format that takes the document to put bullets.
My process for creating the PDF document is:
Try
ProviderPdf Dim As New PdfFormatProvider PdfFormatProvider = ()
Using output As Stream = File.Open (AppDomain.CurrentDomain.BaseDirectory & "\ temp \" & Label1.Content &. "Pdf", FileMode.Create)
providerPdf.Export (RadRichTextBox1.Document, output)
End Using
Catch ex As Exception
MsgBox (ex.ToString)
End Try
The stack trace is:
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfFontPool.get_Item (Span span) in 54
in writer, Paragraph Paragraph, RectangleF rect) in 64
in writer, Paragraph paragraph) in 84
in sectionBox, PdfContentsWriter writer) in 283
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.ExportPage (SectionLayoutBox sectionBox, PdfContentsWriter writer) in 343
in contentsWriter) in 375
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfContents.WriteContents (pdfwrite writer) in 22
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfStream.WriteToCore (pdfwrite writer) in 57
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfObject.WriteTo (pdfwrite writer) in 42
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfWriter.WritePdfObject (PdfObject obj) in 56
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.Export () in 386
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfFormatProvider.Export (RadDocument document, Stream output) at 56
in WPF_Dictado.Window1.parametrospdf () in C: \ Documents and Settings \ Administrator \ Desktop \ WPD_Dictado RIS \ WPF Dictation \ Window1.xaml.vb: line 1066
I would greatly appreciate the help I can provide.