PDF-Export is sometimes not working

Posted by: basti on 8 September 2017, 2:40 pm EST

  • Posted 8 September 2017, 2:40 pm EST

     


    Hello,


    I'm trying to export my Spread-Data to PDF. I'm using the latest FarPoint 5 Spread for Windows Forms. In some cases the export works very well, but sometimes the ExportFunction creates a 0-byte-PDF and when I'm tying to open the exported PDF, it says "FDF corrupt..."


    As you can see in the attached Screenshot, the Spread is filled with data, but nothing is exported!


    Here is the code for my pdf-export:


    Dim f As New System.Windows.Forms.SaveFileDialog


    Dim printset As New FarPoint.Win.Spread.PrintInfo


     


    'Export des FarPoint Grids


    With f


    .Filter = _


    "PDF-Dateien (*.pdf)|*.pdf|Alle Dateien (*.*)|*.*"


    .FilterIndex = 1


    .Title = My.Application.cParameter.Get_Meldung(93)


    If .ShowDialog = Windows.Forms.DialogResult.OK Then


    printset.PdfWriteMode = FarPoint.Win.Spread.PdfWriteMode.New


    printset.PrintToPdf = True


    'printset.PdfStream = c


    printset.PdfWriteTo = FarPoint.Win.Spread.PdfWriteTo.File


    printset.PdfFileName = f.FileName


    printset.Preview = False


    printset.ShowColor = True


    Dim dr() As DataRow = My.Application.cAktKst.Gruppen.Select("Gruppen_ID=" & My.Application.cAktKst.GruppenID)


    printset.Header = "/fb1/fz""12""QuAP - Matrix Umfeld: " + tscmbUmfeld.Text + vbNewLine + "Gruppe: " + dr(0).Item("Gruppenname")


    printset.HeaderHeight = 70


    sprMatrixUmfeld.Sheets(0).PrintInfo = printset


    sprMatrixUmfeld.PrintSheet(-1)


    MsgBox(My.Application.cParameter.Get_Meldung(111), MsgBoxStyle.Information)


    Else


    Exit Sub


    End If


    End With


     


    I hope you can help me! It seems to be verry urgent for us! I can't send you our project, because it is too complex and as I said sometimes the export works, sometimes not!



  • Replied 8 September 2017, 2:40 pm EST

    Do you have a data set that reliably fails to export to pdf?

    If the answer to the last question was no then do you have any general information that would help us to see your issue?

    If the answer was yes then does it export to excel or xml or text?

    If the last answer was no, can you create a small sample app that creates the data that fails to export? 

    If you export to these other formats then reload it does it continue to fail to export to pdf?

    If the answer to that last question was yes can you send us the excel, xml, or text file?

    If it was no can you create a small sample app that creates the data that fails to export?

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels