Closed Bug 844090 Opened 12 years ago Closed 2 years ago

landscape pdfs are printed portrait with pdf.js

Categories

(Firefox :: PDF Viewer, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: spam, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [print2020][pdfjs-printing] )

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130215130331 Steps to reproduce: for example load http://www.co.monterey.ca.us/planning/howto/landscape_plan.pdf with pdf.js print the page Actual results: the page is printed portrait, with stuff cut off Expected results: the page should be printed landscape (->autorotated)
Component: Untriaged → PDF Viewer
Priority: -- → P3
Whiteboard: [pdfjs-c-integration][pdfjs-d-printing]
Another example is this MS Walk pledge sheet.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 19 Branch → Trunk
All plataforms... I have Windows 7 64bits and exist the problem.
Depends on: 851441
I can't provide a concrete example, but we use Oracle E-Business Suite where I do IT support and most of the generated reports in PDF format have this issue where the Adobe plug-in, with the 'Auto portrait/landscape' setting selected on the Print dialog, will automatically print these reports in landscape as our users expect. The native PDF viewer in Google Chrome also automatically prints them in landscape. PDF.js version 0.7.28 (Firefox 20), however, prints these reports in portrait.
Hello, Got the same problème, windows 7 SP1 x64, and aurora 28.0a2 (2014-02-02). Using http://www.co.monterey.ca.us/planning/howto/landscape_plan.pdf the printing is in protrait.
Attached file Printing result of a landscape PDF (deleted) —
This is the resulting printing of a landscape pdf with aurora 28.0a2 (2014-02-02).
It's using the last state of portrait or landscape as chosen in Print Preview. Instead of clicking the print button on the pdf.js toolbar you can press Alt-F-V to use print preview, then select portrait or landscape. Can the pdf.js toolbar be customized to add a print preview button?
A pdf open through Firefox internal previewer with only landscape pages should default print layout to landscape and print correctly. Instead - with FF 45.0 (but even on 44.0.2 and 43.x) a PDF with all (just one, in my test) pages in landscape is shown correctly in landscape, but is printed on portrait since when I click on the print icon on the top right header toolbar of the preview, the popup windows with the printing options has "Portrait" as layout default...
Blocks: 1615910
Whiteboard: [pdfjs-c-integration][pdfjs-d-printing] → [print2020]

Firefox 76
We frequently have documents created with both landscape and portrait oriented pages contained in the one document - example:

https://drive.google.com/file/d/1qZPXsI-k0-C-C6CiNbto-ixnQorLwKAA/view?usp=sharing

In firefox, this prints the portrait page correctly, but shrinks the landscape page to fit it's width into a portrait page:
https://drive.google.com/file/d/16uqlaJ5XLZYaY47fm3yEFmUh2IkTgSRs/view?usp=sharing

In chrome, this prints correctly:
https://drive.google.com/file/d/16wL8SpdC4PQLxqwzbNisuAZLF7P8pGIn/view?usp=sharing

Whiteboard: [print2020] → [print2020] [pdfjs-c-printing]
Whiteboard: [print2020] [pdfjs-c-printing] → [print2020][pdfjs-c-printing]
Whiteboard: [print2020][pdfjs-c-printing] → [print2020][pdfjs-printing]
Severity: normal → S2
OS: Windows XP → All
Hardware: x86 → All
Attached file Landscape_Plan.pdf (deleted) —

I think this was fixed by https://github.com/mozilla/pdf.js/pull/13120. Jonas, can you confirm?

Flags: needinfo?(jonas.jenwald)

(In reply to Marco Castelluccio [:marco] from comment #18)

I think this was fixed by https://github.com/mozilla/pdf.js/pull/13120. Jonas, can you confirm?

Yes, I'd say so since the examples above WFM now.

Flags: needinfo?(jonas.jenwald)

Let's call this fixed then.

I think the only two remaining issues are:

  1. the PDF preview could be nicer, so the landscape pages are actually shown in landscape orientation;
  2. when printing to PDF, the page is rotated.

I'm going to file two separate bugs for those.

Status: NEW → RESOLVED
Closed: 2 years ago
Depends on: 1702796
Resolution: --- → FIXED

(In reply to Marco Castelluccio [:marco] from comment #20)

I think the only two remaining issues are:

Isn't the issues here (at least partially) that we'd need to use e.g. @page rules, but I'm not sure how well supported that is in Firefox nowadays, to inform the printing back-end about the actual size/orientation of each page?

(In reply to Jonas Jenwald [:Snuffleupagus] from comment #21)

(In reply to Marco Castelluccio [:marco] from comment #20)

I think the only two remaining issues are:

Isn't the issues here (at least partially) that we'd need to use e.g. @page rules, but I'm not sure how well supported that is in Firefox nowadays, to inform the printing back-end about the actual size/orientation of each page?

Yes, I think that will be the "final" solution (filed bug 1795258).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: