Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6046523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:14:58+00:00 2026-05-23T07:14:58+00:00

I have a timetable in memory, and need to be able to print it

  • 0

I have a timetable in memory, and need to be able to print it out.

The timetable will likely be many pages, each page will look quite similar:
A grid of cells, across the horizontal axis is time, and along the vertical axis is entities. Cell x, y will contain the allocation of a particular job to entity x at timeslot y.

I’m looking at the System.Drawing.Printing.PrintDocument class but it’s incredibly cumbersome. I need to set an event handler to the PrintDocument.PrintPage, yet there doesn’t appear to be any way to get the page number from the PrintPageEventArgs?

I just want to construct my document and call some Print() function. I suppose if I could get the page number within the event handler, I could construct the page layout on the fly with e.Graphics and GDI.

I could potentially even put together a HTML page using tables and print that – if I could somehow control what prints on what page?

Is there a better way to construct and print documents in C#?

The target machines do have Office installed, but they’re all different versions and I’ve had lots of trouble getting correct versions of the .Net/Office interop library to work with them.

Edit: I could potentially even create a temporary LaTeX file on the fly and compile it, then print it. This seems like a good solution, except that the target machines are locked and the users can’t install new software, hence I would need to bundle the LaTeX compiler with my program, and my compiler is almost 300MB.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:14:58+00:00Added an answer on May 23, 2026 at 7:14 am

    Sounds to me like you’re giving up too soon. Handling the PrintPage event isn’t that difficult and since the event is raised sequentially, all you have to do is keep a page counter in that event. That’s how I’ve done it in the past with MetaFile images (printing Reporting Services reports through a web service call).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of data and need to pull out one record for
Have a n-tire web application and search often times out after 30 secs. How
I have a DataTable (instance named: TimeTable) whose DefaultView (instance named: TimeTableView) I am
I have a binary application on windows (train timetable software) which contains a lot
I have two tables, timetable and lesson_booking these are linked via timetable_id . timetable
I have to implement an algorithm that generates a timetable for a university. I've
I have attempted this is many ways but failed consistently, hopefully you can help
I have a login.jsp page which contains a login form. Once logged in the
i have a input tag which is non editable, but some times i need
I have TabActivity: public class timetable extends TabActivity { ... @Override public boolean onTouchEvent(MotionEvent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.