无法获取PB 10.5在Windows 7上另存为PDF [英] Cannot get PB 10.5 to save as PDF on Windows 7

查看:97
本文介绍了无法获取PB 10.5在Windows 7上另存为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个内置于10.5中的应用程序,该应用程序能够在Windows XP上使用SaveAs成功创建PDF.当我移至Windows 7(32位)时,由于返回-1和长度为零的文件而失败.

I have an application built in 10.5 that was able to successfully create PDFs using SaveAs on Windows XP. When I moved to Windows 7 (32-bit), it failed by returning -1 and a zero length file.

我已经尽力了.我尝试了多个版本的Ghostscript(8.54、8.71、9.01),删除了驱动程序并重新添加了它.我也将ghostscript EXE和DLL复制到了我的应用程序目录中.

I have tried everything I can figure out. I have tried numerous version of Ghostscript (8.54, 8.71, 9.01), deleted the driver and re-added it. I copied the ghostscript EXEs and DLLs into my application directory as well.

系统变量包括GS_DLL = C:\ Program Files \ gs \ gs9.01 \ bin \ gsdll32.dll和具有C:\ Program Files \ gs \ gs9.01 \ bin \的PATH; (尝试将其列在路径的最后和最后).

System variables include a GS_DLL=C:\Program Files\gs\gs9.01\bin\gsdll32.dll and a PATH that has C:\Program Files\gs\gs9.01\bin\; in it (tried it listed first and last in the path).

添加"Sybase DataWindow PS"打印机时,将"C:\ Program Files \ gs \ gs9.01 \ lib \"指定为文件夹.我尝试共享和不共享打印机.

When I add the 'Sybase DataWindow PS' printer, I specify 'C:\Program Files\gs\gs9.01\lib\' as the folder. I have tried sharing and not sharing the printer.

我检查了中提到的所有内容PB 10.5 ,但仍然失败.

I checked everything mentioned in Saving a datawindow as PDF in PB 10.5 and that still failed.

我不知所措...还有其他想法吗?

I'm at wits end... any other ideas?

-

我应该注意,这是PB10.5,不确定是否重要.我还设置了Windows安全性,以便获得所有烦人的用户帐户控制消息框.

I should note this is PB10.5 -- not sure that matters. I also have my Windows security set up so that I get all the annoying user account control message boxes.

这是我添加打印机的方式-我相信这都是正确的

Here is how I added the printer - I believe it's all correct

添加打印机 使用现有端口,FILE :(打印到文件) 对于司机 -拥有磁盘,选择"c:\ Program Files \ gs \ gs9.01 \ lib \ ghostpdf.inf" -(替换当前驱动程序) 命名为: Sybase DataWindow PS(确认拼写)

Add A Printer Use Existing Port, FILE: (Print to File) For Driver -- Have disk, selected "c:\Program Files\gs\gs9.01\lib\ghostpdf.inf" -- (replace current driver) Named it: Sybase DataWindow PS (confirmed the spelling)

当我打印测试页时,它会创建一个177KB的PDF文件,但是当我打开它时,出现错误消息:"Adob​​e Reader无法打开'test.pdf',因为它不是受支持的文件类型,或者是因为文件已损坏(例如,它已作为电子邮件附件发送,并且未正确解码).

When I print a test page it creates a 177KB PDF file, but when I open it, I get an error: "Adobe Reader could not open 'test.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

当我尝试从记事本向其中打印内容时出现相同的错误.

Same error when I try to print something from notepad to it.

当我使用dw_1.saveAs("c:\ test \ test.pdf",PDF!)从PB应用程序打印时,它返回-1并创建大小为0的PDF.

When I print from the PB app using dw_1.saveAs( "c:\test\test.pdf", PDF! ) it returns a -1 and creates a 0 sized PDF.

我已经应用了Adobe的最新更新(似乎每天都会得到这些更新!).

I have applied the most recent Adobe update (seem to get those daily!).

我确认我有一个注册表项HKLM \ SOFTWARE \ GPL Ghostscript \ 9.01 \,其值: GS_DLL(REG_SZ)设置为C:\ Program Files \ gs \ gs9.01 \ bin \ gsdll32.dll
GS_LIB(REG_SZ)设置为C:\ Program Files \ gs \ gs9.01 \ lib; C:\ Program Files \ gs \ fonts

I confirmed I have a registry key HKLM\SOFTWARE\GPL Ghostscript\9.01\ with values: GS_DLL (REG_SZ) Set to C:\Program Files\gs\gs9.01\bin\gsdll32.dll
GS_LIB (REG_SZ) Set to C:\Program Files\gs\gs9.01\lib;C:\Program Files\gs\fonts

该目录中确实存在该DLL,并且GS_LIB引用的两个目录存在并且具有内容.

The DLL does exist in that directory and the two directories referred to by GS_LIB exist and have contents.

谢谢!

D

推荐答案

我感到您很痛苦.一年前,我经历了整个事情.

I feel your pain. I went thru this whole thing a year ago.

它的工作方式是PowerBuilder将其输出发送到打印机驱动程序.打印机驱动程序输出一个Postscript(.ps)文件. Ghostscript会获取此文件并输出PDF文件.如果您获得0字节的PDF,则可能是您的Ghostscript设置有问题.

The way it works is that PowerBuilder sends its output to the printer driver. The printer driver outputs a postscript (.ps) file. Ghostscript takes this file and outputs a PDF file. If you're getting a 0 byte PDF, it may be that something is wrong with your Ghostscript setup.

要检查的事情:

  • 是否已将打印机设置为打印到名为"FILE:"的端口?
  • 是否有指向Ghostscript的注册表项? (这是PB找到它的方式.)
  • "Sybase DataWindow PS"的拼写是否正确?
  • "Sybase DataWindow PS"是否使用PostScript打印机驱动程序?

注册表项(我认为)应该是这样的: HKLM \ SOFTWARE \ GPL Ghostscript \ 8.63 GS_DLL应该指向gsdll32.dll(可能在您的ghostscript bin文件夹中) GS_LIB是路径列表(库,字体,资源)

The registry entries (I think) should be something like this: HKLM\SOFTWARE\GPL Ghostscript\8.63 GS_DLL should point to gsdll32.dll (probably in your ghostscript bin folder) GS_LIB is a list of paths (lib, font, resource)

这篇关于无法获取PB 10.5在Windows 7上另存为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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