[vim/vim] Postscript files have always Portrait orientation (Issue #16156)

8 views
Skip to first unread message

mx518

unread,
Dec 2, 2024, 5:00:10 AM12/2/24
to vim/vim, Subscribed

Steps to reproduce

echo test > test.txt
vim -c "set printoptions=portrait:n | ha > lan.ps | q" test.txt && ps2pdf lan.ps
vim -c "set printoptions=portrait:y | ha > por.ps | q" test.txt && ps2pdf por.ps

Expected behaviour

Expectingt that the .ps files have different orientations,
however both show: %%Orientation: Portrait
pdf also only rotates the text, not the page.
image.png (view on web)

Version of Vim

9.0-1-1378, 1499

Environment

WSL

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/16156@github.com>

Christian Brabandt

unread,
Dec 4, 2024, 2:58:26 PM12/4/24
to vim/vim, Subscribed

Hm, can you test the following change please?

diff --git a/src/hardcopy.c b/src/hardcopy.c
index 8abfff210..785a3f554 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -2742,7 +2742,7 @@ mch_print_begin(prt_settings_T *psettings)

     prt_dsc_textline("CreationDate", get_ctime(time(NULL), FALSE));
     prt_dsc_textline("DocumentData", "Clean8Bit");
-    prt_dsc_textline("Orientation", "Portrait");
+    prt_dsc_textline("Orientation", prt_portrait ? "Portrait" : "Landscape");
     prt_dsc_atend("Pages");
     prt_dsc_textline("PageOrder", "Ascend");
     // The bbox does not change with orientation - it is always in the default


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/16156/2518439214@github.com>

mx518

unread,
Dec 5, 2024, 2:33:05 AM12/5/24
to vim/vim, Subscribed

Thanks, LGTM!

image.png (view on web)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/16156/2519458592@github.com>

Christian Brabandt

unread,
Dec 6, 2024, 11:21:10 AM12/6/24
to vim/vim, Subscribed

Closed #16156 as completed via ee9bc68.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/16156/issue_event/15562785402@github.com>

Reply all
Reply to author
Forward
0 new messages