Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Reply To: C1DataGrid Export to PDF

$
0
0

I already have the solution but I have another question.

I want to create the PDF and print it.

Now this is my code:

 Using objMemoryStream As New MemoryStream
            Dim objDoc As New C1.Silverlight.Pdf.C1PdfDocument
            objDoc.DocumentInfo.Title = "test"
            objDoc = C1DataGridPdfExtension.ToPdf(Me.datagrid, objDoc, New PrintDetails With {.Header = "Kontaktliste", .Header1 = "Monat 12″, .Header2 = "test"})
            objDoc.Save(objMemoryStream)
            Using objMem As New MemoryStream(objMemoryStream.ToArray)
               Dim objPDFViewer As New C1.Silverlight.PdfViewer.C1PdfViewer


               objPDFViewer.LoadDocument(objMem)
               objPDFViewer.PrintDocument("test", useDefaultPrinter:=True)
            End Using
         End Using

The problem now is the performance.
If I export it directly the document has 10,6 kb. If I load it with the PDFViewer and print it it has 6,5 MB!!!!

It takes till 5 minutes to print the document. Why is the document so big?

Regards


Viewing all articles
Browse latest Browse all 14170

Trending Articles