Navigation:  »No topics above this level«

Frequently Asked Questions

Previous pageReturn to chapter overviewNext page

 

Q. Do I need to register ASP Printer on my system before starting to use it?

A. If you have downloaded and run the setup package of the ASP Printer component, there is no need to register it because the setup utility automatically registers the component on your system. However, if you have downloaded the ASP Printer component file only (ASPPrinter.dll), then you need to register it manually on your system. To register the component manually, use the Windows Regsvr32 utility. From the Windows Start menu, click Run and type:

 

               Regsvr32 FolderName\ASPPrinter.dll

 

   Where FolderName is the full pathname of the folder where ASPPrinter.dll is located.

 

 

 

Q. On what platforms can ASP Printer COM be used?

A. ASP Printer component can be used on all 32-bit Windows platforms (Windows 95/98/NT/ME/2000/2003/XP).

 

 

 

Q. In what programming languages can ASP Printer be used?

A. ASP Printer COM can be used in any programming language that support ActiveX components such as Visual Basic, VBA, Delphi, Visual C++, MS Office (Word, Excel, PowerPoint), etc.

 

 

 

Q. Are ASP Printer run-times royalty-free?

A. Yes. You do not need to re-pay us to distribute the ASP Printer component with your application.

 

 

 

Q. What libraries do I need to include with my application so that ASP Printer can work on the user system?

A. See Redistribution...

 

 

 

Q. How can I add ASP Printer to my VB project?

A. There are two methods to use the component in Visual Basic. The first method is to add a reference to your project from the Project - References menu. Then, you declare the object (in a BAS module or in a Form module) using:

       

       Dim MyObj As ASPPrinterCOM.ASPPrinter

       

       Once you have declared the object, you can use it from anywhere in your project (or form) using the MyObj object variable.

 

       The other method is using late-binding (no need to add a reference to your project), where you just create the object (through code) when you need to use it, using:

 

       Set MyObj = CreateObject("ASPPrinterCOM.ASPPrinter")

 

 

 

Q. Can I print to a printer other than the default system printer?

A. Yes. See the GetPrinters and the SetPrinter methods.

 

 

 

Q. Does ASP printer print documents on the web server only, or can it also print on the client machines?

A. ASP Printer can print both on the web server and on the client machines that view your web pages. To print on the server, you just create the ASP Printer object on the server from your ASP pages and call the appropriate methods. To print on the client from your HTML pages being viewed in the client's web browser, just use the <OBJECT> HTML tag to automatically download the component to the client machine and use VB Script or Java Script to print on the client machine.

 

 

 

Q. Can I use JavaScript to print from my ASP and HTML pages, or only VBScript?

A. You can use both VBScript and JavaScript.

 

 

 

Q. Can I specify a title for my document from within my code and specify that the document body to be retrieved from a text file?

A. Yes. Supply the document title using the DocTitle property and use the FileName property to specify the file name from which the document body to be retrieved. In this case, you must also set the AllDataFromFile property to False so that ASP Printer considers the file contents as the document body.

 

 

 

Q. How can I print from MS Office applications?

A. Use VBA (Visual Basic for Applications). You will need to add a reference to your office application (MS Access, Excel, etc.) for the ASP Printer object in order to be able to use the component.

 

 

 

Q. Can I print a specific part of my HTML page, for example a table on the HTML page?

A. Yes. Just use the (document.all.MyObj.outerHTML)VBScript or JavaScript code to get the HTML code of the object (MyObj), then use the ASP Printer PrintHTMLDocFromSource method to print the object as it appears in the HTML page inside the web browser.

 

 

 

Q. Does ASP Printer support printers with multiple paper bins?

A. Yes. Use the PaperBin property to specify which paper bin to use when printing the document. See also the object methods where you can directly specify this setting without using this property.

 

 

 

Q. Does ASP Printer support different paper sizes?

A. Yes. Use the PaperSize property to specify the paper size to use when printing the document. See also the object methods where you can directly specify this setting without using this property.

 

 

 

Q. Can I print a document using portrait or landscape orientation?

A. Yes. Use the PaperOrientation property to specify the paper orientation. See also the object methods where you can directly specify this setting without using this property.

 

 

 

Q. Can I specify a different line spacing when printing a text document with  ASP Printer?

A. Yes. Use the LineSpacing property to specify the line spacing to use when printing the document.

 

 

 

Q. Is it possible to specify the print quality when printing a document?

A. Yes. Use the PrintQuality property to specify the print quality. See also the object methods where you can directly specify this setting without using this property.

 

 

 

Q. Is it possible to specify the number of copies to print?

A. Yes. Use the Copies property to specify how many copies to print. See also the object methods where you can directly specify this setting without using this property.

 

 

 

Q. Can I specify different margins (left, right, top, bottom) when printing a document with ASP Printer?

A. Yes. Use the MarginLeft, MarginRight, MarginTop, and MarginBottom properties to specify each of the margins separately. See also the object methods where you can directly specify this setting without using this property.

 

 

 

Q. Does ASP Printer support printing graphics with the document text?

A. Yes. Just use either RTF or HTML files or documents, and ASP Printer will not only print the graphics, but the entire layout, color, etc. of the document.

 

 

 

Q. How can I intercept the events of the ASP Printer object in my project?

A. This depends on the programming language you are using. For example, in VB (Visual Basic), you need to Dim the object variable using the 'With Events' declaration. In HTML, you must set event handler code. In other programming languages, please refer to the programming language documentation.

 

 

 

Q. Is it possible to know when the document has been sent to the printer spooler?

A. Yes. Use the PrintComplete event. This event triggers when the entire document data has been sent by the component to the printer spooler.

 

 

 

Q. Can I specify a different font face, size, effects (bold, italic, underline, etc.) for each one of the document title, body, header and footer separately?

A. Yes. Use the DocTitleFont, DocTextFont, DocHeaderFont and DocFooterFont properties to specify each of these properties separately. Alternatively, when calling any of the ASP Printer object methods, use the FontSettings argument to specify the font settings.

 

 

 

Q. Do I need to reference ASP Printer on every form in my VB application in order to print from each from?

A. No. You can just declare the object in a public variable in BAS module (or in a public variable in a form module) and use this object variable from anywhere in your project to print.

 

 

 

Q. How can ASP Printer understand that my file is actually an RTF file when I use the FileName property to print my file?

A. ASP Printer will always assume that the file is a text file unless its extension is '.rtf'. When the extension is '.rtf', ASP Printer will process it as an RTF file. The extension is case insensitive. See also the PrintRTFFile and PrintRTFData methods.