zoukankan      html  css  js  c++  java
  • place content in the center of pdf

    Sub ConvertPDFCenter()
    
        Dim workPath
        workPath = ThisWorkbook.Path
        With ActiveSheet.PageSetup
            .LeftMargin = Application.InchesToPoints(0.708661417322835)
            .RightMargin = Application.InchesToPoints(0.708661417322835)
            .TopMargin = Application.InchesToPoints(0.748031496062992)
            .BottomMargin = Application.InchesToPoints(0.748031496062992)
            .HeaderMargin = Application.InchesToPoints(0.31496062992126)
            .FooterMargin = Application.InchesToPoints(0.31496062992126)
            .PrintHeadings = False
            .PrintGridlines = False
            .PrintComments = xlPrintNoComments
            .PrintQuality = 600
            .CenterHorizontally = True
            .CenterVertically = False
            .Orientation = xlPortrait
            .Draft = False
            .PaperSize = xlPaperA4
            .FirstPageNumber = xlAutomatic
            .Order = xlDownThenOver
            .BlackAndWhite = False
            .Zoom = 100
            .PrintErrors = xlPrintErrorsDisplayed
            .OddAndEvenPagesHeaderFooter = False
            .DifferentFirstPageHeaderFooter = False
            .ScaleWithDocHeaderFooter = True
            .AlignMarginsHeaderFooter = True
        End With
        
        Range("A1:D16").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
            workPath & "	.pdf", Quality:= _
            xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
            OpenAfterPublish:=True
    End Sub
    
    
        ActiveWindow.View = xlPageBreakPreview
        ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1
    
  • 相关阅读:
    python wsdl connection refused 111
    我要学算法
    linux 定时任务
    mysql语句
    Firefox配置Fiddler
    windows下安装spynner
    做一个完整的项目需要技能
    快速排序
    《实时控制软件设计》总结
    asp实现在微信jsdk分享从a页面跳转到b页面然后分享后点开又回a页面
  • 原文地址:https://www.cnblogs.com/otfsenter/p/7490769.html
Copyright © 2011-2022 走看看