nickfinity
New Member
- Joined
- Feb 9, 2010
- Messages
- 19
I'm programmatically creating many sheets in an Excel workbook. When I'm done I need to print the workbook to a pdf. That is working using this code (C#)
So, I print to postscript using the Adobe PDF printer instance and then open the .ps file to distill it. Everything works fine. What I need to do, however, is add bookmarks to the PDF file. All I need is the name of each sheet as a bookmark. Can I do that using the above method?
I know it can be done using the "Create PDF" option from Excel, which appears to use PDFMaker. Is there a way to call that from .NET?
Thanks for any help, I really appreciate it.
Thanks, Nick
Code:
oBook.PrintOut(Type.Missing, Type.Missing, Type.Missing, Type.Missing, "Adobe PDF", true, Type.Missing, filename);
Process.Start(filename);
So, I print to postscript using the Adobe PDF printer instance and then open the .ps file to distill it. Everything works fine. What I need to do, however, is add bookmarks to the PDF file. All I need is the name of each sheet as a bookmark. Can I do that using the above method?
I know it can be done using the "Create PDF" option from Excel, which appears to use PDFMaker. Is there a way to call that from .NET?
Thanks for any help, I really appreciate it.
Thanks, Nick