jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
47.16k stars 4.77k forks source link

Print Actual Size not possible #1043

Open damon-atkins opened 1 year ago

damon-atkins commented 1 year ago

Preflight Checklist

Describe the bug Print options in 15.2.5 have Adjust to 100% and Fit too. There is no "Actual Size" Option. So that the dimensions on the drawing match the dimensions of the print out. It seems the diagram is always fitted into the printable margins of the target printer.

I could see "Fit to pages", missing a Right Gutter, Left Gutter, Top Gutter, & Bottom Gutter Option as printers can not print to the edge of the page. And assume people who use this option are going to stick the pages together. (Might be able to get the Gutter size from the printer driver) An example 3mm all sides except the bottom 12.7mm, as the page is no longer on the page feeder wheels.

Might be also a good idea to add Gutter Size greyed out on the screen when only working on a single sheet of paper.

To Reproduce Steps to reproduce the behaviour:

Expected behaviour "Actual Size printed, even if it means cutting parts of the diagram off.

Screenshots If applicable, add screenshots to help explain your problem. Example Landscape B4 diagram printed to a Portrait A4. image

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

Additional context The following is a svg with draw io embedder A5 Example drawio

webwizard65 commented 1 year ago

Same issue here, on diagrams.net 19.0.3. Attached is a very simple file with two jigs to be printed as a test. After printing on a HP CP1025, I end up with very different sizes. The 19 mm rectangle is actually 17.5 and the 95 mm one is 86. Turning the page in landscaper mode ends up with 13 and 65 mm respectively. I tried searching online for a calibration procedure or setting to no avail. I think this is a huge problem, that make the program nearly useless for many things. jig.zip

pweaver2019 commented 1 year ago

Same with 20.04. I created a layout of a panel I'm creating only to find out the printed page is no where near the size of the parts. Very disappointing that you can draw a circle exactly 13.4 mm but not print it.

damon-atkins commented 1 year ago

@davidjgraph which pull request fix this?

davidjgraph commented 1 year ago

None, we just cannot fix it, so we close such issues to avoid confusion that it might be fixed.

webwizard65 commented 1 year ago

Maybe I misunderstood--or at least I hope I did--are you telling me that you have a program drawing shapes, complete with dimensions measured in millimeters, but that you cannot PRINT that same shape of the dimensions indicated by those millimeters? Tell me I have misunderstood, or else it will be a case of checking the calendar, since it's not the first of April. There is no other purpose, in stating a measurement in centimeters for a shape, than to have its equivalent on paper, so the "we can't fix it," sorry, but doesn't work...

damon-atkins commented 1 year ago

@davidjgraph Thanks for looking at this issue. However its a good idea when close an issue to include a comment, as when other people search issues they can see the out come.

I would suggest if Draw I/O allows the entering of mm/inch, it allows people to select a page size (assumed) so their diagram fits/readable on a page e.g. A4/US and the writing is readable. If you select an A4 page and draw a diagram people expect the printed output to be the same as what the see on the page.

If their is no support for printing what you see on the virtual A4 page on the A4 page the same way, then the page layout should be removed.

If their is no support for printing a square at X mm dimension and having it print at X mm dimension, then using mm/inches should be removed.

I believe in the settings you set a conversion between points and mm. I hope the mm are recorded inside the diagram rather than the mm converted to points, as if someone changes this conversion setting the mm would be out.

Some times people what to draw something to be printed so they can place it over a material and cut it out to size. Current Draw-I/O gives the appearance this is possible. From your feed back it is not, and it will not be fixed.

davidjgraph commented 1 year ago

How about export to PDF and print that?

pweaver2019 commented 1 year ago

I tested the export to PDF then printing the PDF at 100%. That looks much better, I don't know if the sizes are all 100% exact, but for the project I'm doing the printout looks good enough. If the "Print" function cannot be fixed then my suggestion is to remove "Print" and only allow the export to PDF or clearly document that "Print" will not give the results people expect.

damon-atkins commented 1 year ago

@davidjgraph thanks for re-opening the issue. <mxGeometry x="19.68" y="16" width="783.463" height="551.18" as="geometry" /> I assume the file contains points.

It seems in Drawio that 1mm is 3.937 points, 0.5mm is 1.9685 points (computers are not good at fractions) and 1 inch is 100 points. (1 inch is 25.4mm and one millimeter is equal to 0.03937 inches)

Only advance export has DPI. Apparently you can just see the dots if you place your face against a page when printing at 1200dpi (about 50 dots per mm)

It would be nice if their was an option to switch to a smaller scale like 10 points is 1mm.

Export to PDF first then print at "Actual Size" seems to be better, would be hard to tell if the printer is slightly out or the PDF is slightly out. FYI (1 point is 1/72 inch , 0.352806mm in a PDF, https://www.debenu.com/kb/converting-pixels-and-inches-to-postscript-points/ & https://www.gdpicture.com/guides/gdpicture/About%20a%20PDF%20format.html )

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

damon-atkins commented 1 year ago

Pls re-open.

Sidelobe commented 6 months ago

Reproduced on draw.io v22.03 on macos

I've tried everything (including going via PDF) -- I'm not able to print a simple diagram to scale. I'm not talking about minor differences .. printout is about ~60mm instead of the 66mm in the drawing.