Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DDE D3 Netscape print

Posted on 1998-06-30
6
Medium Priority
?
277 Views
Last Modified: 2010-04-04
I have D3 controlling Netscape through DDE just fine. Now I need to control the printing of the HTML document from my D3 app, not Netscape. Can this be done ? Do I need to go to OLE ? Has anyone done this either in DDE or in OLE ?
0
Comment
Question by:kupiec
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1356681
As far as I know, you cannot print via DDE. But this is what I found in one of the groups:

.
Subject:
             Navigator Printing
        Date:
             Wed, 17 Jun 1998 13:40:58 +0100
        From:
             Julian Coombes <julianc@intelligentwave.com>
 Organization:
             Another Netscape Collabra Server User
 Newsgroups:
             netscape.ncapi.windows

Just for information, I've been trying to get my embedded navigator to
print from an MFC application. The solution I've come to is relatively
simple...

WinExec("Netscape.exe /print(\"index.html\")",SW_SHOW);

you can also use the "/printto" command which takes four parameters
url, printer, printer_driver, port

I'm not sure of the syntax of the /printto option but if you want to use
it, you can experiment from a command line by simply typing something
like.

Netscape /printto ("myfile.html myprinter mydriver myport").

Julian.
.

see also:
http://developer.netscape.com/docs/manuals/deploymt/options.htm
http://home.netscape.com/newsref/std/ddeapi.html#about
0
 

Author Comment

by:kupiec
ID: 1356682
The command line argument which you list here does not seem to be accepted by Netscape. It tries to interpret it as a server name or URL.
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1356683
I didn't check it. Sorry I am not familiar with this issue.I hope someone else can help you.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 8

Accepted Solution

by:
ZifNab earned 1000 total points
ID: 1356684
Hi kupiec,

Why not just getting the html document and printing it with the HTML control?

Printing a WEB page with the HTML control?
Question:
How do I print a WEB page with the HTML control?
Answer:
Use either the HTML control's AutoPrint method, or
alternatively use the PrintPage method.

Example using AutoPrint:

uses Printers;

procedure TForm1.Button1Click(Sender: TObject);
var
  OldCur: TCursor;

begin
  OldCur := Screen.Cursor;
 
  with Printer do begin
    BeginDoc;
    HTML1.AutoPrint(handle);
    Title := HTML1.URL;
    EndDoc;
  end;

  Screen.Cursor := OldCur;
end;

Zif.
0
 

Author Comment

by:kupiec
ID: 1356685
This looks like a possible solution, except that it always prints a blank page instead of the HTML document.
0
 

Author Comment

by:kupiec
ID: 1356686
Well,
I got past my ignorance and this now seems to work. Can you give advice on how to detect two things:
1. When the entire page is loaded.
2. When the page printing is completed.
Welcome to the points !
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question