A simple & minimal wrapper library around PDFGen to generate resume/documents/books.
I need to generate PDF files, mostly to write my resume. There are some options avilable:
- WYSIWYG tools like Microsoft Word or open source alternatives.
- Typesetting systems like Tex/Latex, groff/troff/nroff, etc..
- Online websites.
I tested all of the them and TBH none of satisfied me. The values that i appreciate:
-
having a tool to allows me generate a PDF file in a simple and minimal manner.
-
having 100% control over my tool.
-
less LOC can means more chance to read(and understand) the source code by people:
- LOC of latex: 620428
- LOC of PDFGen repo: 5987, LOC of bisotun: 400 --> in total: less than 7000!
-
and it's not only about LOC. it's also about complexity. i think Latex/Tex is over-complicated for such a simple task.
-
And finally i don't want to talk about online tools, since you don't even know what's happening behind the scene :)
To use bisotun, you can just add it as a git submodule to your current project like this:
git submodule add https://github.com/LinArcX/bisotun
git submodule update --init --recursive
or if you want to do the old way, just copy:
bisotun.c
bisotun.h
PDFGen/pdfgen.c
PDFGen/pdfgen.h
into your project's directory. there's a example directory that you can find how to use the library.
In example/ directory, you can find resume.c which is currently created as a template for resume files. for sure you can change it based on your taste :) To compile it, you just need a c compiler:
gcc -lm -g -o ./output/resume ./examples/resume.c PDFGen/pdfgen.c bisotun.c
And to run it:
./output/resume
It will generate a pdf file called: resume.pdf
. now you can open it with any pdf-reader software.
- PDFGen currently doesn't support using TTF fonts.
- It doesn't support hyperlinks.
- PDFGen doesn't support alpha channels in images.