[The initial description of this issue is inaccurate. So, to avoid the nonsense, skip to the last entry starting at "Yet another edit:" below.]
The below code snippet (from Charles Petzold) alternates between portrait and landscape when printing multi-page documents. When printing to "Microsoft Print to PDF" or "Send to OneNote 2016", the 1st page is in landscape mode and subsequent pages alternate as expected. When printing to "Send to OneNote" or "OneNote", all pages are in landscape orientation. Changing the logic to start with portrait mode, results in all pages printing in portrait mode.
void OnQueryPageSettings(object obj, QueryPageSettingsEventArgs qpsea)
{
if (qpsea.PageSettings.PrinterSettings.LandscapeAngle != 0)
qpsea.PageSettings.Landscape ^= true;
}
Green works; Red otherwise:
And the question would be, "Why?" or, "Just on my system?" (Windows 10 with Office 365 Personal).
Edit: Actually, after a closer look, the OneNote entries did alternate, but the graphics size changed between the orientations. On other words, OneNote 2016 presents the same size "paper" in either orientation, but the new improved OneNote changes "paper" size depending upon orientation. So, the OneNote presentation of the landscape has the same width as the portrait presentation.
Landscapes vs rotated portraits:
Edit again:
If anything, the graphics size is more accurate in the ew OneNote:
OneNote 2016
Letter: Height=1100, Width=850. grfx: Height=792, Width=1017 (Landscape)
Letter: Height=1100, Width=850. grfx: Height=1042, Width=792 (Portrait)
OneNote
Letter: Height=1100, Width=850. grfx: Height=750, Width=1000 (Landscape)
Letter: Height=1100, Width=850. grfx: Height=1000, Width=750 (Portrait)
However, the presentation of the OneNote output is not consistently scaled:
OneNote Snips Side-by-Side
Yet another edit:
Having learned that printing to OneNote actually is done via the XPS printer, I made an XPS printout and used the XPS Viewer to print using "Send to OneNote 2016" and "Send to OneNote". The XPS file alternates from Portrait to Landscape to Portrait. When displayed in either version of OneNote, the "Send to OneNote 2016" display has consistent scaling for each page; the "Send to OneNote" display forces the landscape page to have the same width as the portrait page:
Pictorially:
The XPS file for the curious:
XPS file on OneDrive
Related
i'm trying to print an invoice from an ASP.NET application to an Epson LX 300+. The problem i have is that i cannot use traditional ReportViewer because printing icon only works on Internet Explorer, the users use Mozilla and Chrome.
We tried to render a HTML page for the invoice and print, but horizontally is reduced around a 50%.
So we are trying create a ReporViewer and export it to a PDF, then open it using PDF.js... the result is the same horizontally 50% less.
The page size is Statement. I'm attaching 2 images printed from the PDF.js
I've noticed if we vary the resolution of the printer, it's 90% horizontally, but also changes the vertically.
Your help would be really appreciated. Regads. Also We tried on Chrome but its really fuzzy.
Printed from PDFjs on Mozilla 120x72dpi
Printed form PDFjs on Mozilla 120x144dpi
I am trying to print an HTML document of dynamic height to PDF. The document is made up of a variety of inputs and textareas, and I use flexbox for much of the layout. I've been doing some manual testing by filling up some of the inputs or textareas with text and then printing to PDF. The preview contained 22 pages on my laptop. I then tested the exact same file on a tablet and then on a desktop computer. The number of pages created was inconsistent, and sometimes off by a large number of pages. For example, my laptop printed 22 pages and the tablet 28. Why? How can I get consistent printing across devices? I would like to be able to have the exact same physical dimensions in the PDF for the exact same HTML content no matter what device or screen resolution or screen size I am printing from.
I've captured a photo from in apple iphone 5s.
Dimension of the image is 960x1280.
Horizontal and vertical resolution is 72 dpi, Bit depth 24.
When I show the image in the img tag, the image is automatically rotated from portrait to horizontal.
But when I see the actual image, but the image is in computer in portrait mode only.
I don't know where is the issue.
I've opened in the ms paint to. I didn't get the issue.
I really confused in this. I've opened the image(which is in portrait mode) in ms paint and saved again in the same portrait mode itself. Now I've showed in the img tag, now the image is showing correctly in portrait mode itself in img tag. No issue has occurred. Working perfectly. Why the ios image is dynamically changing from portrait to horizontal?. I've checked with [http://imgur.com/ ]. The same issue has occurred in this application too.
How to resolve this?
Sometimes when you take a photo with an iPhone it embeds orientation information in the Exif metadata. Some applications understand this, some don't (web browsers don't), so you see different results.
Saving in MS Paint or, for example, "Save for Web" in Photoshop saves the image in the correct orientation, and strips the Exif data. You can also manually rotate the image on your phone, which will actually change the pixels, rather than just the Exif data.
How to restrict browser view to Landscape on a mobile browser in HTML5? On potrait view, it should display "Switch to landscape mode" and load when it is turned to landscape mode.
you can use the "onorientationchange" event of your browser. I extracted a working example from one of my testing projects: http://jsfiddle.net/r9b8D/
Its not exactly what you are looking for, but it shows the implementation of "onorientationchange". Copy the jsfiddle example to your host and navigate to the site with your mobile phone to see what happens - Maybe you can navigate to jsfiddle with your phone, i am not sure.
Feel free to modify the example to fit your needs.
my environment is SQL 2005, SSRS 2005 , .net 2.0
Client is experiencing following issue on two different printers. ( Canon and Lanier LD140).
We have a report which is designed as landscape report.
When report is send to print,
First page is rendered in portrait mode(cutting of the information on the right side. )
rest of the pages print in landscape mode.
did anyone have similar issue and knows how to fix it so first page gets printed in landscape mode?
thanks.
We tried printing on other printers and it worked fine.
Issue was later resolved for printers in questions by updating their printer drivers.