Posted 27 September 2017, 9:09 pm EST
Hi,
i have a big problem with C1FlexView, which can be easily reproduced.
- Create a brand new project.
- Add a C1FlexViewer control (default name will is C1FlexViewer1)
- Add a C1PdfDocumentSource (default name will be C1PdfDocumentSource1)
- For both controls, associate the Document property to C1PdfDocumentSource1
- Create a sub and add it to FormLoad event (or a new button click event):
[vb]
Private Sub Test()
Dim Doc As New C1PrintDocument Dim MultiDoc As New C1MultiDocument With Doc Dim Tabella As New RenderTable(2, 2) With Tabella .Style.Borders.All = New LineDef(New Unit(0.25, UnitTypeEnum.Display), Color.Black) .Cells(0, 0).Text = "Row 1 Col 1" .Cells(1, 1).Text = "Row 2 Col 2" 'Below, the offending 2 lines of code (reffered to C1FlexViewer) .CellStyle.Borders.Left = New LineDef(New Unit(0.25, UnitTypeEnum.Display), Color.Black) .CellStyle.Borders.Bottom = New LineDef(New Unit(0.25, UnitTypeEnum.Display), Color.Black) 'If commented, those 2 lines won't create any kinda visual issue End With .Body.Children.Add(Tabella) .Generate() End With Dim tmp as String = Path.GetTempFileName 'Add the reference --> [i]Imports System.IO[/i] MultiDoc.Items.Add(Doc) Dim PDFExport As New Export.PdfExportProvider Dim ORange As New OutputRange With {.MaxPageNumber = -1} MultiDoc.Export(tmp, PDFExport, ORange, True) C1PdfDocSource.DocumentLocation = tmp
End Sub
[/vb]
At the moment we have only 1 PDF (tmp variable) and it is attached.
Anyway, even in simple PDF visualization into C1FlexViewer u can see that issue: if we export from itself, we’ll have the corrupted PDF (also attached).
Hope to find a workaround!
Thanks.
Regards,
Fabio La Vitola