Pb11.5 web development-print

Source: Internet
Author: User
Tags sybase acrobat distiller

Pb11.5 is different from the original windows program in Web development.

In web development, you must first create a PDF file on the server, and then open the PDF file in the client browser to print the file. Of course, you can also download the PDF file locally and then print it.

Supported functions include:Print,Printcancel,Printclose,Printdefinefontdefine,Printline,Printopen,Printoval,Printpage,Printrect,Printroundrect,Printsetspacing,Printtext,Printwidth,Printx,Printy.Printsetfont

When the print function is called in the program, the printer icon appears in the upper-right corner of the window. Click it to display the print Management window, and click open the PDF to be printed.

 

But it should be noted that a virtual printer must be installed on the server, Sybase requires installation (or can also be considered as recommended) ghostscript supports output of PDF Type print output: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs851/gs851w32.exe, and name the printer "sybase datawindow Ps". In fact, this is the default printer settings in datawindow printing. You can also change it to another name, however, we recommend that you use it for the first time in accordance with Sybase's requirements to avoid other problems.

 

Install ghostscript in two days ....

Add this today

1. You can select the latest version to download ghostscript. Check the downloaded version. I use Windows

2. Install Gs on the IIS server. I installed it on my own machine. All of them are installed by default.

3. Install the printer. In the "control panel"> "printer and fax"> "Add Printer", check the auto-check. The default port is LPT1. Select the driver from "disk installation"> "Sybase/shared/PowerBuilder/drivers ",
Select the Adobe vendor's INF file "adist5.inf" and read the following five drivers:
"Acrobat Distiller ",
"Acrobat Distiller CS ",
"Acrobat Distiller CT ",
"Acrobat Distiller J ",
"Acrobat Distiller K"
Select the first "Acrobat Distiller" (the other four can also be used, but I still don't know the difference). Next, click "Finish installation"

4. Set the new printing to the default one, and rename it Sybase datawindow ps;

 

If the above printer is not installed on the server, the following error occurs: saveas did not complete successfully, return code is:-1.

 

Another download method: give a simple call code

If ds_report.rowcount ()> 0 then
# If defined pbwebform then
If ds_report.saveas ("myreport.pdf", PDF !, True) <>-1 then
Downloadfile ("myreport#", true)
End if
# Else
Ds_report.print ()
# End if
End if

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.