These pages might then be written to a new PDF file or merged with an existing one. As another example, it's often useful to generate a periodic report or a large set of reports all at once from an existing database. With pj these could be created as PDF files, or a preformatted document could be populated with fields from the database. In other cases the data fields are already in PDF files, and we want to make modifications or export them to be indexed with a search engine. It is not difficult and would be a good exercise to develop a utility that can export all of the text from a PDF document.
Document conversion is a somewhat more difficult problem.
PDF is a good intermediate encoding for richly formatted text and graphics, because it has much of the power of PostScript but also maintains some logical organization of text and other content. For example, it's easy for a search engine to directly index a highly formatted, uncompressed PDF document, since individual words are represented in plain text. Converting between PDF and a simple format such as HTML is relatively easy, if format variations are not too critical. Working with PDF in Java offers excellent potential for Web integration, because of the strong support for Java within popular browsers. The current method for displaying PDF is with a browser plug-in.