Re: Landscape and Portrait printing in the same document

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 01/20/05


Date: Thu, 20 Jan 2005 03:08:47 +0100

Hey Rick.
Don't keep it a secret, Some of us have a FAQ to maintain :-))

-- 
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Rick Hein" <RickJHein@gmail.com> wrote in message 
news:1106161269.412641.86710@z14g2000cwz.googlegroups.com...
> To the gentleman that called me today: (1/19/2005) - Please call me
> back - I think I might have an answer to your problem.
>
> Thanks.
> Rick
>
>
>
> Rick Hein wrote:
>> Don't know if this is the right place to ask this question, but here
> goes. I
>> have an application that needs to have some reports printed from it.
> Some of
>> the pages I want to be in portrait mode, and some I want in Landscape
> mode.
>> Setting the document.DefaultPageSettings.Landscape = true or false
> doesn't
>> seem to have any affect.
>>
>> The C# code looks something like this
>> private void button2_Click(object sender, System.EventArgs e)
>>
>> {
>>
>> PrintDialog pd = new PrintDialog();
>>
>> pd.Document = doc;
>>
>> pd.ShowDialog();
>>
>> doc.PrinterSettings.Equals(pd.PrinterSettings);
>>
>>
>> iTabCount = 0;
>>
>> currentPage = 1;
>>
>> doc.Print();
>>
>> }
>>
>>
>>
>> private void doc_PrintPage(object
>> sender,System.Drawing.Printing.PrintPageEventArgs ev)
>>
>> {
>>
>> if(foo== bar){
>>
>> document.DefaultPageSettings.Landscape = true;
>>
>> }
>>
>> else
>>
>> {
>>
>> document.DefaultPageSettings.Landscape =false;
>>
>> }
>>
>> Drawstring ......
>>
>>
>>
>> }
>>
>> This is pseudocode granted, but you get the idea. For some reason
> however it
>> doesn't make any difference, any ideas on how I can do this? Other
> than a
>> rotateTransform and Translate Transform? Or is this a limit of the
> printer
>> drivers - A document can only be portrait or only landscape but not
> both?
>>
>> thanks
>>
>> Rick Hein
>>
>> rhein@mutualofenumclaw.com
> 


Relevant Pages

  • Re: too big to save
    ... Good catch, Rick!!! ... 2004 Windows MVP "Winny" Award ... >> document for all 31 articles. ... >> I tried to create a master document again, ...
    (microsoft.public.windowsxp.general)
  • Re: too big to save
    ... Good catch, Rick!!! ... 2004 Windows MVP "Winny" Award ... >> document for all 31 articles. ... >> I tried to create a master document again, ...
    (microsoft.public.word.application.errors)
  • Re: Rick Lyons gets two attaboys
    ... Rick can now buy us all beer. ... Practicing engineers ... need effacacious articles. ... I had to write the review, I was the only one left here who didn't ...
    (comp.dsp)
  • Re: Rick Lyons gets two attaboys
    ... Rick can now buy us all beer. ... Did you notice who wrote the book review? ... Practicing engineers ... need effacacious articles. ...
    (comp.dsp)
  • Re: Send A Link
    ... > See these articles: ... Rick, Copy/paste the following link into an IE Addressbar and click GO. ... >> registry key that makes this work? ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)