locked
Print multiple pages per sheet in c# RRS feed

  • Question

  • I'm trying to print a file so that multiple pages appear on one sheet (without a print dialog). Any idea how to do this in c#?

    If it helps, I have the file in .txt form, in .pdf form, and I can read it in using I/O, so I'm pretty flexible as to where we start.

    Thanks for your help.

    Wednesday, May 26, 2010 4:38 PM

Answers

  • You can print the text using the PrintDocument component.  Use Office or a third party library to print the pdf.
    • Marked as answer by Chao Kuo Wednesday, June 2, 2010 10:37 AM
    Wednesday, May 26, 2010 4:42 PM
  • I only know PrintDocument where printing is the same as drawing to the screen.  You can print whatever you like wherever you like.  For pdf, you'll probably need to find more appropriate forums.
    • Marked as answer by Chao Kuo Wednesday, June 2, 2010 10:37 AM
    Wednesday, May 26, 2010 5:21 PM

All replies

  • You can print the text using the PrintDocument component.  Use Office or a third party library to print the pdf.
    • Marked as answer by Chao Kuo Wednesday, June 2, 2010 10:37 AM
    Wednesday, May 26, 2010 4:42 PM
  • John,

    Thanks for your answer.

    However, if you read my question again, you'll see that the issue at hand is printing of multiple pages per sheet. I can already print the file; I would like to fit two pages on one sheet of paper as I print.

    Any ideas?

    Wednesday, May 26, 2010 4:59 PM
  • I only know PrintDocument where printing is the same as drawing to the screen.  You can print whatever you like wherever you like.  For pdf, you'll probably need to find more appropriate forums.
    • Marked as answer by Chao Kuo Wednesday, June 2, 2010 10:37 AM
    Wednesday, May 26, 2010 5:21 PM
  • JohnWein should never have answered this question because obviously he did not know this subject at all.

    Basically, what you are going to have to do is scale your drawing area to fit the number of sheets you want to include per page. If you want to include 2 pages per sheet, take your document size, print to half of it using the OnPrint handler, and adjust your total number of copies requested accordingly. Example: If your document is 4 pages long and you are going to print 2 sheets per page, you need to set the printer options to print only 2 pages (not 4, or you will make double prints).

    Here is a detailed tutorial I found online:

    http://www.aspose.com/docs/display/wordsnet/How+to++print+multiple+pages+on+one+sheet


    ~Joe


    Avoid Sears Home Improvement

    • Proposed as answer by jp2code Tuesday, April 24, 2012 7:06 PM
    Tuesday, April 24, 2012 7:06 PM