Giter Site home page Giter Site logo

pdf-detiler's Introduction

PDF De-Tiler

npm version

Command line tool which takes PDFs which have multiple pages and produces a PDF which is just one page, wherein the contents of the page are the contents of the input PDF's pages tiled.

Created with garment patterns in mind, but can theoretically be used on most PDFs.

Caveats

This tool is not very complicated, and assumes the following are true for the input PDF:

  • All of the pages are the same size (the tool uses the first page's dimensions to compute the output size)
  • The pages are in order; left-to-right, top-to-bottom (ie. if you have a 3 column output, page 1 is the top left corner, page 4 is right below page 1, and so on)

The tool also may not handle very large (> 100 page) PDFs at this time. Please file an issue if you have a PDF of that size that you wish to convert.

Quickstart

PDF De-Tiler requires Node.js. To get a copy, go to the Node.js Downloads Page and run the relevant installer for your system.

Once you have Node.js, install the tool by running the following command in a terminal:

npm i -g pdf-detiler

You can now begin to use the tool! Just specify the PDF you want to convert, and the number of columns that PDF has:

pdf-detiler -columns 4 my-cool-pattern.pdf

By default, the tool assumes the specified file path is relative to the working directory the CLI was run from.

Questions, Comments, Concerns, Issues

Please feel free to file a new issue on this project's issue tracker (link) or by starting a new discussion (link).

Contributing

Want to make a change? Feel free to send a PR.

That being said, the codebase needs a little sprucing up: it could use some unit tests, a linter, and various other small cleanups and documentation. Until that all gets in place, just try to follow the Google Javascript Style Guide where possible, but don't worry about being rigourous about adhereing to it.

pdf-detiler's People

Contributors

ava-cassiopeia avatar

Watchers

 avatar

pdf-detiler's Issues

Create Electron App

Create an electron version of the app, complete with binary distribution.

Use PDF.JS v2.6.347 From NPM When It Becomes Available

Right now, to make the Electron app correctly use PDF.JS, I've manually included files from the v2.6.347 release of Mozilla's PDF.JS, which is currently in a pre-release state.

The current release, v2.5.207, has a bug with Electron wherein it doesn't correctly detect the Electron environment as being a NodeJS environment. Therefore, it cannot be used, but there's no way to get v2.6.347 from NPM, so I've manually committed the v2.6.347 files into the Electron build instead for the time being. This should be fixed when v2.6.347 becomes a full release.

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.