Forum Discussion

JShoemaker's avatar
JShoemaker
New Contributor III
2 years ago

Top Margin on a PDF

Hi,

We have adjusted the top margin to all kinds of numbers, however it still doesnt seem to shrink. I have removed the log from the extender rule but it seems like there is a margin default. I have also tried to look at removing the blue line header to see if that helps but cant seem to find the proper rule for that. Any suggestions to get this top margin basically down to a very little space? The report needs to fit on one page so we took the font down and it works but would like to find a little more space if possible. Thanks!

  • JackLacava's avatar
    JackLacava
    2 years ago

    Works for me on 7.4.2. Default margin:

    Setting top to zero:

    You can force further shrinkage (at your peril) to effectively pull up the actual table:

    As for blue bars: the thick one is PageHeaderLabelBar, the thin one is PageHeaderLine. We can suppress both like this:

    Case Is = CVExtenderFunctionType.FormatReportUIItem
    	Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
    		If uiItem.UIItemType = XFReportUIItemType.PageHeaderLabelBar _
    			Or uiItem.UIItemType = XFReportUIItemType.PageHeaderLine Then
    		uiItem.Visible = False
    		Return uiItem
    	End If
    

    Unfortunately it's a bit hard at the moment to find documentation for this stuff, because Intellisense doesn't pick up CVExtenderReportUIItem properly (don't know why). The best resource is the API Guide in Windows Help format, which is not available after v.7.0 (and really the last properly-produced one is in 6.5).

     

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Could you post the relevant bit of your CV Extender, so that we can look at what might be going wrong...?

  • JShoemaker's avatar
    JShoemaker
    New Contributor III

    Sure...

    Case Is = CVExtenderFunctionType.FormatReportUIItem
    	Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
    	Dim reportOptions As New CVExtenderReportOptions
    	If uiItem.UIItemType = XFReportUIItemType.PageHeaderPictureBoxLogo Then
    		uiItem.Visible = False
    	End If
    
    Case Is = CVExtenderFunctionType.GetReportOptions
    	Dim reportOptions As New CVExtenderReportOptions()
    	reportOptions.ReportMarginTop = 0
    	Return reportOptions
    		

     

     
    End Select
    Return Nothing
    • JackLacava's avatar
      JackLacava
      Honored Contributor

      Works for me on 7.4.2. Default margin:

      Setting top to zero:

      You can force further shrinkage (at your peril) to effectively pull up the actual table:

      As for blue bars: the thick one is PageHeaderLabelBar, the thin one is PageHeaderLine. We can suppress both like this:

      Case Is = CVExtenderFunctionType.FormatReportUIItem
      	Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
      		If uiItem.UIItemType = XFReportUIItemType.PageHeaderLabelBar _
      			Or uiItem.UIItemType = XFReportUIItemType.PageHeaderLine Then
      		uiItem.Visible = False
      		Return uiItem
      	End If
      

      Unfortunately it's a bit hard at the moment to find documentation for this stuff, because Intellisense doesn't pick up CVExtenderReportUIItem properly (don't know why). The best resource is the API Guide in Windows Help format, which is not available after v.7.0 (and really the last properly-produced one is in 6.5).

       

      • JShoemaker's avatar
        JShoemaker
        New Contributor III

        Thanks Jack, that removed the line and gave us a little more wiggle room