PDA

View Full Version : Printng the Document from internet explorer


Unregistered
October 11, 2002, 01:07:28
Hi

I am using the following code to print contents of a Text Control in my asp page.

Sub print()
wPages = objTX.CurrentPages
Printer.Print
For No = 1 To wPages
objTX.PrintDevice = Printer.hDC
objTX.PrintPage No
*** Printer.NewPage
Next No
Printer.EndDoc
End Sub

Its printing outside content of the asp page not the contents of a Text Control .

Any help woulb be appreciated.

And also when is your next service is going relaese, I came to know line breaks problem is taken in the newe version.

Thanks
Ram


This message was originally posted by Ram in the old TX Text Control Support Forum.

Björn Meyer
October 11, 2002, 12:54:11
Hello Ram

Please have a look at the shipped IE sample 4. (Samples\Ie\HTML\step4.html)

This sample shows how to print the contents of TX Text Control.

Sub Button2_OnClick
on error resume next
objComDlg.Flags = &H104
objComDlg.FromPage = 1
objComDlg.Min = 1
objComDlg.CancelError = 1
objComDlg.ToPage = objTX.CurrentPages
objComDlg.Max = objTX.CurrentPages
objComDlg.ShowPrinter
if err.number = 0 then
objTX.PrintDevice = objComDlg.hDC
objTX.PrintDoc "Text Control Document", objComDlg.FromPage, objComDlg.ToPage, objComDlg.Copies
end if
End Sub

Currently we have no fixed time-frame for the next service pack. I will announce that as soon as possible.

Björn Meyer, TX Text Control


This message was originally posted by Björn Meyer in the old TX Text Control Support Forum.

jop
October 28, 2004, 20:44:55
Hi.

I'm trying to print the TextControl content with the sample you mention, but nothing happens. Nothing's sent to the printer, and there's no error message.

I'm ussing TX TextControl 10.1 on Win2000, IE 6. The printer is HP Laserjet 1100 connected locally.

What's the problem here?

Thank you in advance.

Björn Meyer
October 29, 2004, 16:42:41
Is the CommonDialog installed properly? Please try just the PrintDoc method without the common dialog.

jop
October 29, 2004, 21:09:44
I think the problem is with the common dialog. It appears to be broken, because in its place it appears the usual icon shown while an ActiveX is downloading, for example.

I tried to open the common dialog using this reference from Microsoft, http://support.microsoft.com/?kbid=168917
but it was all unsuccessful. Any ideas?

Anyway, you mention the PrintDoc method. Are you referring to the
mnuFile_Print_Click () function shown under "PrintPage Method" in the Help Docs? I already tried that one, but I got an error at the Load() function in the body tag.

Thank you for your help, Björn.

Björn Meyer
November 2, 2004, 10:45:34
I am talking of the PrintDoc method:

http://www.textcontrol.com/support/documentation/html/activex/ref/tx/o_tx_printdoc.htm