All Projects â†’ tushar-rishav â†’ Code2pdf

tushar-rishav / Code2pdf

Licence: mit
📠 Convert various source codes into pdf file with custom features

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Code2pdf

MarkdownIt
Efficient Code Editor to live render Markdown and save as Markdown,Html and Pdf with Instant Hosting in The Web.
Stars: ✭ 31 (-90.28%)
Mutual labels:  pdf-generation
stampadia
A daily print-and-play roguelike adventure you can play offline.
Stars: ✭ 35 (-89.03%)
Mutual labels:  pdf-generation
pdf-creator-node
This package is used to generate HTML to PDF in Nodejs
Stars: ✭ 122 (-61.76%)
Mutual labels:  pdf-generation
AusweisBot
Telegram bot to generate self-authorizations for moving around during covid-19 pandemic in France
Stars: ✭ 13 (-95.92%)
Mutual labels:  pdf-generation
Android-ConvertToPDF
How to convert a document to a PDF using iText and Aspose?
Stars: ✭ 17 (-94.67%)
Mutual labels:  pdf-generation
JasperReportsBoot
JasperReports font extensions and Spring Boot Sample
Stars: ✭ 18 (-94.36%)
Mutual labels:  pdf-generation
wkhtmltopdf-flask-aas
Wkhtmltopdf Flask As a Service
Stars: ✭ 17 (-94.67%)
Mutual labels:  pdf-generation
Hummusrecipe
A powerful PDF tool for NodeJS based on HummusJS.
Stars: ✭ 274 (-14.11%)
Mutual labels:  pdf-generation
magento2-module-pdf
Magento 2 Module for creating PDF's based on wkhtmltopdf
Stars: ✭ 55 (-82.76%)
Mutual labels:  pdf-generation
mr-pdf
PDF generator of document website
Stars: ✭ 58 (-81.82%)
Mutual labels:  pdf-generation
scryber.core
Scryber.Core is a dotnet 5 html to pdf engine written entirely in C# for creating beautiful flowing documents from html templates including css styles, object data binding and svg drawing.
Stars: ✭ 74 (-76.8%)
Mutual labels:  pdf-generation
JasperViewerFX
The JasperViewerFX is a free JavaFX library which aims to avoid use of JasperReport's swing viewer
Stars: ✭ 27 (-91.54%)
Mutual labels:  pdf-generation
MarkdownDoc
A Java tool/maven plugin/library to generate HMTL and PDF from markdown text intended for project documentation. Supports JSON based "stylesheet" for PDFs.
Stars: ✭ 21 (-93.42%)
Mutual labels:  pdf-generation
DrawPDF
Draw/Write pdf using Swift
Stars: ✭ 17 (-94.67%)
Mutual labels:  pdf-generation
gravity-pdf
Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.
Stars: ✭ 90 (-71.79%)
Mutual labels:  pdf-generation
pretty-resume
Generate a pretty resume! Templates based on salomonelli/best-resume-ever.
Stars: ✭ 41 (-87.15%)
Mutual labels:  pdf-generation
aws-lambda-pdf-generator-puppeteer
PDF generator for AWS lambda with puppeteer
Stars: ✭ 52 (-83.7%)
Mutual labels:  pdf-generation
Pandoc Latex Template
A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
Stars: ✭ 3,750 (+1075.55%)
Mutual labels:  pdf-generation
pytips
Python Tips contains code snippets that will help you learn Python
Stars: ✭ 179 (-43.89%)
Mutual labels:  pdf-generation
Resume-Builder
Android App to help you create your résumé
Stars: ✭ 37 (-88.4%)
Mutual labels:  pdf-generation

Code2pdf 📠

Convert given source code into .pdf with syntax highlighting and more features

Build Status Version Downloads Python
Build Status PyPI version PyPi downloads PyPI

Demo

demo

Installation

Build from source
git clone https://github.com/tushar-rishav/code2pdf.git
cd code2pdf
pip3 install .

Or

Using pip
pip3 install code2pdf

Usage

A. As console app
Help
code2pdf -h

Usage

code2pdf [-h] [-l] [-s SIZE] [-S NAME] [-v] filename [outputfile]

Options
positional arguments:
  filename              absolute path of the python file
  outputfile            absolute path of the output pdf file

optional arguments:
  -h, --help            show this help message and exit
  -l, --linenos         include line numbers.
  -s SIZE, --size SIZE  PDF size. A2,A3,A4,A5 etc
  -S NAME, --style NAME
                        the style name for highlighting. Eg. emacs, vim style etc.
  -v, --version         show program's version number and exit

Available style types are
  • [x] autumn
  • [x] borland
  • [x] bw
  • [x] colorful
  • [x] default
  • [x] emacs
  • [x] friendly
  • [x] fruity
  • [x] igor
  • [x] manni
  • [x] monokai
  • [x] murphy
  • [x] native
  • [x] paraiso-dark
  • [x] paraiso-light
  • [x] pastie
  • [x] perldoc
  • [x] rrt
  • [x] tango
  • [x] trac
  • [x] vim
  • [x] vs
  • [x] xcode
Example
 code2pdf -l -s a3 -S emacs ~/Code2Pdf/Code2pdf/code2pdf.py ~/Code2Pdf/Demo/demo.pdf

To see the demo for above check Demo/ in github repo

B. As module
	
from Code2pdf import Code2pdf
ifile,ofile,size = "test.py", "test.pdf", "A4"
pdf = Code2pdf(ifile, ofile, size)	# create the Code2pdf object
pdf.init_print()	# call print method to print pdf

Contributions

Have an idea to make it better? Go ahead! I will be happy to see a pull request from you! 😊

While creating a PR, please update the Contributor section too( see below ).

Contributor

Christopher Welborn

cclauss

Thommy257

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].