Do you mean a library for creating a PDF file?
There are a lot of open source libraries available, such as Apache PDFBox for Java.