do i have to extend the DocumentTestCase class?
which java version is required for working with JPdfUnit?
what are the dependencies for JPdfUnit?
i cant find a certain text at the beginning or another location?
i cant find a text on a certain page?
how do i have to set the path to my pdf document?
do i have to extend the DocumentTestCase class?
You dont have to extend the DocumentTestCase class. You can also use the DocumentTester in your test because there are
some extensions which requires that you extend their TestCase class.
which java version is required for working with JPdfUnit?
Java 1.5 is required for working with JPdfUnit (for Java 1.4 support use version 0.94).
what are the dependencies for JPdfUnit?
For using JpdfUnit there are some dependencies which has to be set. There is a need to integrate JUnit
and PDFBox
into your own Project. After integrating the jars into your
own project now you should be able to write your own tests and to use the functionality of JpdfUnit.
i cant find a certain text at the beginning or another location?
this is a basic problem. a pdf document can contain more text as you expect. I.e. you have to set some text in
the background color to get a "blank" page with render x. Best practice is to look at the hole content of a page to get
the best informations about your text locations if you want to search for the text in a special way (i.e. beginnig, equals, end of the page)
i cant find a text on a certain page?
The page count of JPdfUnit is 1-based, means that a documents page number starts with 1.
how do i have to set the path to my pdf document?
You have two choices - relative or absolute. Relative means typically relative to the node where your java vm was started.
I.e:
If (working with a ms windows enviroment) {
absolute: d:\\workspaces/jpdfunit/jPdfUnit-SF/etc/testing-pdfs/DocumentEncryptionTest.pdf
relative: etc/testing-pdfs/DocumentInformationTest.pdf (relative to the project root within eclipse)
} else {
absolute: /home/.../build/orga/SeminarMitLogo/thepdf.pdf (relative to the project root within eclipse)
relative: build/orga/SeminarMitLogo/thepdf.pdf (relative to the project root within eclipse)
}