Git Product home page Git Product logo

jpdf's Introduction

New version is at here ❌

Required Classes -

from junior.tablepdf import TableContentParser as Parser

from junior.tablepdf import Runner as runner

Parser Class -

parser = Parser(name:str)

!this name variable is important it will be the name of the pdf output file and also the raw value file name of the doc.

.putKeysAndValues(heads:list,body:list) method —

.putKeysAndValues(headings:list,body:list) - the headings and the body are the list values which will be the contents of the pdf file.

Parsing values —

Most important method to create PDF doccument.

parse() - it parses the values given in the .putKeysAndValues(head:list,body:list)

finally use the Runner class the create the PDF Documment.

Runner Class -

from junior.tablepdf import Runner as runner

.run(name=None,orientation=None)

•Note: this method is not static method.

.run() — method takes 2 argument name and orientation. name variable is takes the value given to the @Parser() class at the top, without this value the output cannot be created it will throw "NoFileFound" or "FileNotFoundError.

the orientation could be "L" for landscape or "P" for potrait. or pass nothing and the PORTRAIT is default orientation of the PDF doc.

Example -

from junior.tablepdf import TableContentParser as Parser

from junior.tablepdf import Runner as runner

parser=Parser("my_first_pdf_in_python")

parser.putKeysAndValues(["Name","Age","Contact"],["JuniorXR","18","[email protected]","JuniorXR","18","[email protected]"])

parser.parse()

runner().run("my_first_pdf_in_python")

jpdf's People

Contributors

juniorxr avatar

Watchers

 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.