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

    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. 


    I've attached images of the preview and the actual print.


     


    http://docs.google.com/View?docID=dgjm2577_0hb33fncg&revision=_latest&hgd=1


     


     Here is my code:


        Public Sub Print(ByVal sheetNumber As Integer, ByVal preview As Boolean, Optional ByVal header As String = Nothing, Optional ByVal footer As String = Nothing)
          Try
             '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
             Next


             ' 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
                Else
                   .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
             Me.PrintSheet(Sheets(sheetNumber))
          Catch ex As Exception
             Throw
          End Try
       End Sub

  • Replied 8 September 2017, 1:27 pm EST

    Hello,


    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

    Hello,


    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