Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PrintDialog with Landscape and Portrait pages

Tags:

printing

wpf

I have a System.Window.Controls.PrintDialog and I want to print pages with landscape mode and portrait mode in with single PrintTicket but it seems I only can set the orientation once.

As long as I want to print on paper this may not be a big deal but I want to print/create a PDF document from my Printjob. There I need pages with Landscape and Portrait mode in onc document.

So far I managed to rotate the landscape pages 90 degree and this works fine but in the PrintPreview it looks very strange because of the rotated content.

like image 202
TalkingCode Avatar asked Nov 22 '11 16:11

TalkingCode


People also ask

How do I Print some pages landscape and others portrait?

Change the page orientation when you are ready to print , and then click Print. In the Print dialog box, click Properties. In the printer properties dialog box, in the Layout tab, under Orientation, click Portrait or Landscape, and click OK.

How do I Print two portrait pages in landscape?

Show activity on this post. From the "Page Layout" ribbon, click on "Page Setup." It will open a dialog box to the "Margins" tab. Next to "Multiple pages," select "2 per page." If your page orientation is set to "portrait," the default option is to make two landscape pages, one on top of the other, on a portrait sheet.

How do I change my printer from horizontal to vertical?

Change the page orientation for a documentGo to Layout > Orientation, and then select Landscape. Go to File > Print. Under Settings, make sure the orientation box says Landscape Orientation.


1 Answers

Not as clean as you would like and more of a workaround but I think it might accomplish your goal. You can use the iTextSharp library to concatenate PDFs into one following multiple print jobs. Here is some sample code.

Hopefully someone comes up with a more straight forward solution.

like image 180
crlanglois Avatar answered Oct 25 '22 01:10

crlanglois