Ejemplo n.º 1
0
 @Test
 public void testTitlePageWithCovert() {
   Map<String, String> options = new HashMap<String, String>();
   options.put(PDFTitlePage.COVERT_FILE_KEY, coverImage.getAbsolutePath());
   PDFTitlePage page = doc.addTitlePage("This is a title", "and this their subtitle", options);
   boolean fired;
   try {
     page.create();
     fired = false;
   } catch (IOException e) {
     fired = true;
   }
   assertFalse(fired);
 }
Ejemplo n.º 2
0
 @Test
 public void testTitleWithProperties() {
   Map<String, String> options = new HashMap<String, String>();
   for (int i = 0; i < 5; i++) {
     options.put("Key " + i, "Property " + i);
   }
   PDFTitlePage page = doc.addTitlePage("This is a title", "and this their subtitle", options);
   boolean fired;
   try {
     page.create();
     fired = false;
   } catch (IOException e) {
     fired = true;
   }
   assertFalse(fired);
 }