{"id":13588954,"url":"https://github.com/tushar-rishav/code2pdf","last_synced_at":"2025-04-05T02:12:00.886Z","repository":{"id":55929276,"uuid":"42791470","full_name":"tushar-rishav/code2pdf","owner":"tushar-rishav","description":":fax: Convert various source codes into pdf file with custom features","archived":false,"fork":false,"pushed_at":"2022-07-21T21:08:48.000Z","size":164,"stargazers_count":348,"open_issues_count":12,"forks_count":33,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-13T09:47:53.942Z","etag":null,"topics":["linux","pdf-generation","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tushar-rishav.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-19T22:13:44.000Z","updated_at":"2024-09-18T17:46:29.000Z","dependencies_parsed_at":"2022-08-15T09:40:38.724Z","dependency_job_id":null,"html_url":"https://github.com/tushar-rishav/code2pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar-rishav%2Fcode2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar-rishav%2Fcode2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar-rishav%2Fcode2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar-rishav%2Fcode2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tushar-rishav","download_url":"https://codeload.github.com/tushar-rishav/code2pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","pdf-generation","python"],"created_at":"2024-08-01T16:00:15.442Z","updated_at":"2025-04-05T02:12:00.870Z","avatar_url":"https://github.com/tushar-rishav.png","language":"Python","funding_links":[],"categories":["PYTHON","Python"],"sub_categories":[],"readme":"Code2pdf \n--------------\n\nConvert various source code into pdf file with syntax highlighting and many more\nfeatures\n\n`Demo`_\n-------\n  Click above for demo\n\nDependencies\n~~~~~~~~~~~~\n\n`PyQt \u003chttp://www.riverbankcomputing.com/software/pyqt/download\u003e`__\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nInstallation\n~~~~~~~~~~~~\n\nBuild from source\n'''''''''''''''''\n\n.. code:: sh\n\n    git clone https://github.com/tushar-rishav/code2pdf.git\n    cd code2pdf\n    python setup.py install\n\nOr\n\nUsing pip\n'''''''''\n\n.. code:: sh\n\n    pip install code2pdf\n\nUsage\n~~~~~\n\nA. As console app\n'''''''''''''''''\n\nHelp\n    \n\n.. code:: sh\n\n    code2pdf -h\n\nUsage\n     \n\n``code2pdf [-h] [-l] [-s SIZE] [-S NAME] [-v] filename [outputfile]``\n\nOptions\n       \n\n.. code:: sh\n\n    positional arguments:\n      filename              absolute path of the python file\n      outputfile            absolute path of the output pdf file\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -l, --linenos         include line numbers.\n      -s SIZE, --size SIZE  PDF size. A2,A3,A4,A5 etc\n      -S NAME, --style NAME\n                            the style name for highlighting. Eg. emacs, vim style etc.\n      -v, --version         show program's version number and exit\n\nAvailable style types are\n                         \n\n-  [x] autumn\n-  [x] borland\n-  [x] bw\n-  [x] colorful\n-  [x] default\n-  [x] emacs\n-  [x] friendly\n-  [x] fruity\n-  [x] igor\n-  [x] manni\n-  [x] monokai\n-  [x] murphy\n-  [x] native\n-  [x] paraiso-dark\n-  [x] paraiso-light\n-  [x] pastie\n-  [x] perldoc\n-  [x] rrt\n-  [x] tango\n-  [x] trac\n-  [x] vim\n-  [x] vs\n-  [x] xcode\n\nExample\n       \n\n.. code:: sh\n\n     code2pdf -l -s a3 -S emacs ~/Code2Pdf/Code2pdf/code2pdf.py ~/Code2Pdf/Demo/demo.pdf\n\nTo see the demo for above check ``Demo/`` in github repo\n\nB. As module\n''''''''''''\n\n.. code:: py\n\n        \n    from Code2pdf.code2pdf import Code2pdf\n    ifile,ofile,size = \"test.py\", \"test.pdf\", \"A4\"\n    pdf = Code2pdf(ifile, ofile, size)  # create the Code2pdf object\n    pdf.init_print()    # call print method to print pdf\n\nContributions\n~~~~~~~~~~~~~\n\nHave an idea to make it better? Go ahead! I will be happy to see a pull\nrequest from you! :blush:\nWhile creating a PR, please update the *Contributor* section too( see below ).\n\nContributor\n~~~~~~~~~~~\n\n`Christopher Welborn \u003chttps://github.com/cjwelborn\u003e`__\n\n`cclauss \u003chttps://github.com/cclauss\u003e`__\n\n.. _Demo: https://cloud.githubusercontent.com/assets/7397433/10060934/645a3cc6-6272-11e5-9ebb-a1ac24c86d67.gif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftushar-rishav%2Fcode2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftushar-rishav%2Fcode2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftushar-rishav%2Fcode2pdf/lists"}