Web-based Document Conversion Sample for web-based Printing

Description:

Demonstrates how to print to the Black Ice printer drivers using ASP, for web based printing.  In order to use this sample, developers should refer to the following

 

1.The sample is written to be used with the Black Ice PDF (Demo) printer driver. In order for the sample to be used with a different Black Ice Printer Driver make sure that you modify the printer name in the ASP source code (In the StartCapture function call in Print.asp).

 

2.This sample requires an Internet Information Services server. These instructions were tested on IIS 7, Windows 2008.

 

3.The ASP sample uses the PrintWrapper.ocx to capture the Printer Driver messages. This control must be registered on the server. To register the control, open a command prompt with administrator privileges, navigate to the directory of the ocx file and type in the following command:

            Regsvr32 PrintWrapper.ocx

 

The ocx file is located in the following directory by default:

<RTK Installation Folder>\Printer Driver Resource Toolkit\ Samples\PrintWrapper.ocx

 

4. The sample uses notepad.exe to print a text file. The sample must run in an account that is able to access the Black Ice Printer, and the Black Ice Printer is set as the default printer on that account.

 

In the IIS 7 server manager, select the application pool of the sample, click “Advanced Settings…” on the sidebar. Change the user account in the “Identity” field to a user that has the Black Ice Printer Driver set as default printer.


The default NetworkService user is not able to see the Black Ice Printer. You can specify any regular user account here by clicking on the button on the right (“…”).

 

You cannot use a system account like like LocalSystem or NetworkService, because notepad is not able to print when started using these accounts.

 

5.The Black Ice Printer must be configured to generate the output images (PDF files) into the ASP home directory, to allow for displaying of the PDF files on the client side.

 

Log in to the account you specified in step 4 and set the Output Directory by right clicking on the Black Ice Printer, select Printing Preferences and specify the full path to the output directory on the Filename Generation tab.

 

Components needed/used by the ASP sample

 

Print Wrapper OCX

Wrapper class for ASP. This OCX handles capturing the messages using the Black Ice messaging Interface.  Source for the Print Wrapper OCX is available written in  C++ in the following subfolders of the OCX folder:

 

<RTK Installation Folder>\Printer Driver Resource Toolkit\ Samples\Sample Source Codes\OCX\C++ Print Wrapper OCX for ASP\

This directory contains project and solution files for Visual Studio 6 and 2005.

 

Language

Project file:

Compiler:

C++

PrintWrapper.dsw

Visual Studio 6

C++

PrintWrapper.sln

Visual Studio 2005

 

ASP Sources

            This directory contains htm and asp files for text file printing.  These files must be in the ASP home directory.

 

Sample Source Code Folder Location:

<RTK Installation Folder>\Printer Driver Resource Toolkit\ Samples\Sample Source Codes\OCX\ASP Printing Sample\

 

Language

Source file:

ASP/VBScript

Print.asp

HTML

PrintTxt.htm

 

Note: Please make sure that you use the appropriate Resource ToolKit, there are four different RTK.

- RTK for 32bit for Windows 11, 10, 8, 7

- RTK for 32bit for Windows Servers 2025/2022/2019/2016/2012

- RTK for 64bit for Windows 11, 10, 8, 7

- RTK for 64bit for Windows Servers 2025/2022/2019/2016/2012