Solved

DDE D3 Netscape print

Posted on 1998-06-30
6
271 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 132
Controlled Assessment GCSE - desperate help needed 4 87
Tvertscrollbox like a whatsapp layout 5 28
shape, triangle, dbctrlgrid 3 5
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…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

803 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