Solved

DDE D3 Netscape print

Posted on 1998-06-30
6
268 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 8

Accepted Solution

by:
ZifNab earned 250 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now