Git Product home page Git Product logo

Comments (4)

JasonBarnabe avatar JasonBarnabe commented on June 2, 2024 1

With 2.0.3 the pdf.sign call no longer fails, but if I add pdf.save(output_file) at the end of the script above, I get:

TypeError: no implicit conversion of nil into String
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/filters/predictors.rb:191:in `+'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/filters/predictors.rb:191:in `png_pre_prediction'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/filters/predictors.rb:96:in `apply_pre_prediction'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/filters/predictors.rb:65:in `pre_prediction'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/filters/flate.rb:44:in `encode'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/filters.rb:353:in `encode'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/stream.rb:481:in `encode_data'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/stream.rb:379:in `block in encode!'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/stream.rb:367:in `downto'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/stream.rb:367:in `encode!'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/stream.rb:289:in `encoded_data'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/stream.rb:392:in `to_s'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/pdf.rb:929:in `block (2 levels) in output'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/pdf.rb:854:in `each'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/pdf.rb:854:in `block in output'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/pdf.rb:819:in `each'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/pdf.rb:819:in `output'
	from /Users/jason/.rvm/gems/ruby-2.3.3/gems/origami-2.0.3/lib/origami/pdf.rb:223:in `save'
	from (irb):17
	from /Users/jason/.rvm/rubies/ruby-2.3.3/bin/irb:11:in `<main>'

from origami.

JasonBarnabe avatar JasonBarnabe commented on June 2, 2024

I found that I could read this document with origami by running it through gs -o output.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress input.pdf first. So not sure if this is a known "limitation" or what, but perhaps this would be a good suggestion for the readme?

from origami.

gdelugre avatar gdelugre commented on June 2, 2024

This problem should now be fixed in 2.0.3.

from origami.

zymtx5g79k avatar zymtx5g79k commented on June 2, 2024

2.1.0 Not resolved. But it works when lazy: true

Origami::PDF.read INPUTFILE, lazy: true

from origami.

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.