Solved

DDE D3 Netscape print

Posted on 1998-06-30
6
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month4 days, 7 hours left to enroll

635 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