gtadani1 Posted March 19, 2013 Share Posted March 19, 2013 Hi. I'm working on a program on Delphi 7, but now I have one thing that I can't do. I have this components on my program: Memo1 PageSetup1 -> Opens PageSetupDialog1 Print1 --------> Opens PrintDialog1 to select your printer and print your text in Memo1. There is one part of my program's source (I think this helps). procedure TForm1.PageSetup1Click(Sender: TObject);beginPageSetupDialog1.Execute;end;procedure TForm1.Print1Click(Sender: TObject);beginif PrintDialog1.Executethen Printer.BeginDoc;FontH := Printer.Canvas.TextHeight(Memo1.Lines[0]);Printer.Canvas.TextOut((Printer.PageWidth div 2)-(Printer.Canvas.TextWidth(Memo1.Lines[0]) div 2),0,Memo1.Lines[0]);for Loop := 1to Memo1.Lines.Count-1do Printer.Canvas.TextOut(0,Loop*FontH,Memo1.Lines[Loop]);Printer.EndDoc;end; PageSetup, configures your document's page to print, but when I will print one document (like Adobe PDF), the text will print with no configuration (no borders, no page size,...) and my question is: There's a way that I can print one document with PageSetup1Dialog's configuration? Thanks. I hope you can help me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now