Delphi and Kylix

Moderators: pritaeas
Number of threads: 7264
Number of posts: 19073

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
printing in Delphi Posted by GarryPaxton on 19 Oct 2003 at 7:03 AM
I am writing a program that draws a grid on a page, into which a user can place clip-art, jpgs, wmfs, bmps, etc (selected from files on disk). I'm providing options like pre-filling the grid with background colours, placing text in the grid, etc. Most pics have to be re-sized or stretched to fit the grid size chosen by the user.

But printing in Delphi seems to be a manual, messy business. I currently build my grid in a off-screen bitmap; I'd like to print it in a number of formats (perhaps as A4 - Port or Land, or two A5 pages side by side). I'd also like to present a Print Preview to my user so they can see how it will look.

With my current attempts at printing, I occasionally I get 'GDI error' whereupon the program aborts, and at other times my program currently prints a blank page (then works ok next time I press the print button).

Can anyone suggest any printing components or products that facilitate printing ? many thanks, Gazza
Report
Re: printing in Delphi Posted by zibadian on 19 Oct 2003 at 9:50 AM
: I am writing a program that draws a grid on a page, into which a user can place clip-art, jpgs, wmfs, bmps, etc (selected from files on disk). I'm providing options like pre-filling the grid with background colours, placing text in the grid, etc. Most pics have to be re-sized or stretched to fit the grid size chosen by the user.
:
: But printing in Delphi seems to be a manual, messy business. I currently build my grid in a off-screen bitmap; I'd like to print it in a number of formats (perhaps as A4 - Port or Land, or two A5 pages side by side). I'd also like to present a Print Preview to my user so they can see how it will look.
:
: With my current attempts at printing, I occasionally I get 'GDI error' whereupon the program aborts, and at other times my program currently prints a blank page (then works ok next time I press the print button).
:
: Can anyone suggest any printing components or products that facilitate printing ? many thanks, Gazza
:
You can simply copy the Bitmap.Canvas onto the Printer.Canvas. Perheps you need to perform some scaling, but thats about it.
Report
Re: printing in Delphi Posted by Perran on 19 Oct 2003 at 11:26 AM
: I am writing a program that draws a grid on a page, into which a user can place clip-art, jpgs, wmfs, bmps, etc (selected from files on disk). I'm providing options like pre-filling the grid with background colours, placing text in the grid, etc. Most pics have to be re-sized or stretched to fit the grid size chosen by the user.
:
: But printing in Delphi seems to be a manual, messy business. I currently build my grid in a off-screen bitmap; I'd like to print it in a number of formats (perhaps as A4 - Port or Land, or two A5 pages side by side). I'd also like to present a Print Preview to my user so they can see how it will look.
:
: With my current attempts at printing, I occasionally I get 'GDI error' whereupon the program aborts, and at other times my program currently prints a blank page (then works ok next time I press the print button).
:
: Can anyone suggest any printing components or products that facilitate printing ? many thanks, Gazza
:
I hate to say it [this is being written on a RedHat machine], but when I'm developing stuff for people I commonly use Word to handle printing chores. It's so ubiquitous that you can almost do it without asking, and it is pretty adept at printing in Windoze. My $0.02.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.