Coder Social home page Coder Social logo

pdf-filler's Introduction

Quickstart

  1. Install Node.js if you don't already have it
  2. Install Yarn if you don't already have it
  3. Clone the AcroForms branch of the pdf-lib library:
    git clone -b AcroForms https://github.com/Hopding/pdf-lib.git
  4. Enter the directory:
    cd pdf-lib
  5. Install the required packages:
    yarn install
  6. Build the library:
    yarn build
  7. Print the current working directory by typing pwd (or cd if you're on Windows)
  8. Clone this project:
    git clone https://github.com/ricky-sb/PDF-Filler
  9. Enter the directory:
    cd PDF-Filler
  10. Copy the path from Step 7 into Line 7 of this project's package.json file
  11. Run node build/form.js to fill out the form
  12. Open output.pdf to see your results

Notes

  • Yes, we have to manually compile pdf-lib because AcroForms hasn't been packaged/released yet. It should happen within the next few weeks.
  • See src/form.ts for the implementation. It should give you an idea of a path forward.
  • I got the magic string topmostSubform[0].Page4[0].TextField1[2] from looking at the form field properties in PDFEscape.
    1. Load the PDF into PDFEscape
    2. Right click one of the form fields and click "Unlock Form Field"
    3. Accept the confirmation dialog by pressing "Yes"
    4. Right click the same form field and click "Object Properties"
    5. Copy the name from the "Name" section

pdf-filler's People

Contributors

ricky-sb avatar

Watchers

 avatar  avatar

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.