🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14755

Print settings

#14755
From: Marco
Date: Fri, 01 Aug 2003 13:41
46 lines
2147 bytes
Hi everyone,
  this is the code i use to print:
-----------------------
  PrintDialog1->Options.Clear();
  PrintDialog1->Options << poPageNums << poSelection;
  PrintDialog1->FromPage = 1;
  PrintDialog1->MinPage = 1;
  PrintDialog1->ToPage = PageControl->PageCount;
  PrintDialog1->MaxPage = PageControl->PageCount;
  if (PrintDialog1->Execute())
    {
    int Start, Stop;
    switch (PrintDialog1->PrintRange)
      {
      case prSelection:

        Start = PageControl->ActivePage->PageIndex;
        Stop = Start;
        break;
      case prPageNums:
        Start = PrintDialog1->FromPage - 1;
        Stop =  PrintDialog1->ToPage - 1;
        break;
      default:  // prAllPages
        Start = PrintDialog1->MinPage - 1;
        Stop = PrintDialog1->MaxPage - 1;
        break;
      }
    Printer()->BeginDoc();
    for (int i = Start; i <= Stop; i++)
      {
      PageControl->Pages[i]->PaintTo(Printer()->Handle, 10, 10);
      if (i != Stop)
        Printer()->NewPage();
      }
    Printer()->EndDoc();
    }
-----------------------
  My print has the following dimension:
        width 16.93 inch
        height 9.06 inch

  How can i fit to page my print?

Thanks in advanced.   
Technical Details
Message-ID: <3f2a6df8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d5de15b490a744a2,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-01 06:49:23 PST
From: "Marco" <lazzarom@hotmail.it>
Sender: "Marco" <lazzarom@hotmail.it>
Reply-To: "Marco" <lazzarom@hotmail.it>
Subject: Print settings
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 195.103.152.67 195.103.152.67    
X-Forwarded-For: 130.130.63.107, 195.103.152.85
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f2a6df8$1@newsgroups.borland.com>
Date: 1 Aug 2003 06:41:12 -0700
X-Trace: newsgroups.borland.com 1059745272 207.105.83.65 (1 Aug 2003 06:41:12 -0700)
Lines: 46
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail