Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

How to make a PDF file manually

51 sec read

pdf_icon

PDF Files are very complex files and we always recommend you use a library such as JPedal when working with them. But it is possible to make a PDF file manually using nothing more than a simple text editor. Here we show you how.

You don’t need to be a magician to create PDF’s

A PDF file is a complex file format. Originally designed by Adobe, it is now an ISO standard of over 1000 pages. PDF files are unusual in that they do not contain the actual content (like a Word or Text file), but the information needed to create the display of the content when the PDF viewer puts it all together.

It is a simplified version of PostScript, where you create a program which runs to generate the output. This is why they are very hard to hack – you are editing the program to generate the content, not the actual content.

A PDF file contains a set of objects with a table telling you where the objects are all located in the PDF file. The objects themselves contain a mix of binary and text content. If you know what you are doing, you can create it yourself.

If I still have not put you off,  my colleague Daniel shows you how to build a really simple PDF file in this series of posts on How to Make your own PDF file manually



Our software libraries allow you to

Convert PDF to HTML in Java
Convert PDF Forms to HTML5 in Java
Convert PDF Documents to an image in Java
Work with PDF Documents in Java
Read and Write AVIF, HEIC, WEBP and other image formats
Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.