前往Shuct.Net首页

Shudepb PB反编译专家长时间以来,为业内同类软件事实上的唯一选择.细节,彰显专业.态度,决定品质.

关于PowerBuilder的搜索

PowerBuilder - Saving a datawindow as PDF in PB 10.5 - Stack Overflow current community chat blog Stack Overflow Meta Stack Overflow Careers 2.0 more stack exchange communities Stack Exchange sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site careers 2.0 Stack Overflow Questions Tags Tour Users Ask Question Take the 2-minute tour × Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required. Saving a datawindow as PDF in PB 10.5 up vote 7 down vote favorite 3 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) User鈥檚 guide (on page 533) says: 鈥 the data is printed to a PostScript file and automatically distilled to PDF using GNU Ghostscript鈥PowerBuilder datawindow share|improve this question edited Mar 21 '10 at 9:02 asked Mar 17 '10 at 9:12 George Dontas 11.4k33672 add comment 5 Answers active oldest votes up vote 9 down vote accepted Ghostscript and Printer setup for PowerBuilder Administrative privileges are required to install the printer. We are using this setup on XP. 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: 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 Needed files gs860w32.exe from http://pages.cs.wisc.edu/~ghost/ (you can try a later version if you like. 8.60 is working fine for us.) Driver files in C:\Program Files\Sybase\Shared\PowerBuilder\drivers (path may vary depending on installation) Ghostscript Install gs860w32.exe Install to C:\Program Files\gs Check All Users Check Install Ghostscript Fonts Sybase DataWindow PS Printer The printer name is case-sensitive and has to be exactly what is inside the quotes. There is no space in 鈥淒ataWindow鈥. The easiest way to get it right is to copy from this document and paste it in. 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) share|improve this answer answered Mar 17 '10 at 15:08 Hugh Brackett 2,141414 add comment up vote 0 down vote The problem with ghostscript is that the drivers are not signed. This is a big issue in Windows 8, in that it will just stop the installation of the drivers. Windows 7 you were informed what was happening and allowed to install the drivers. Windows 8 just stops the install of the drivers, you can prove this by trying to create a printer with the ghostscript files. Currently working through the HP PS drivers to try and identify a workaround for the Windows 8 operating system. share|improve this answer answered Aug 8 '13 at 14:44 Gary 1 add comment up vote 3 down vote As a minor addition to the others, I've never had to Modify() any of the Export attributes; I just SaveAs(). My understanding is that these attributes are for trying to go non-Ghostscript routes, but I don't recall hearing of anyone successfully doing this. To simplify your test, you might want to see if you can right click on the Preview pane in the DataWindow painter to see if there is a "Save Rows As..." option. (I don't have 10.5 installed at the moment, so I can't see if it's available in that version.) It will save you running the app, and at least test the basic functionality before getting it to run in PowerScript. Good luck, Terry. share|improve this answer answered Mar 17 '10 at 15:54 Terry 4,927614 No Modify() here either. We just saveAs(). – Hugh Brackett Mar 18 '10 at 3:04 @Terry I am on PB 12.5 classic on Win7 x64 with both GS x64 and x32. Both are failing. I am trying from the preview window and it is giving an error that Save As failed. Any idea what it could be? I am getting a 0 byte file. – somnath Apr 5 '13 at 20:23 Sounds like PB can't find GhostScript. Have you manually moved it since installation? The installed location is stored in the registry, e.g. HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.07, which is at least one of the places PB looks to find it. If that doesn't produce obvious results, I'd (SysInternals') Process Monitor it. – Terry Apr 8 '13 at 13:24 add comment up vote 4 down vote Your code looks fine and is in line with my code that I just checked that does something similar. Verify that ghostscript is installed correctly. For debugging purposes I would try using a much simpler datawindow without the bitmap background. share|improve this answer answered Mar 17 '10 at 12:48 user295652 add comment up vote 4 down vote We've got it working here. From our internal wiki: Install ghostscript on your workstation (8.50 or 8.15 recommended) Make sure that the ghostscript files in the Powerbuilder DLL directory Ensure that there is a directory in the same place containing the default postscript drivers supplied by Sybase. Powerbuilder uses the Adobe Postscript Driver (which can be downloaded free from Adobe.com). This must be named 'Adobe DataWindow PS' We're using version 1.06 of the postscript driver which you can download here: Adobe PostScript printer drivers for Windows share|improve this answer answered Mar 17 '10 at 12:39 Colin Pickard 22.7k34987 add comment Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Stack Exchange Post as a guest Name Email required, but not shown Post as a guest Name Email required, but not shown discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged pdf PowerBuilder datawindow or ask your own question. tagged pdf × 15412 PowerBuilder × 608 datawindow × 99 asked 3 years ago viewed 11656 times active 6 months ago Community Bulletin event Moderator candidates' answers to your questions – ends in 2 days event 2014 Community Moderator Election – ends in 2 days Linked 2 Creating PDF file in PowerBuilder 2 Cannot get PB 10.5 to save as PDF on Windows 7 2 Powerbuilder 12 cannot save as pdf datawindow 0 PowerBuilder 12.5 Classic GhostScript blank pdf Related 1 PowerBuilder: insert data using datawindow 2 Powerbuilder 12 cannot save as pdf datawindow 2 Cannot get PB 10.5 to save as PDF on Windows 7 0 Export DataWindow to PDF 1 PowerBuilder DataWindows 1 How do I get a DataWindow to save correctly to PDF? 1 Powerbuilder Datawindow Crosstab Display 2 DataWindow displays contents in Debug, but not in RunTime 1 PowerBuilder 12.5 Classic PDF SaveAs creating files of 0 size on Win7 x64 0 PowerBuilder datawindow update error Hot Network Questions What is the correct way to get a pgfkey value? Are there other types of Elves in HP? Business Cards: should I design in InDesign, Illustrator or Photoshop? Does electron in wave form have mass? A translation of the Cantor set contained in the irrationals How to go about paying bills at home during an overseas trip? Optimization of file scanner Is using SHA-512 for storing passwords tolerable? Program that creates larger versions of itself (quine-variant) Is doing two PHDs a good path? A program that ends but never ends Is AC really as powerful as I think it is? Why is this not a closed set? Schrödinger's Bitmask? Simple intermediate value theorem proof How I could add an image in the bottom of pages of my document When do you use 鍞 instead of 鍚 to end a sentence? Controlling ListPlot Line Colors I don't get this joke. Is it some kind of play on "water, too?" Why is the full plate armor penalty only -6? How to manage resource locality? Why is there antagonism towards extended real numbers? Why is the moment of inertia for a hollow sphere higher than a uniform sphere? Did I overstep my power as DM? more hot questions question feed about help badges blog chat data legal privacy policy jobs advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Other Stack Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development TeX - LaTeX Programmers Unix & Linux Ask Different (Apple) WordPress Answers Geographic Information Systems Electrical Engineering Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica more (14) Photography Science Fiction & Fantasy Seasoned Advice (cooking) Home Improvement more (13) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity Arqade (gaming) Bicycles Role-playing Games more (21) Mathematics Cross Validated (stats) Theoretical Computer Science Physics MathOverflow more (7) Stack Apps Meta Stack Overflow Area 51 Stack Overflow Careers site design / logo © 2014 stack exchange inc; user contributions licensed under cc by-sa 3.0 with attribution required rev 2014.2.24.1391 Stack Overflow works best with JavaScript enabled