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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Printing supplied document in Essential DocIO 4.4.0.51

Thread ID:

Created:

Updated:

Platform:

Replies:

77496 Nov 4,2008 07:03 AM UTC Nov 5,2008 12:39 PM UTC WinForms 3
loading
Tags: DocIO
Rambabu Pusala
Asked On November 4, 2008 07:03 AM UTC

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 11:22 AM UTC

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 11:30 AM UTC

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 12:39 PM UTC

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.

Warning Icon 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.Close Icon

;