]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Now reports all id's which were referenced but do not exist, rather than just the...
authorJordan Naftolin <jordan@apache.org>
Thu, 20 Jul 2000 18:46:23 +0000 (18:46 +0000)
committerJordan Naftolin <jordan@apache.org>
Thu, 20 Jul 2000 18:46:23 +0000 (18:46 +0000)
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

index 6ab34ba1dba300bfa2dd5ee53eb894fa38f25478..f2e9312b44db9752a634f8ac4e28355a6dc457f7 100644 (file)
@@ -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();