Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2019, 03:50 PM
FreakaZoid2 FreakaZoid2 is offline
Senior Member
 
Join Date: Jul 2009
Posts: 332
Default working on creating a custom program

Looking for guidance/ideas
i have a text file that has basic printer output defined in it.
page width = 5.5;
page length = 6.0;
LPI = 8;
CPI = 12;
Font = New Courier;

and actual things to print
[line 1];
@40 'xxxxxxxxxxxxxxxxxxxx' name;


What i would like to do is create a GUI interface, i can work out all the detail structure and so forth, but how would i go about create the initial page size on a canvas that the user interacts with. Like only 5.5 inches wide (not 8.5 standard) or only 6.0 inches in height (not 11.0)
and how to force the canvas to conform the the LPI/CPI parameters.


Thanks for any guidance.
Reply With Quote
  #2  
Old 03-08-2019, 08:17 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,324
Default

Basically it should be a combination of
http://www.scalabium.com/faq/dct0020.htm
and setting dmPaperSize to 0 and dmPaperLength and dmPaperWidth to whatever you need
Reply With Quote
  #3  
Old 03-08-2019, 03:22 PM
FreakaZoid2 FreakaZoid2 is offline
Senior Member
 
Join Date: Jul 2009
Posts: 332
Default thank you for that...

Basically you are saying that i can just use a TPrinter and manipulate it directly. I haven't done any program using TPrinter directly always used one of the report tools (freebies). But now is as good a time as ever to learn. Thank you again.
Reply With Quote
  #4  
Old 03-11-2019, 10:12 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,324
Default

Reporting tools also use TPrinter, so if you're lucky you can manipulate their TPrinter somewhat so you don't have to do all the printing yourself.

I have no Delphi at the moment, but wasn't Printer a singleton implementation?
So if you're lucky you can manipulate Printer and if your reporting tool uses the Printer function (Singleton implementation) all should be fine...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.