Giter Club home page Giter Club logo

Comments (7)

terryburton avatar terryburton commented on May 23, 2024

What implementation of the PS VM are you using?

What does it output when processing the following:

%!PS
/a == (0900000000) cvi ==
/b == 3600000000 ==
/c == (0900000000) cvi 3600000000 gt ==

from postscriptbarcode.

elvijsm2 avatar elvijsm2 commented on May 23, 2024

I am on GPL Ghostscript 10.01.2. The output is

/a
900000000
/b
3600000000
/c
false

I encountered the error via treepoem (version 3.23.0) which packages its own barcode.ps. I now built bwipp myself and pointed treepoem to use the barcode.ps under ./build/monolithic_package and ./build/monolithic. With the former, I get the same error, whereas with the latter it works fine. The generated barcode image can also be properly decoded.

from postscriptbarcode.

terryburton avatar terryburton commented on May 23, 2024

I now built bwipp myself and pointed treepoem to use the barcode.ps under ./build/monolithic_package and ./build/monolithic. With the former, I get the same error, whereas with the latter it works fine. The generated barcode image can also be properly decoded.

That appears to be a bug in the packaged resource encoder (which I don't maintain). This replaces strings with more efficient binarised tokens. Seems like it's getting the maths wrong for large integers.

If you replace the code in the source .ps file as follows, then rebuild the monolithic_package, does it work?

- cvi 3600000000 gt { pop /bwipp.GS1badLongitude (Invalid value for longitude) false exit } if
+ cvi (3600000000) cvi gt { pop /bwipp.GS1badLongitude (Invalid value for longitude) false exit } if

from postscriptbarcode.

elvijsm2 avatar elvijsm2 commented on May 23, 2024

Yes, if I change src/gs1process.ps as suggested and then make again, using the resulting ./build/monolithic_package/barcode.ps gives the same output as with ./build/monolithic/barcode.ps.

from postscriptbarcode.

terryburton avatar terryburton commented on May 23, 2024

The packages in release 2023-12-07 now include the workaround.

from postscriptbarcode.

elvijsm2 avatar elvijsm2 commented on May 23, 2024

Tested on the latest master 4e130138bddab39193290416841b477e50c9dde8, the generation works fine now 👍

from postscriptbarcode.

terryburton avatar terryburton commented on May 23, 2024

Thanks.

from postscriptbarcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.