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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:47:29+00:00 2026-06-17T16:47:29+00:00

Solution is in last comment, but just in case if anyone is looking for

  • 0

Solution is in last comment, but just in case if anyone is looking for workaround I summarized it here: http://sourceforge.net/mailarchive/message.php?msg_id=30391589


I managed to build GSDjVu with MinGW and current stable GhostScript (9.06). Quest in transforming Bash scripts to CMD wasn’t so hard, but I was surprised that gsdjvu (gs interpreter with gsdjvu driver) doesn’t accept PDF for input as expected. It accepts only PostScript. To avoid writing huge temp files I thought to make a pipeline, and here is example:

set args=-sstdout=nul -dSAFER -dNOPAUSE -dBATCH

gs %args% -sDEVICE=pswrite -sOutputFile=- test.pdf |^
   gsdjvu %args% -sDEVICE=djvusep -sOutputFile=- - |^
   csepdjvu - test.djvu

Which results in error:

*** csepdjvu: corrupted input file (lost RLE sync.)
*** (..\..\..\tools\csepdjvu.cpp:647)

Internal error at ./base/gdevdjvu.c:2831

 
If I output the result of gsdjvu to a file instead pipe, then there is no error:

gs %args% -sDEVICE=pswrite -sOutputFile=- test.pdf |^
   gsdjvu %args% -sDEVICE=djvusep -sOutputFile=test.sep -

csepdjvu test.sep test.djvu

 
Now if I compare file output from gsdjvu (test.sep) and pipe output from same (test2.sep):

gs %args% -sDEVICE=pswrite -sOutputFile=- test.pdf |^
   gsdjvu %args% -sDEVICE=djvusep -sOutputFile=- - > test2.sep

I get this diff:

screenshot

which after trivial analyses reveals that 0A is represented in piped output as 0D0A, or “line endings” are changed from Unix LF to Windows CRLF.

Why can this be, and is there a way to remedy it?
Or maybe it is a bug?

  • 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-17T16:47:30+00:00Added an answer on June 17, 2026 at 4:47 pm

    I’m not sure how DjVuLibre can fail to accept PDF as an input, since as far as I know it is a Ghostscript device. Do you have some documentation that says this can’t be done ? If so, I would complain to the maintainers, I can’t see any reason for this.

    Since this works with file output, the logical answer is that there is some newline translation going on.

    Some quick googling reveals that there is a lot of discussion about this, but I can’t see anything which precisely matches your experience. You should probably tag this for MingW or more sensibly take it to a MingW support forum.

    Or just stop piping the I/O around.

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

Sidebar

Related Questions

I'm sure there's an easy answer here and i'm just over-complicating things, but i
I found a comment here: http://bakery.cakephp.org/articles/PHPdiddy/2006/10/06/custom-urls-from-the-site-root That said: Just change last line. Router::connect('/ ',
For the last three/four months i've deployed PostGIS locally but now i've just been
So, since the last question, I found that my solution is to duplicate the
i searched google but can't seem to find a working solution. the situation is
I've a rare situation here and I need some ideas, I just prove a
I realise this question has cropped up a few times here but I cannot
I have three tables that are joined. I almost have the solution but there
Just working on a image uploader/resizer in my asp.net 4 web forms project. Does
Solution: API 11 is needed see answer below! Easy Question: After downloading a File

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.