In web development, print first on the server side to create a pdf file, and then through the client browser to open the pdf file for printing, of course, you can download the pdf file of local re-printing.
Can support the function has Print, PrintCancel, PrintClose, PrintDefineFontDefine, PrintLine, PrintOpen, PrintOval, PrintPage, PrintRect, PrintRoundRect, PrintSetSpacing, PrintText, PrintWidth, PrintX, PrintY. PrintSetFont
When the program calls the print function, which will appear in the upper right corner of the window of the printer icon, click on it will pop up the Print Management window, click to open the pdf can be printed
But be noted that, the server must install a virtual printer, sybase require the installation (or can be considered to be recommended) ghostscript support output PDF type of print output: ftp://mirror.cs.wisc.edu/pub/mirrors/ ghost/AFPL/gs851/gs851w32.exe, and the printer name "Sybase DataWindow PS", in fact, this is the datawindow print the default printer settings, of course, can be modified for other names, but I recommend the initial use or in full accordance with the sybase required to do, it will avoid other problems.
ghostscript wait two days the specific installation instructions make up. . . .
Today make up the
1, download ghostscript.
2, in the IIS installed on the server GS.
3, install the printer. In the "Control Panel"> "Printers and Faxes"> "Add Printer", which automatically detect the process of the hook that went, the default port LPT1 can. Driver selection to choose from the "Disk"> "Sybase \ Shared \ PowerBuilder \ drivers",
At this point select the inf file Adobe manufacturers "ADIST5.INF", read to the five drivers:
"Acrobat Distiller CS",
"Acrobat Distiller CT",
"Acrobat Distiller J",
"Acrobat Distiller K"
Select the first "Acrobat Distiller" (the other four can be, what difference do not know even now), the next step can be> "installed"
4, the newly installed printing as the default, then rename the Sybase DataWindow PS;
If the server is not installed above the printer, such an error occurs: SaveAS did not complete successfully, return code is: -1.
Another way to download: the calling code to a simple
if ds_report.RowCount ()> 0 then
# If defined PBWEBFORM then
if ds_report.SaveAs ("myreport.pdf", PDF!, TRUE) <> -1 then
DownloadFile ("myreport.pdf", true)
# End if