Code Monkey home page Code Monkey logo

Comments (6)

boazsegev avatar boazsegev commented on May 20, 2024 2

Hi Stefan,

Thank you very much for opening this issue and helping make the combine_pdf gem even better.

I had a quick look at the issue and it seems that the PDF file you showed me uses the wrong version identifier. The PDF file states PDF version 1.3 but uses features introduced only in PDF version 1.5 ...

... for performance reasons, the parser didn't check if Object Streams existed in this PDF file (following the rule that in version 1.3 they shouldn't exist) and didn't attempt to extract the data from them.

I updated the parser so that it will always search for Object Streams and this resolved the issue on my system.

Please install version 0.1.18. It should solve the issue for you.

Again, thanks you for opening this issue.

from combine_pdf.

ChigboIO avatar ChigboIO commented on May 20, 2024 1

Hi guys,

See this issue again on v0.2.31 when trying to combine a pdf generated by CombinePDF.

Couldn't connect reference for {:is_reference_only=>true, :indirect_generation_number=>0, :indirect_reference_id=>0, :referenced_object=>nil}

Do I have to update something on system?

Thank you.

from combine_pdf.

boazsegev avatar boazsegev commented on May 20, 2024 1

Hi @andela-echigbo ,

Thanks for posting.

I'm assuming the error you're posting shows Warning at the beginning?

I'm not sure, but in my head this is expected behavior. Please let me know if you're experiencing this as an error or a warning...

Let me explain why I suspect you're referencing an expected behavior when importing CombinePDF data.

PDFs have, sometimes, NULL objects (like nil in Ruby), with values that are empty.

In CombinePDF, the NULL object is object 0,0 (references in PDF files consist of two numbers).

These NULL objects are (often, but depending on the PDF specification version) marked by a reference to a non-existing object (which, according to the specification, faults to NULL).

The final value caused by this "broken" reference is nil (in Ruby) or NULL (in PDF jargon).

HOWEVER, this is not always the case. Different PDF authoring systems designate different objects for the NULL object (or they use the null keyword and a higher PDF version number) and sometimes these's a real issue with objects and missing references... that's where the warning comes in.

from combine_pdf.

ChigboIO avatar ChigboIO commented on May 20, 2024 1

Yes, you're right @boazsegev, it's a warning and things still works anyways. I'm sorry I didn't state that.
Thanks you

from combine_pdf.

stefanste avatar stefanste commented on May 20, 2024

Also incase it helps, just found a slightly older version of the same file which DOES work. I can't spot any difference, only 9 bytes difference between the two!
https://drive.google.com/file/d/0B4AGXAJrQz1ROWFNMGFSSE5kQkU/view

from combine_pdf.

stefanste avatar stefanste commented on May 20, 2024

Yep, works like a charm now. Thanks for the amazingly quick fix!

from combine_pdf.

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.