From e2b50e0e82e941a45951ccf9186da0ffdfd8b926 Mon Sep 17 00:00:00 2001 From: Jordan Naftolin Date: Thu, 20 Jul 2000 18:46:23 +0000 Subject: [PATCH] Now reports all id's which were referenced but do not exist, rather than just the first invalid id. Also fixes small bug with invalid page-number-references git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193536 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/render/pdf/PDFRenderer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java index 6ab34ba1d..f2e9312b4 100644 --- a/src/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/org/apache/fop/render/pdf/PDFRenderer.java @@ -168,8 +168,8 @@ public class PDFRenderer implements Renderer { this.renderPage((Page) e.nextElement()); } - if ( !idReferences.isEveryIdValid() ) { - throw new FOPException("The id \""+idReferences.getNextInvalidId()+"\" was referenced but does not exist\n"); + if ( !idReferences.isEveryIdValid() ) { + throw new FOPException("The following id's were referenced but not found: "+idReferences.getInvalidIds()+"\n"); } MessageHandler.logln("writing out PDF"); @@ -1445,6 +1445,10 @@ public class PDFRenderer implements Renderer { String s; if ( area.getPageNumberID()!=null ) { // this text is a page number, so resolve it s = idReferences.getPageNumber(area.getPageNumberID()); + if(s==null) + { + s=""; + } } else { s = area.getText(); -- 2.39.5