Giter Site home page Giter Site logo

pdfgeneration-lib's Introduction

PDFGeneration Lib

Rules

  • Add your version/tag release information on the change log
  • If you require the Charts Type install "vega": "5.20.2" and "sharp": "^0.29.0"

Getting started

  • Add the library in your package.json under dependencies "@thisisme/pdfgeneration-lib": "https://github.com/ThisIsMe-dev/PDFGeneration-lib#5.10.4"
  • npm install to install all your dependencies for your project

Current Types

Document Types

const PDFType = {
  DEFAULT: 0, // old style search/response
  CONTENTS_OF_PAGE: 1,
  NO_SERVICE_RESPONSE_HEADER: 2,
  COVER_PAGE: 3,
  COVER_AND_CONTENTS_OF_PAGE: 4,
};

Document Line Types

const PDFDocumentLineType = {
  DEFAULT_LINE: 0, // Just a placeholder, this currently does the same as a KEY_VALUE_LINE
  HEADER_LINE: 1, // A headerline (just a bit bolder than the normal lines)
  KEY_VALUE_LINE: 2, // The basic line we use for just a label and text line
  EMPTY_LINE: 3, // Functionally the same as END_LINE at the moment, this is just a more visible label for the user to understand what they are trying to accomplish
  ADDRESS_LINE: 4, // This splits a string on its commas into multiple lines
  COLUMN_INFO: 5, // This requires a value of object with rows defined in (SINGLE_COLUMN, DOUBLE_COLUMN, END_LINE) - this has a different type of header than META_INFO
  META_INFO: 6, // This requires a value of object with rows defined in (SINGLE_COLUMN, DOUBLE_COLUMN, END_LINE)
  SINGLE_COLUMN: 7, // This specifies that a row can only have 1 column
  DOUBLE_COLUMN: 8, // This specifies that you can have 2 columns
  END_LINE: 9, // Normally used to signal that your section ended
  GRID: 10, // Helps to create a list/table like display with columns, taking an array of objects
  TABLE_OF_CONTENTS_LINE: 11, // Line used to define table of contents page lines
  KEY_LINK_LINE: 12, // A line that allows the user to click to go to the provided URL
  INDICATIVE_BAR_LINE: 13, // Indicative bars designed with Credit Scores in mind
  IMAGE_LINE: 14, // A line that represents an image
  PAGE_BREAK: 15, // Skips to the top of a new page
}

PDF Image Types

const PDFImageType = {
  DEFAULT: 0, // Image(s) placed next to each other
  CENTER: 1, // Image positioned in the center of the line
}

pdfgeneration-lib's People

Contributors

herman26 avatar iamien avatar kingmonty avatar neil-tim avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.