GithubHelp home page GithubHelp logo

chikamichi / gitbook-plugin-pdf-styling Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 2.0 12.83 MB

A GitBook post-processing plugin to further customize your PDF renderings.

Home Page: https://www.gitbook.com

License: MIT License

JavaScript 100.00%

gitbook-plugin-pdf-styling's People

Contributors

chikamichi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gitbook-plugin-pdf-styling's Issues

HummusJS

HummusJS is available on npm and has mergePDFPagesToPage which could be used (twice in a row) to replicate pdftk's background operation. Maybe worth the try. There are more advanced features which could allow for thorough post-processing.

Add support for image background

Allow end-user to specify an image configuration key, whose value should be the path to an image to be used as the PDF background.

Wrong format

error: error with pdf-styling: Error: invalid book format
at /tmp/book/node_modules/gitbook-plugin-pdf-styling/lib/post_processing.js:38:13
at _fulfilled (/tmp/book/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/tmp/book/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/tmp/book/node_modules/q/q.js:749:13)
at /tmp/book/node_modules/q/q.js:810:14
at flush (/tmp/book/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
warn: aborting post-processing of pdf

What can I do to change the books format to get this to work?

Handle adding different layers as a background

Say:

  • using both an image (full alpha) & a solid color (alpha 0.6) on top of it;
  • using a solid color (full alpha) & an image (alpha 0.85) on top of it;
  • etc.

Requires implementing a queue of background-related post-processing, instead of limiting the end-user to one operation type. Probably simply require using an array in book.json.

Add support for color background

Allow end-user to specify an color configuration key, whose value should be a color hex code to be used as the PDF background (fill).

Add support for texture background

Allow end-user to specify an texture configuration key, whose value should be the path to a texture image to be used as the PDF background (fill).

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.