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 9196457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:51:14+00:00 2026-06-17T21:51:14+00:00

I use GS with DjVu driver, as in this example: gs %gs_args% -dProvideUnicode -dExtractText

  • 0

I use GS with DjVu driver, as in this example:

gs %gs_args% -dProvideUnicode -dExtractText -sDEVICE=djvusep -o out.sep in.ps

and noticed issue, that with some files text is not correctly extracted (I get question marks in clipboard on copying text from generated file).

I thought it’s some issue with encoding, and removed -dProvideUnicode switch, but then text is not extracted at all, and I assume that -dExtractText flag, specific only to this driver, needs it to function properly.

Trying to run single page PDF file (that generated in.ps through ps2write device), with ps2ascii gives also no text. But other tools like pdfminer, xpdf, extract correct text. Also PDF viewers like SumatraPDF that uses mupdf, or Acrobat, extract the text as expected.

Does anyone maybe knows something about these undocumented switches, and what could be the problem here?

Update: This only happens if I go through ps2write route. If instead I use PDF directly there is no issue.

Here is encoding info from the PDF file:

c:\temp>pdf-parser -s encoding sample.pdf
obj 11 0
 Type: /Font
 Referencing: 12 0 R, 20 0 R

  <<
    /BaseFont /XQKNMY+TT14112O00
    /FontDescriptor 12 0 R
    /Type /Font
    /FirstChar 32
    /LastChar 144
    /Widths [
253 0 0 0 0 0 0 0 293 293 0 0 220 313 220 0
0 467 467 0 0 0 467 0 467 467 0 0 0 0 0 0
0 680 0 0 0 653 0 773 760 0 0 740 0 833 0 0
0 0 0 480 613 0 680 0 0 0 0 0 0 0 0 0
0 407 513 414 500 414 320 447 513 227 0 467 227 773 513 513
513 0 333 367 293 487 467 667 460 414 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
220]
    /Encoding 20 0 R
    /Subtype /Type1
  >>

obj 20 0
 Type: /Encoding
 Referencing:

  <<
    /Type /Encoding
    /BaseEncoding /WinAnsiEncoding
    /Differences [
144/quoteright]
  >>
  • 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-17T21:51:15+00:00Added an answer on June 17, 2026 at 9:51 pm

    This isn’t really a Ghostscript question. The djvu device is decidedly non-standard in a Ghostscript build. I can’t tell you anything about the switches, because they are specific to the DejaVu device.

    If all you want to do is extract the text from a file you could use the txtwrite device (with recent versions of Ghostscript).

    If you use a PDF file then a ToUnicode CMap may be present in the file and can be used to get Unicode information about the text. PostScript does not contain ToUnicode CMaps and so the Unicode information is NOT available from the PostScript file. I would imagine this is why the ps2write output can’t have text extracted from it by the device.

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

Sidebar

Related Questions

use case example I have a servlet that is receiving login requests. If a
Use case example: Client A comes to request sales information, enters their zip code
Use Eclipse Classic with ADT plugin. Tried to make project from existing example of
use strict; use Time::HiRes qw[gettimeofday tv_interval]; my $start_index = int(rand(50))+100;#this value is arbitrary for
Use scenario is pretty simple: I have a desktop only application that could be
use strict; my $world =52; my $in = 42 ; my $world=42; my $out
Use case: I find a piece of code that I do not understand at
Use a hidden field will fix my issue... i got it.. Hi All, I
Use trap to capture signals like this: i=-1;while((++i<33)); do trap echo $i >> log.txt
Use case is this: I want to unit test (in browser, QUnit or something

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.