Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save copy of printed output

Status
Not open for further replies.

bbuk

Technical User
Apr 27, 2002
44
GB
Hi

In the final stages of a project which produces a printed report with reletively complex formatting (font style changes, lines, tabs etc) using the printer object, the customer decided that he wants a copy of the printout to be filed for possible later reprint.

If I had know this from the start I would have built the printout in a richtextbox. Any suggestions on how to achieve this now wihout a major recoding exercise?

hopefully

Andy
 
bbuk,

A couple of ideas.

1) If you had a pdf making printer object (eg Acrobat Distiller) on the host computer you could print to that and have a pdf to print later.

2) You could redirect Print to a Picture Box(es) dimensioned to be same size as the paper you normally print on then you could have a bitmap file. Such bitmaps are biggish (1-2 MB per A4 page) but wrap (paste) such a bitmap into a post Office 97 Word document and Word will automatically compress it down to about 45k (depending on content).

regards Hugh,
 
Thanks for replying Hugh. Unfortunately the computer which will be running the app has no office applications installed. After spending a few hours looking for an easy way I bit the bullet and re-coded to use a richtextbox so I can save rtf files, which I can then retrieve and print within my app.

Andy
 
>an easy way

Too late I know, but it might have been worth considering using an enhanced metafile
 
strongm,

I would be interested to see your proposal..

Andy
 
Well, it's usefulness depends very much on whether you are using the API to write to the printer DC, or Printer object methods.

If the API, then we can substitute in an emf DC, whch we can then 'play back' to screen or printer.

However, if using the object methods, then I can't figure out a good way of getting at the necessary DC
 
I like to keep things simple so I was using the printer object, line by line setting the font style as required and formatting with TAB.

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top