webform data window to print

2010-12-22  来源:本站原创  分类:DotNet  人气:113 

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",
"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
# Else
ds_report.Print ()
# End if
end if

相关文章
  • webform data window to print 2010-12-22

    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, PrintCa

  • Data window of 57 flexible technology 2010-04-12

    Data window of 57 flexible technology [sharing] 1. How to store file directory of the column, display pictures? A: Select the corresponding column of the display as picture attribute to true 2, how to copy the grid type of the selected row of data to

  • Flexible technical data window 57 2010-04-12

    Flexible technical data window 57 [share] 1 How to store the file directory list to show picture? A: Select the column corresponding to the display as picture attribute to true 2, how to copy the selected grid row type of data to the system clipboard

  • Javascript print 2009-08-26

    Print <HTML> <HEAD> <TITLE> javascript - Print Page Setup - Print Preview code </ TITLE> <META Http-equiv=Content-Type content="text/html; charset=gb2312" /> <SCRIPT Language=javascript> function printsetup ()

  • JNA to achieve the window minimized 2010-03-20

    Original Published time :2009-06-27 This learning process is as follows icon (the picture shows the entire working part of the mind map): Development Environment: JDK 1.5 (to compile target version 1.4) JNA 3.0.9 (development time version, it will sw

  • Several programs WEB Print 2010-03-28

    ------------------------------------------- Web-based printing solutions for a more Analysis -------------------------------- Printing With web-based, the difficulty lies in the browser to render html, accurate print to paper, but also enables the lo

  • Window.Open () parameter window.showModalDialog () parameters 2010-08-07

    Window.Open () parameters: <SCRIPT LANGUAGE="javascript"> <! - window.open ('page.html', 'newwindow', 'height = 100, width = 400, top = 0, left = 0, toolbar = no, menubar = no, scrollbars = no, resizable = no, location = no , status = n

  • PB, from the serial communication program-controlled exchange billing data access API calls 2010-08-13

    I realized by calling the API : If you are using a binary, please change the buffer BLOB Type . First define the external function : Function Boolean CloseHandle(ulong hObject ) Library "kernel32.dll" FUNCTION boolean ReadFile(ulong fhand, &

  • PB, from the serial communication for PBX call accounting data API 2010-08-13

    I realized by calling the API : If you are using a binary, please change the buffer BLOB Type . First define the external function : Function Boolean CloseHandle(ulong hObject ) Library "kernel32.dll" FUNCTION boolean ReadFile(ulong fhand, &

  • A brief introduction on the WPF data binding and entry 2010-09-02

    Today, an afternoon out of the data binding, as previously gladly talked with FLEX data binding, and thinking as, causing difficult to understand WPF data binding, encountered several problems 1. Do not know how entry 2. Examples are too deep to find

  • sessvars ---- a plug-Chinese documents produced by window.name store front session plugin js 2010-11-30

    Transfer from: http://blog.csdn.net/lgg201/archive/2010/09/23/5902321.aspx Plug the official address: http://www.thomasfrank.se/sessionvars.html Download: http://www.thomasfrank.se/sessvars.js Original Address: http://www.thomasfrank.se/sessionvars.h

  • oracle analytical functions over and the window function 2010-03-07

    A : Analysis function over Oracle From the start to provide analysis function 8.1.6 , Analysis of the function is used to calculate a group based on the aggregate values, and aggregate functions that For each group returns multiple rows, the aggregat

  • window.opener difference with window.parent 2010-04-10

    If we use the value to the iframe to another frame is necessary to use window.opener.document.getElementById (name). Value = uvalue; this form of Oh. window.parent can get a frame of the parent window or parent frame. Top-level reference to the paren

  • window initialization events 2010-04-14

    Window of each event: activate event is to become the active window before the window, open the event to trigger after the completion trigger. The event trigger is the minimum value of the control tab gets the focus, without visual control, then the

  • window.name Transport 2010-05-06

    Afternoon to write the code when it came to a cross-domain transfer problem, guy next door dojo group suggested that I use dojox.io.windowName, so I intend to find some information to see the results of the discovery found almost no information, even

  • TextFileTest_ print stream usage 2010-07-06

    * package com.io.TextFileTest; import java.io.*; import java.util.*; /** * @version 1.12 2007-06-22 * @author Cay Horstmann */ public class TextFileTest { public static void main(String[] args) { Employee[] staff = new Employee[4]; staff[0] = new Emp

  • Oracle Grammar OVER (PARTITION BY ..) and the window function is reproduced 2010-07-27

    oracle analytical functions over and a window function: analysis of function over Oracle began offering analysis functions from 8.1.6 to analyze the function used to calculate the aggregate value based on a certain group, it's the difference between

  • [Change] large data with high concurrent database optimization (1) - [Research] 2010-08-18

    First, the design of database structure If you can not design a rational database model will not only increase client and server, the programming and maintenance section of the difficulty, and will affect the system operation performance. So, before

  • Massive Data Analysis: Sawzall parallel processing (English version of a paper) 2010-08-24

    Google's engineers to facilitate the use of internal staff MapReduce, Sawzall developed called the DSL, while Hadoop also introduced a similar Sawzall's Pig language, but in the syntax above is quite different. Today, we posted about Sawall gave a pa

  • Oracle Grammar OVER (PARTITION BY ..) and the window function 2010-11-11

    A: Analysis of function over Oracle began offering analysis functions from 8.1.6 to analyze the function used to calculate the aggregate value based on some kind of group it and the difference between aggregate function is to return multiple rows for