How to print doc or xls file pdf silently
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 46
- Joined: Tue Nov 30, 2010 9:07 am
How to print doc or xls file pdf silently
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.
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.
Muralidhar.
- Ivan - Tracker Software
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: How to print doc or xls file pdf silently
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.
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.
-
- User
- Posts: 46
- Joined: Tue Nov 30, 2010 9:07 am
Re: How to print doc or xls file pdf silently
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.
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.
Muralidhar.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: How to print doc or xls file pdf silently
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
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
Re: How to print doc or xls file pdf silently
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);
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);
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: How to print doc or xls file pdf silently
Thanks dkrot90
Cheers,
Stefan
Cheers,
Stefan
Re: How to print doc or xls file pdf silently
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
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
- Paul - Tracker Supp
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: How to print doc or xls file pdf silently
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
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
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
- Ivan - Tracker Software
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: How to print doc or xls file pdf silently
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).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.
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.
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.
Re: How to print doc or xls file pdf silently
This worked. We have now created OfficeAutomation executables.
Thanks
Thanks
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: How to print doc or xls file pdf silently
Great to hear that kmoens
Cheers,
Stefan
Cheers,
Stefan