Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8112285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:26:29+00:00 2026-06-06T02:26:29+00:00

I already know about Ghostscript front end viewers; but I was wondering how gs

  • 0

I already know about Ghostscript front end viewers; but I was wondering how gs itself could be used for viewing PDF documents?

The closest I could get to, is to specify explicitly x11 window as output device, specify width and height of the window via -g, and specify rasterization resolution via -r; or, a command line like this:

gs -sDevice=x11 -g500x500 -r150x150 -dFirstPage=3 fontspec.pdf

… which results with something like:

ghostscript-viewing.png

… which is, in fact, all good – except, it starts at lower left corner; and there are no keyboard shortcuts (as far as I can see) here to move the viewport, or to perform some zooming.

I’m aware that ghostscipt probably doesn’t have mouse/keyboard interaction for navigating a x11 window output, given that something like that is reserved for front-end viewers like gv. So, the closest thing to that (for me) in ghostscript would be – how to render a specific region of a page? Via -d and -r the most important parameters are already specified – I’d just want to, say, specify a different point than 0x0 (say, x=100 y=100) as a lower left corner when viewing.

(In other words, I’d like to say to ghostscript: show page 3 of document.pdf, rasterized at 150×150, in a window of 500×500, starting from lower-left corner x,y=100,100).

How can this be done in ghostscript? Are there command line switches for that – or would one have to use postscript language commands in terminal, once ghostscript has loaded?

Many thanks in advance for any answers,
Cheers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:26:36+00:00Added an answer on June 6, 2026 at 2:26 am

    No, AFAIK, Ghostscript itself doesn’t provide what you want (a ‘viewport’). That’s exactly what the ghostview and gv GUI frontends are for.

    Ghostscript treats the x11 device (almost) as a print page output device, and print pages do have fixed sizes, and you cannot move a ‘viewport’ of the page image on them either — unless you do re-print them with a different setting: and this is then where a differently valued -c "<</PageOffset [-150 133]>> setpagedevice" parameter comes into play…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are already some posts about this topic, but I cannot find
I already know GitHub thing. But it isn't original EASTL. I also heard about
I already know about the UserLanguageID and SystemLanguageID properties, but is there any way
I've been searching & googling a lot about this question, and I already know
Pardon me if this has already been asked (I know very little about Data
Hey I know there are already a few posts about this - yet I
I already know about Ctrl + L to delete an entire line...is there one
I'm afraid I already know the answer to this, but I'm checking with the
I'm learning about bit-flags. I already know how they work and how they are
To quote diveintopython, You already know about data attributes, which are variables owned by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.