jamis / impose Goto Github PK
View Code? Open in Web Editor NEWA utility and library for imposition -- arranging pages on a sheet of paper for optimal printing
License: MIT License
A utility and library for imposition -- arranging pages on a sheet of paper for optimal printing
License: MIT License
I noticed only some of the images on the left side of the pdf (after the pdf has been imposed) are missing. But on the right side there's nothing missing. Can someone help me with this issue? I'm using the folio layout A4 .
# get this PDF
wget https://bayes.wustl.edu/etj/articles/random.pdf
impose random.pdf
/Library/Ruby/Gems/2.6.0/gems/pdf-impose-1.0.0/lib/pdf/impose/builder.rb:109:in `_apply': undefined method `[]' for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/2.6.0/gems/pdf-impose-1.0.0/lib/pdf/impose/builder.rb:101:in `initialize' from /Library/Ruby/Gems/2.6.0/gems/pdf-impose-1.0.0/bin/impose:143:in `new' from /Library/Ruby/Gems/2.6.0/gems/pdf-impose-1.0.0/bin/impose:143:in `<top (required)>' from /usr/local/bin/impose:23:in `load' from /usr/local/bin/impose:23:in `<main>'
The line in question is
source_width = @source.page(1).page_object[:MediaBox][2]
, and I believe this means that @source.page(1).page_object
is nil
.
Maybe this is therefore a bug in PDF::Reader
?
First of all, great work man, thanks a lot!
As mentioned in the official repository, PDF::Reader
former API is now deprecated.
Version 1.0.0 of PDF::Reader introduced a new page-based API that provides efficient and easy access to any page. The pre-1.0 API was deprecated during the 1.x release series, and has been removed from 2.0.0.
It would be awesome if you could update the API calls to the latest version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.