ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.67k stars 314 forks source link

Print feature ignores paper size, always produces A4 size printouts #560

Open PJ-Singh-001 opened 3 years ago

PJ-Singh-001 commented 3 years ago

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

The print feature always produces A4 size documents, ignoring the paper size set in ONLYOFFICE.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  1. Create a new document in ONLYOFFICE
  2. Set page size: "Envelope #10 (10.48 cm x 24.13 cm)"
  3. Set orientation: "Landscape"
  4. Set Margins: "Narrow" (optional)
  5. Type the text (address information) in the document
  6. Click the print icon above the menu bar
  7. In the print document dialog, select "Print to File (PDF)" from the drop down
  8. Click the Print button
  9. Notice the generated PDF is A4 size, not Envelope #10 size

As you can see from the PDF, the PDF printer received the #10 Envelope, from step 2 above, with A4 size dimensions.

Additional testing:

If you have a printer that warns you if a print job has the incorrect size than the paper available in the tray, repeat step 7 by selecting that printer. For example the HP 8740 has such a feature, and will not print jobs with the incorrect size. The printer will refuse to print the malformed document and will display the following message:

The paper size detected by the printer in Tray 1 does not march the paper size selected (A4 (210x297 mm)) for the print job. Make sure the paper size is correct to continue the job. Touch X to cancel the print job.

As you can see from this message, the HP printer also received the #10 Envelope, from step 2 above, with A4 size dimensions.

What is the expected behavior?

Documents should be sent to the printer (physical printer or PDF printer) with the correct size.

Correct behavior can be simulated by using the Save As feature:

  1. Create a new document in ONLYOFFICE
  2. Set page size: "Envelope #10 (10.48 cm x 24.13 cm)"
  3. Set orientation: "Landscape"
  4. Set Margins: "Narrow" (optional)
  5. Type the text (address information) in the document
  6. Do not select the "Print" option
  7. Select "File" from the menu bar
  8. Select "Save As"
  9. Enter a file name
  10. From the drop down at the bottom of the Save dialog, select "PDF File"
  11. Click the "Save" button
  12. Notice the generated PDF is #10 Envelop size (10.48 cm x 24.13 cm) as expected

Which versions of DesktopEditors, and which OS are affected by this issue? Did this work in previous versions of DesktopEditors?

Ubuntu 20.04 onlyoffice-desktopeditors 6.1.0-90

I do not think this worked in previous versions of ONLYOFFICE.

Rita-Bubnova commented 3 years ago

Hello, @PJSingh5000. Thank you for report. I can confirm - this is bug, issue 48456 in our private issue tracker.

chrisonhub commented 7 months ago

Gosh. Still a bug at the end of 2023. MacOS 12.7.1 using ONLYOFFICE 7.5.1 (435) x86_64.

I created an example document to demonstrate the problem. Created, set paper size to A5. Filled with text and when printing it looks correct in the print dialog, and in a resulting PDF, but when actually printed it drops it into the middle of an A4 sheet. This means that putting A5 paper in, you only get the edge of the text landing on the paper. onlyoffice_a5_issue onlyoffice_a5_issue.pdf onlyoffice_a5_issue.docx

The file was saved as a docx and opened in TextMaker 2021 and printed correctly, with all the same printer and settings so the bug seems to reside in ONLYOFFICE. Can someone look at this please?

PJ-Singh-001 commented 7 months ago

@chrisonhub , please upvote the bug report. (I don't know if they consider upvotes when prioritizing bugs, but it couldn't hurt.)