跳到主内容

搜索

搜索

Bartender.print.messages Error While Exporting Printpreview To File

评论

2 条评论

  • Avatar
    Legacy Poster

    Just a thought...I set a breakpoint on the call to the background thread and checked the visualizer for btFormat, At the bottom of the log I found this message...

     

    The ExportPrintPreviewToFile method requires Enterprise Automation edition. The
    BarTender {0} edition is currently installed.

     

    could this be causing the issue, since the code worked fine before, even today. It does not work now.

     

    Thanks again.

    0
  • Avatar
    Legacy Poster

    As it turns out I slept on it and decided to check the messages with code...found a bit in the sample files..And my new found error was due to me assigning the printer programmatically, when I bulk load my formats. I now have seven printer names that are invalid since they are not connected to my development machine, only 1 is.

     

    Just thought I'd share...

     

     Private Sub backgroundWorker_RunWorkerCompleted(ByVal sender As Object, ByVal e As RunWorkerCompletedEventArgs) Handles backgroundWorker.RunWorkerCompleted
            Try
                If messages IsNot Nothing Then
    
                    If messages.Count > 5 Then
                        MessageBox.Show(Me, "There are more than 5 messages from the print preview. Only the first 5 will be displayed.", appName)
                    End If
                    Dim count As Integer = 0
    
                    For Each message As Seagull.BarTender.Print.Message In messages
                        MessageBox.Show(Me, message.Text, appName)
                        ' if (++count >= 5)
                        count += 1
                        If count >= 5 Then
                            Exit For
                        End If
                    Next message
                End If
                ShowPreview()
    
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
    
    
    
        End Sub
    
    0

请先登录再写评论。