We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Printing supplied document in Essential DocIO 4.4.0.51

Thread ID:

Created:

Updated:

Platform:

Replies:

77496 Nov 4,2008 02:03 AM Nov 5,2008 07:39 AM Windows Forms 3
loading
Tags: DocIO
Rambabu Pusala
Asked On November 4, 2008 02:03 AM

Hi All,

I am using Essential DocIO 4.4.0.51 for printing document. After supplying these paperSource, numberOfCopies and printerName, calling the Print() from DLSViewer class. But the print action asking the printer selection dialog box. The requirement is, I don't want this dialog box again. Please help for good code.

Thanks in advance,
Rambabu


Administrator [Syncfusion]
Replied On November 4, 2008 06:22 AM

Hi Rambabu,

DLSViewer was released as partially developed unadvertised utility. We do not provide support for DlsViewer and printing. As a workaround, you can use the following code to print your document without any prompt. But note that, this will need MsWord installed in your machine.

Process pr = new Process();
//this is used to print the document
pr.StartInfo.Verb = "Print";
pr.StartInfo.FileName = "Sample.doc";
pr.Start();
if (pr.Responding)
{
pr.CloseMainWindow();
}
else
{
pr.Kill();
}

Please let me know if you have any other concern.

Regards,
Dhivya

>Hi All,

I am using Essential DocIO 4.4.0.51 for printing document. After supplying these paperSource, numberOfCopies and printerName, calling the Print() from DLSViewer class. But the print action asking the printer selection dialog box. The requirement is, I don't want this dialog box again. Please help for good code.

Thanks in advance,
Rambabu




Rambabu Pusala
Replied On November 4, 2008 06:30 AM

Hi Dhivya,
Thanks for replay, I reached the answer as

public bool PrintDocument(string documentFilePath, string printerName, PaperSource paperSource,
int numberOfCopies, string documentName)
{
if (!File.Exists(documentFilePath)) return false;
DLSViewer viewer = new DLSViewer();
this.wordDoc = new WordDocument(documentFilePath);

viewer.Document = this.wordDoc;
viewer.PrintDocument.DocumentName = documentName;
viewer.PrintDocument.PrinterSettings.DefaultPageSettings.PaperSource = paperSource;
viewer.PrintDocument.PrinterSettings.Copies = (short)numberOfCopies;
viewer.PrintDocument.PrinterSettings.PrinterName = printerName;
viewer.PrintDocument.Print();
return true;
}

If there is any mistake, please guide for good.

Thanks,
Rambabu.


Administrator [Syncfusion]
Replied On November 5, 2008 07:39 AM

Hi RamBabu,

As I said in my previous response, we don't recommend using DLS Viewer as it is not stable and complete. Also, we don't have an option to hide print dialog using DocIO. However, if this works for you, it is fine using it.

Please let me know if you have any other question.

Regards,
Dhivya.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;