Converting view/sheet to PrintDocument / printing custom papersize
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
For printing to PDF, I was wondering if there is any way to convert a view or sheet to a System.Windows.Printing.PrintDocument. Maybe exporting the view as a memorystream?
I wouldn't know where to start with that or if it's even possible.
I already have printing using the Revit API working using the PrintManager but I'd rather do all the PDF stuff in code so I don't have to depend on having a certain PDF printer driver installed.
Another thing is, I can't seem to get it working with a custom papersize.
If converting to a PrintDocument isn't possible, is there any good driver for printing any custom size?
I tried adding the papersize as a form using the Print Spooler API but that just seems way too complicated for a seemingly simple job.
Thanks in advance.