From fab9a473fcee282ad1f9c40c4cb6f5b60f0aa0f8 Mon Sep 17 00:00:00 2001 From: GloamXun Date: Tue, 20 Oct 2026 21:16:45 +0800 Subject: [PATCH] Render route-D preview pages at page size --- src/route_d.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/route_d.rs b/src/route_d.rs index f0bb0b4..60a9ef5 100755 --- a/src/route_d.rs +++ b/src/route_d.rs @@ -51,7 +51,10 @@ pub fn preview_json(source: &str) -> Result { json.push_str("{\"status\":\"ok\",\"pageWidthMm\":215.90,\"pageHeightMm\":279.40,\"pages\":["); let mut page_count = 0usize; for page in engine.pages() { - let svg = page.display_list().to_svg(); + let mut list = page.display_list(); + list.width = list.width.max(612 * SCALE); + list.height = list.height.max(PAGE_HEIGHT_PT * SCALE); + let svg = list.to_svg(); if page_count > 0 { json.push(','); }