blob: 9e33f57ff3d647441dffee1dc3f8a48958deb18f [file]
<!--
! Licensed to the Apache Software Foundation (ASF) under one or more
! contributor license agreements. See the NOTICE file distributed with
! this work for additional information regarding copyright ownership.
! The ASF licenses this file to You under the Apache License, Version 2.0
! (the "License"); you may not use this file except in compliance with
! the License. You may obtain a copy of the License at
!
! http://www.apache.org/licenses/LICENSE-2.0
!
! Unless required by applicable law or agreed to in writing, software
! distributed under the License is distributed on an "AS IS" BASIS,
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
! See the License for the specific language governing permissions and
! limitations under the License.
!-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>PDFBox - How to build PDFBox</title>
</header>
<body>
<section>
<title>Building PDFBox</title>
<p>
This page will describe how to build PDFBox. Most users should find the binary releases adequate, but
if you are contributing to PDFBox then you will need to know how to properly build the project.
</p>
<p>
You can obtain the latest source of PDFBox from SVN, see the
<a href="http://incubator.apache.org/pdfbox/download.html">Apache Incubator</a>
site for information
about how to connect to SVN. The below instructions should also work for a released/nightly distribution.
</p>
<p>
<ol>
<li>Install <a href="http://ant.apache.org/">ANT</a>, PDFBox currently uses 1.6.2 but other
versions probably work as well.</li>
<li>(Optional)Setup Apache Forrest, Forrest is used for
PDFBox documentation but is not required to compile PDFBox.
<ol>
<li>Install <a href="http://forrest.apache.org/">Forrest</a></li>
<li>In the build.properties, set the forrest.home property
<br /><br />
<table>
<tr><td>
forrest.home=c:\\javalib\\apache-forrest-0.6\\src\\core
</td></tr>
</table><br />
</li>
</ol>
</li>
<li>(Optional)Place the junit.jar file in the ANT_HOME\lib directory. This is required
to run the junit tests but not to compile PDFBox.</li>
<li>(Optional)Setup IKVM, if you want to build the .NET DLL version of PDFBox.
<ol>
<li><a href="http://www.ikvm.net/">IKVM</a> binaries</li>
<li>In the build.properties, set the ikvm.dir property
<br /><br />
<table>
<tr><td>
ikvm.dir=C:\\javalib\\ikvm-12-07-2004\\ikvm
</td></tr>
</table><br />
</li>
</ol>
</li>
<li>Run 'ant' from the root PDFBox directory. This will create the .zip package
distribution. See the build file for other ant targets.</li>
</ol>
<note>If you want to run PDFBox from an IDE them you will need to add the 'Resources' directory
to the project classpath in your IDE.
</note>
</p>
</section>
<section>
<title>Running/Debugging PDFBox in Eclipse</title>
<p>
In order to run PDFBox from within Eclipse there are a couple things that need to be setup. Certain
pieces of functionality require access to the Resources folder. Here is an example of what you need
to do to run the ExtractText command line application.
<ol>
<li>In Eclipse click on "run..." or "debug..."</li>
<li>In the tree on the left select "Java Application" and click "New"</li>
<li>Name it, select the correct project, and the main class</li>
<li>Select the "Arguments" tab and enter the command line arguments to the app</li>
<li>Select the "Classpath" tab, the pdfbox project and jars should already be added in the "User Entries"</li>
<li>Select the "User Entries" item and click the "Advanced" button</li>
<li>The "Add Folder" radio button should be selected, press ok</li>
<li>Select the root of the pdfbox project, this will make the "Resources" folder available on the classpath.</li>
</ol>
</p>
</section>
</body>
</document>