How to print doc or xls file pdf silently

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
muralidhar
User
Posts: 46
Joined: Tue Nov 30, 2010 9:07 am

How to print doc or xls file pdf silently

Post by muralidhar »

Hi All,

i want to print document file(doc/docx) and excel file(xls/xlsx) into pdf.

i am able get print using "System.Diagnostics.Process" class by using StartInfo.Verb = "Print" command.

but when i call Start() method its displaying dialog to give name to the output file(pdf file name).

can anybody please tell me how can i print silently without any dialog.

or is there any other way to achieve this uding our print drivers???

this is very urgent requirement for me.

please help me in this regard.

thanks in advance.
Regards,
Muralidhar.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: How to print doc or xls file pdf silently

Post by Ivan - Tracker Software »

If you have driver's SDK, you can configure your SDK driver to don't show SaveAs dialog (printer.Option["Save.ShowSaveDialog"] = "False";)
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
muralidhar
User
Posts: 46
Joined: Tue Nov 30, 2010 9:07 am

Re: How to print doc or xls file pdf silently

Post by muralidhar »

Hi,

thanks for the speedy reply.

i am very new to driver api.
so, can you please provide sample code for conversion using SDK Driver.
i am using c#.net, and i want to do the conversion using the same.

thanks in advance.
Regards,
Muralidhar.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: How to print doc or xls file pdf silently

Post by Tracker Supp-Stefan »

Hello muralidhar,

Maybe the dev guys have been reluctant in answering this topic, as you are asking us things which you could easily find yourself shall you spend just a few minutes searching. While we do not have an explicit example in C#, what you are asking for is almost the base functionality of the driver, and as such you could construct your working project using pretty much any of the available samples.

What you need to do is call the correct application's printing routine and then pass the print job to our printing driver.

Best,
Stefan
dkrot90
User
Posts: 1
Joined: Thu Jul 29, 2004 7:36 pm

Re: How to print doc or xls file pdf silently

Post by dkrot90 »

In case anyone else is looking for this:

PXCComLib.CPXCPrinter PDFPrinter;
PDFPrinter.SetAsDefaultPrinter();
PDFPrinter.set_Option("Save.ShowSaveDialog", false);

// Some other options you may want to set
PDFPrinter.set_Option("Save.SaveType", 2);
PDFPrinter.set_Option("Save.ShowSaveDialog", false);
PDFPrinter.set_Option("Save.Path", "c:\\");
PDFPrinter.set_Option("Save.File", "MyFile");
PDFPrinter.set_Option("Save.WhenExists", 1);
PDFPrinter.set_Option("Save.RunApp", false);
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: How to print doc or xls file pdf silently

Post by Tracker Supp-Stefan »

Thanks dkrot90 :)

Cheers,
Stefan
kmoens
User
Posts: 17
Joined: Fri Nov 11, 2011 10:46 pm

Re: How to print doc or xls file pdf silently

Post by kmoens »

We have bought PDF-XChange v4 driver sdk. We have implemented the code mentioned in the early post about using multiple "PDFPrinter.set_Option" settings.
We have a (customer / end user) which has multiple versions of Microsoft Excel files. On the machine we submit these files to be converted Excel displays a message saying that a calculation must be executed and needs user interaction. This process is a background process and holds up the rest of our processing. We recently looked into changing the assocated viewer from Microsoft Excel for xls files to other viewing software. We haven't not had any luck. Then we ran across Office2PDF by Tracker Software. Office2PDF converted these xls files without any user interaction. While talking to a support representative they believe that we should be able to find a solution with the Driver SDK because that would be the same as the solutions used for Office2PDF. Could you provide us some direction to code this solution.
--Kevin
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6897
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: How to print doc or xls file pdf silently

Post by Paul - Tracker Supp »

Hi Kevin,

I am the person you spoke to on the phone. It looks like you have missed the dev team for the week end. I will follow this through and see that you get an answer. It should be first thing in the new week.

regards
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: How to print doc or xls file pdf silently

Post by Ivan - Tracker Software »

While talking to a support representative they believe that we should be able to find a solution with the Driver SDK because that would be the same as the solutions used for Office2PDF. Could you provide us some direction to code this solution.
You have to use Excel's ActiveX COM option to open your document and print it (your can use http://msdn.microsoft.com/en-us/library ... 12%29.aspx as you start point).
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
kmoens
User
Posts: 17
Joined: Fri Nov 11, 2011 10:46 pm

Re: How to print doc or xls file pdf silently

Post by kmoens »

This worked. We have now created OfficeAutomation executables.

Thanks
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: How to print doc or xls file pdf silently

Post by Tracker Supp-Stefan »

Great to hear that kmoens :)

Cheers,
Stefan
Post Reply