Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Gordie Freedman
Wed, 14 Oct 1992 06:02
Insert date/page# in text object's PS output?
Author: Gordie Freedman
Date: Wed, 14 Oct 1992 06:02
Date: Wed, 14 Oct 1992 06:02
48 lines
2555 bytes
2555 bytes
I would like to know how to count the pages that will be printed by a text object's print method (the method that uses the print panel and creates a postscript representation of the text contents). I also want to insert the title (filename - directory) at the top of each page and the date/page# at the bottom. I'm not sure how to figure out the size of the pages, and where I would insert this stuff to get it in the right place after it is printed. Another question I have is how to stop the print method from vertically centering the text in a page when there is less than one page of text. Here's more background: I have subclassed a text object and am using it to "pretty print" code. One nice feature of this is that I can use the standard print panel to actually print (or stuff in a file) postscript code for the text buffer. I format the text using bold for the reserved words and italics for the comments (similar to vgrind for any Unix hacks). What I want to do is put "filename - directory" at the top of each page, and the date and page number at the bottom. I expect I can do this by creating a new instance of a text object, copying the contents of the original text buffer into it, format the bold/italics, and stick in the title, date and page number. Then I can print the new text object and free it when I am done. My questions are: 1) How do I determine the size of a page so that I can stick the title on top, track the # of pages and stick the date and page number on the bottom? 2) Is there an easier way to do what I described? 3) How do I set the top and bottom border for each page? (Related to #1) 4) How do I prevent the print method from vertically centering text when there is less than one page? Thanks in advance for any answers or pointers to docs to read. (Anybody ever notice the ever popular bundle acronym rtfd also has another meaning in Unix slang?) --- Gordie Freedman: gordie@kaleida.com Sigs are for kids
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads