Coder Social home page Coder Social logo

Comments (6)

dwarring avatar dwarring commented on August 23, 2024

pdf-checker is complaining because it's expecting a UInt (non-negative integer) for /StructParent entries, but the above example it's getting a negative value -167.

I rechecked Annotations (table 164 in the spec). I think the error is valid. These values are an array index and shouldn't be negative.

Although pdf-checker being a bit spammy and reporting multiple warnings, before it finds the error.

from pdf-class-raku.

dwarring avatar dwarring commented on August 23, 2024

Where are the errors coming from in the first place?

from pdf-class-raku.

dwarring avatar dwarring commented on August 23, 2024

The pdf-append script produces this warning, if I add a negative /StructParent to a PDF Annotation. It probably shouldn't.

$ raku -I . bin/pdf-append.raku /tmp/pdf-annot.pdf  /tmp/pdf-annot.pdf
unable to coerce object -1 of type Int to UInt
  in method coerce-to at /home/david/git/rakudo-main/install/share/perl6/site/sources/5E3ADB461D8B2C83796E0BC14B0BE93B46986FFF (PDF::COS::Coercer) line 62
unable to coerce object -1 of type Int to UInt
  in method coerce-to at /home/david/git/rakudo-main/install/share/perl6/site/sources/5E3ADB461D8B2C83796E0BC14B0BE93B46986FFF (PDF::COS::Coercer) line 62
unable to coerce object -1 of type Int to UInt
  in method coerce-to at /home/david/git/rakudo-main/install/share/perl6/site/sources/5E3ADB461D8B2C83796E0BC14B0BE93B46986FFF (PDF::COS::Coercer) line 62

from pdf-class-raku.

dwarring avatar dwarring commented on August 23, 2024

Warning is useless anyway, it doesn't indicate where in the PDF the problem is.

from pdf-class-raku.

dwarring avatar dwarring commented on August 23, 2024

@tsalada - I've removed those warnings. They were being produced while the PDF objects were being copied.

pdf-checker (as you've already noticed) can be used to find an errors in the input PDF anyway.

Please upgrade to the latest PDF 0.5.4, which I've just uploaded to the zef ecosystem. This release suppresses those warnings.

from pdf-class-raku.

tsalada avatar tsalada commented on August 23, 2024

This worked. I was able to extract the pages I needed. Thanks.

from pdf-class-raku.

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.