MCPcopy Create free account
hub / github.com/ArtifexSoftware/mupdf / paperSizeName

Method paperSizeName

platform/java/example/Viewer.java:796–814  ·  view source on GitHub ↗
(int w, int h)

Source from the content-addressed store, hash-verified

794 }
795
796 protected static String paperSizeName(int w, int h)
797 {
798 /* ISO A */
799 if (w == 2384 && h == 3370) return "A0";
800 if (w == 1684 && h == 2384) return "A1";
801 if (w == 1191 && h == 1684) return "A2";
802 if (w == 842 && h == 1191) return "A3";
803 if (w == 595 && h == 842) return "A4";
804 if (w == 420 && h == 595) return "A5";
805 if (w == 297 && h == 420) return "A6";
806
807 /* US */
808 if (w == 612 && h == 792) return "Letter";
809 if (w == 612 && h == 1008) return "Legal";
810 if (w == 792 && h == 1224) return "Ledger";
811 if (w == 1224 && h == 792) return "Tabloid";
812
813 return null;
814 }
815
816 protected void showHelp() {
817 final Dialog box = new Dialog(this, "Help", true);

Callers 1

showInfoMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected