How to Print from Stream

63 views
Skip to first unread message

Jonathan Knop

unread,
Oct 10, 2013, 4:35:52 PM10/10/13
to dot-net-...@googlegroups.com
Trying to avoid writing to temp file, printing file, then deleting file. I am able to do that using the code below.

           report.Publish("C:\\testdoc.pdf", Siberix.Report.FileFormat.PDF);

            Process p = new Process();
            p.StartInfo = new ProcessStartInfo()
            {
                CreateNoWindow = true,
                Verb = "print",
                FileName = "C:\\testdoc.pdf"
            };
            p.Start();

I know that Publish allows sending pdf output to stream. Is there a way to print that stream?

siberix

unread,
Oct 10, 2013, 5:43:18 PM10/10/13
to dot-net-...@googlegroups.com
Hi Jonathan,

You can use report.Print(string printerName) method to print reports directly. Please note that this method prints the report object by itself rather than a PDF document generated from the report. We are using managed .NET Framework PrintDocument class and its Graphics implementation to draw report's elements there.

As regarding the stream, we are not aware about any possibilities to send it to Acrobat directly.

Thank You,
Victor
Reply all
Reply to author
Forward
0 new messages