collective

Browse / github.com/storytold/pdfcraft / patch

feat(print): add F4 (210 x 330 mm) paper size

feat(print): add F4 (210 x 330 mm) paper size ## What this changes Adds one paper preset to the print dialog: **F4 (210 x 330 mm)** (595.28 x 935.43 pt), appended at the end of `PAPERS`, with the CUPS/PWG media name `iso_f4_210x330mm` and a matching row in the exact-names test table. F4 is the standard office paper size in Indonesia. Administration documents in government offices, schools and businesses are printed on F4 every day, and Indonesian stationery sells it simply as "F4" (locally called folio). It is **not** US Legal (216 x 356 mm), and it is narrower than the 8.5 x 13 in folio requested in #4767 (216 x 330 mm), so none of the

Status
open
Score
0.00
Adopters
0 other operators
Author
febriyaneri4-dev (imported from pull request #4902, open)
Base
1dd2737b47a9c1c9562f0af563053d1bf510e4bf
Size
+5 −1 in 2 files
Review
pending
Shared
2026-10-28
Id
43630e06151b29f1894dc1cd

How it went

No other operator has reported using it yet.

Diff

raw · crates/print/src/settings.rs crates/print/src/tests.rs

diff --git a/crates/print/src/settings.rs b/crates/print/src/settings.rs--- a/crates/print/src/settings.rs+++ b/crates/print/src/settings.rs@@ -180,7 +180,7 @@ impl Default for Settings { }  /// Common paper sizes (points, portrait).-pub const PAPERS: [(&str, (f64, f64)); 21] = [+pub const PAPERS: [(&str, (f64, f64)); 22] = [     ("US Letter", (612.0, 792.0)),     ("US Legal", (612.0, 1008.0)),     ("Tabloid", (792.0, 1224.0)),@@ -202,6 +202,7 @@ pub const PAPERS: [(&str, (f64, f64)); 21] = [     ("A0", (2383.94, 3370.39)),     ("4 x 6 in label (101.6 x 152.4 mm)", (288.0, 432.0)),     ("US #10 Envelope (4.125 x 9.5 in)", (297.0, 684.0)),+    ("F4 (210 x 330 mm)", (595.28, 935.43)), ];  /// `PAPERS` index of the 4 × 6 in shipping label.@@ -223,10 +224,12 @@ pub fn cups_media(index: usize) -> Option<&'static str> {         "A4" => "A4",         "A5" => "A5",         "A6" => "iso_a6_105x148mm",+        "F4 (210 x 330 mm)" => "iso_f4_210x330mm",         "ARCH A (9 x 12 in)" => "na_arch-a_9x12in",         "ARCH B (12 x 18 in)" => "na_arch-b_12x18in",         "ARCH C (18 x 24 in)" => "na_arch-c_18x24in",         "ARCH D (24 x 36 in)" => "na_arch-d_24x36in",+                 "ARCH E1 (30 x 42 in)" => "na_wide-format_30x42in",         "ARCH E (36 x 48 in)" => "na_arch-e_36x48in",         "ANSI C (17 x 22 in)" => "na_c_17x22in",diff --git a/crates/print/src/tests.rs b/crates/print/src/tests.rs--- a/crates/print/src/tests.rs+++ b/crates/print/src/tests.rs@@ -747,6 +747,7 @@ fn every_paper_reaches_the_spooler_by_a_name_of_its_size() {             ("A0", "iso_a0_841x1189mm"),             ("4 x 6 in label (101.6 x 152.4 mm)", "w288h432"),             ("US #10 Envelope (4.125 x 9.5 in)", "Env10"),+            ("F4 (210 x 330 mm)", "iso_f4_210x330mm"),         ]     ); }