Print does not look like preview

Posted by: robinspicer on 8 September 2017, 1:27 pm EST

  • Posted 8 September 2017, 1:27 pm EST

    <FONT size=3>My print preview look correct, but when I print, the heading is futher down the page, pushing the footer off the page and the margins do not look correct.  </FONT>

    <FONT size=3>I've attached images of the preview and the actual print.</FONT>



     <FONT size=3>Here is my code:</FONT>

        Public Sub Print(ByVal sheetNumber As Integer, ByVal preview As Boolean, Optional ByVal header As String = Nothing, Optional ByVal footer As String = Nothing)
             'Calculate total width of all columns
             Dim orientationWidth As Single

             For Each column As FarPoint.Win.Spread.Column In Me.Sheets(sheetNumber).Columns
                orientationWidth += column.Width

             ' Define the printer settings
             Dim printset As New FarPoint.Win.Spread.PrintInfo()

             With printset
                .AbortMessage = "Cancel printing?"
                .BestFitCols = True
                .BestFitRows = True
                .Centering = FarPoint.Win.Spread.Centering.Horizontal
                .FirstPageNumber = 1
                If footer IsNot Nothing Then .Footer = footer
                If header IsNot Nothing Then .Header = header
                .JobName = "Print Job"

                If orientationWidth > 850 Then
                   .Orientation = FarPoint.Win.Spread.PrintOrientation.Landscape
                   .Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait
                End If

                .PageOrder = FarPoint.Win.Spread.PrintPageOrder.OverThenDown
                .Preview = preview
                .PrintNotes = FarPoint.Win.Spread.PrintNotes.None
                .PrintShapes = True
                .PrintType = FarPoint.Win.Spread.PrintType.All
                .ShowBorder = True
                .ShowColor = True
                .ShowColumnHeaders = True
                .ShowGrid = True
                .ShowPrintDialog = True
                .ShowRowHeaders = True
                .ShowShadows = True
                .UseMax = False
             End With

             ' Assign the printer settings
             Sheets(sheetNumber).PrintInfo = printset

             'Print the sheet
          Catch ex As Exception
          End Try
       End Sub

  • Replied 8 September 2017, 1:27 pm EST


    Make sure you are using the latest maintenance release of Spread. We did have a bug resulting in what you are seeing that has been fixed.

  • Replied 8 September 2017, 1:27 pm EST

    In which maintenance release of spread was this bug fixed?
  • Replied 8 September 2017, 1:27 pm EST


    I am not positive. I believe it was the latest (version 4.0.2005 and 3.0.2009.

Need extra support?

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

Learn More

Forum Channels