在PB 10.5中将数据窗口另存为PDF [英] Saving a datawindow as PDF in PB 10.5

查看:896
本文介绍了在PB 10.5中将数据窗口另存为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网格数据窗口,其背景为图片(尺寸为A4页),我想将数据和图片都导出为(单页)PDF文件.我使用了以下命令的几种组合,但最多只能得到0尺寸的pdf.

I have a grid datawindow with a picture in it's background (with dimensions of an A4 page) and I would like to export both data and the picture as a (single page) PDF file. I used several combinations of the following commands but at most I got a 0-sized pdf.

//dw_1.Modify("Datawindow.Export.PDF.Method = Distill! ")
//dw_1.Modify("DataWindow.Export.PDF.Method = XSLFOP! ")

dw_1.Object.DataWindow.Export.PDF.Method = Distill!
//dw_1.Object.DataWindow.Printer = "\\prntsrvr\pr-6"
dw_1.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No"
dw_1.SaveAs("c:\dw_one.pdf", PDF!, false)

用户指南(第533页)上说:

User’s guide (on page 533) says:

… the data is printed to a PostScript file and automatically distilled to PDF using GNU Ghostscript…

Installing Ghostscript

For licensing reasons, Ghostscript is not installed with PowerBuilder. You (and your users) must download and install it before you can use this technique…

有人知道程序是什么吗?

Does anyone have any idea what is the procedure?

编辑 谢谢你们.事实证明,安装ghostscript就足够了.我只不明白为什么在不使用ghostscript的情况下,某些伙伴PC上的过程成功(使用Method = XSLFOP!):-/

EDIT THANK YOU ALL. Installing ghostscript proved to be enough. I only cannot understand why the procedure is successful on some fellows PCs (using Method = XSLFOP!) without using ghostscript :-/

推荐答案

PowerBuilder的脚本和打印机设置

需要管理特权 安装打印机.我们正在使用 在XP上进行此设置.

Administrative privileges are required to install the printer. We are using this setup on XP.

这些说明使用的是HP打印机驱动程序,而不是Sybase提供的驱动程序.如果由于某种原因您没有此驱动程序,则可以从HP下载该驱动程序. HP驱动程序具有以下优点:

These instructions use an HP printer driver instead of the one supplied by Sybase. If for some reason you don't have this driver, you can download it from HP. The HP driver has the following advantages:

  • 屏幕阅读器(YMMV可以读取生成的PDF,但是 根本无法读取Sybase驱动程序的输出.)
  • 对驱动程序进行了数字签名,以将其安装在需要签名驱动程序的系统上
  • Generated PDFs can be read by a Screen Reader (YMMV, but the Sybase driver output isn't readable at all.)
  • Driver is digitally signed for installation on systems that require signed drivers

需要的文件

安装gs860w32.exe

Install gs860w32.exe

  • 安装到C:\ Program Files \ gs
  • 检查所有用户
  • 选中安装Ghostscript字体"

打印机名称为 区分大小写,并且必须准确 引号里面有什么.没有 "DataWindow"中的空格.最简单的方法 正确的是从这里复制 文档并将其粘贴.

The printer name is case-sensitive and has to be exactly what is inside the quotes. There is no space in "DataWindow". The easiest way to get it right is to copy from this document and paste it in.

  • 打开控制面板,打印机和传真
  • 选择添加打印机(下一个)
  • 选择本地打印机,取消选中自动检测并安装即插即用打印机(下一个)"
  • 选择使用以下端口,选择FILE :(下一个)
  • 在左侧列表中,为制造商选择"HP"
  • 在右侧列表中,向下滚动并选择"HP 8150 Series PS"(下一个)
  • 打印机名称"Sybase DataWindow PS"
  • 用作默认打印机,选择否"(下一个)
  • 留下不共享所选内容(下一个)
  • 打印测试页,选择否"(下一页)
  • (完成)
    • Open Control Panel, Printers and Faxes
    • Choose Add printer (next)
    • Choose Local printer, uncheck Automatically detect and install my Plug and Play printer (next)
    • Choose Use the following port, select FILE: (next)
    • In the left-hand list, select 'HP' for the manufacturer
    • In the right-hand list, scroll down and select 'HP 8150 Series PS' (next)
    • Printer name "Sybase DataWindow PS"
    • Use as default printer select No (next)
    • Leave Do not share selected (next)
    • Print test page, select No (next)
    • (finish)
    • 这篇关于在PB 10.5中将数据窗口另存为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆