[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gv] [Bug 640255] gv displays some landscape PDFs incorrectly

From: Mircea Hossu
Subject: Re: [bug-gv] [Bug 640255] gv displays some landscape PDFs incorrectly
Date: Sat, 24 Aug 2019 15:48:27 +0300
User-agent: Cyrus-JMAP/3.1.6-916-g49fca03-fmstable-20190821v7

This is an answer to an old post from 2011:

One (verified) fix to this problem is described below:

(1) Replace one line in `pdf2dsc.ps` (distributed with Ghostscript (`gs`)):

    (/DoPDFPage {dup /Page# exch store pdfgetpage pdfshowpage } def\n) puts
    (/DoPDFPage {dup /Page# exch store pdfgetpage dup /Rotate 0 put pdfshowpage 
} def\n) puts

(2) Save it under a different name (e.g. `pdf2dsc_.ps`) and replace the setting:
    GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s %s 
pdf2dsc_.ps -c quit

One needs to make sure `gs` can find this source file, e.g. through
the `GS_LIB` environment variable. Maybe it would be a good idea for
`pdf2dsc_.ps` to be part of `gv` and then the path would be known.

(3) A related problem to this issue has been observed: when a PDF with
*mixed* portrait-landscape pages is stepped through, page by page,
`gv` can get stuck in a rotated state. The following extra line fixes
this problem (although better solutions might exist): In file `ps.c`,
around line 948:

    /* Page Defaults for Version 3.0 files */
    doc->default_page_orientation = PORTRAIT;  // <= add this line

reply via email to

[Prev in Thread] Current Thread [Next in Thread]