Foxtable(狐表)用户栏目专家坐堂 → [求助]窗口打印问题


  共有2493人关注过本帖树形打印复制链接

主题:[求助]窗口打印问题

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/6/12 17:29:00 [显示全部帖子]

1、用代码处理一下

 

Dim doc As PrintDoc = e.Form.GernatePrintDoc()

For Each c As object In Doc.Body.Children
    If c.Gettype.Name Like "*Table*" Then
        Dim t As prt.RenderTable = c
        t.Rows(0).Height = 30
        t.Rows(0).Style.BackColor = Color.Red
        t.Rows(0).Style.Font = New Font("宋体", 12, FontStyle.Bold) '设置字体
        For i As Integer = 0 To t.Cols.Count - 1
            t.Cells(0,i).Style.TextAlignHorz = prt.AlignHorzEnum.Center
        Next
    End If
Next

doc.Preview

 

2、可以参考

 

Dim fl As String = "c:\data\test.pdf"
doc.SavePDF(fl) '保存为PDF文件
Dim Proc As New Process '打开PDF文件
Proc.File = fl
Proc.Start()


 回到顶部