You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Martin Hilpert (JIRA)" <ji...@apache.org> on 2010/09/08 17:02:33 UTC

[jira] Created: (PDFBOX-823) DocumentInformation is not visible (with Acrobat Reader)

DocumentInformation is not visible (with Acrobat Reader)
--------------------------------------------------------

                 Key: PDFBOX-823
                 URL: https://issues.apache.org/jira/browse/PDFBOX-823
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 1.3.0
         Environment: JDK 1.6.0_21, Windows XP 32 Bit
            Reporter: Martin Hilpert


I try to set PDF document inforamtion (http://pdfbox.apache.org/userguide/metadata.html), but the final PDF doesn't have my information set! E.g.

final PDDocumentInformation pddi = doc.getDocumentInformation();
pddi.setAuthor("MeAndMyself");

I debugged and ensured that after creation of PDF with APache FOP, this is the last action on the PDF done. But when viewing with Acrobat Reader, only the information that I set during FOP rendering is shown.

But then I noticed that when I view the PDF file with FoxIt Reader (4.0), File > Properties show all the properties I set like Title, Author, Producer. Viewing this exact same PDF file with Acrobat Reader (9.3.4), this properties are not shown (and some other properties are shown I set during the first FOP PDF Rendering to produce the PDF).

I wonder if there are multiple ways to store such information in a PDF? Why is showing FoxItReader the properties I set afterwards with PDFBox, but Adobe Reader ignores those Properties and show the properties set on the first PDF generation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-823) NullPointerException in DateConverter.toISO8601(DateConverter.java:221)

Posted by "Martin Hilpert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Hilpert updated PDFBOX-823:
----------------------------------

    Comment: was deleted

(was: Found XMP Metadata example.)

> NullPointerException in DateConverter.toISO8601(DateConverter.java:221)
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-823
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-823
>             Project: PDFBox
>          Issue Type: Bug
>          Components: JempBox
>    Affects Versions: 1.2.1
>         Environment: JDK 1.6.0_21, Windows XP 32 Bit
>            Reporter: Martin Hilpert
>
> I tried to add metadata as shown in AddMetadataFromDocInfo.java. There's also the line
>    basicSchema.setModifyDate( info.getModificationDate() );
> but I get a NullPointerException at this line:
>     java.lang.NullPointerException
>     	at org.apache.jempbox.impl.DateConverter.toISO8601(DateConverter.java:221)
>     	at org.apache.jempbox.xmp.XMPSchema.setDateProperty(XMPSchema.java:249)
>     	at org.apache.jempbox.xmp.XMPSchemaBasic.setModifyDate(XMPSchemaBasic.java:266)
> because the info.getModificationDate() returns null. It would be better to catch null parameters in the metadata set methods.
> Workaround:
>             if (pddi.getModificationDate() != null) {
>                 basicSchema.setModifyDate(pddi.getModificationDate());
>             }//else: avoid NPE

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-823) NullPointerException in DateConverter.toISO8601(DateConverter.java:221)

Posted by "Martin Hilpert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Hilpert updated PDFBOX-823:
----------------------------------

              Summary: NullPointerException in DateConverter.toISO8601(DateConverter.java:221)  (was: DocumentInformation is not visible (with Acrobat Reader))
    Affects Version/s: 1.2.1
                           (was: 1.3.0)
          Description: 
I tried to add metadata as shown in AddMetadataFromDocInfo.java. There's also the line

   basicSchema.setModifyDate( info.getModificationDate() );

but I get a NullPointerException at this line:

    java.lang.NullPointerException
    	at org.apache.jempbox.impl.DateConverter.toISO8601(DateConverter.java:221)
    	at org.apache.jempbox.xmp.XMPSchema.setDateProperty(XMPSchema.java:249)
    	at org.apache.jempbox.xmp.XMPSchemaBasic.setModifyDate(XMPSchemaBasic.java:266)

because the info.getModificationDate() returns null. It would be better to catch null parameters in the metadata set methods.

Workaround:

            if (pddi.getModificationDate() != null) {
                basicSchema.setModifyDate(pddi.getModificationDate());
            }//else: avoid NPE

  was:
I try to set PDF document inforamtion (http://pdfbox.apache.org/userguide/metadata.html), but the final PDF doesn't have my information set! E.g.

final PDDocumentInformation pddi = doc.getDocumentInformation();
pddi.setAuthor("MeAndMyself");

I debugged and ensured that after creation of PDF with APache FOP, this is the last action on the PDF done. But when viewing with Acrobat Reader, only the information that I set during FOP rendering is shown.

But then I noticed that when I view the PDF file with FoxIt Reader (4.0), File > Properties show all the properties I set like Title, Author, Producer. Viewing this exact same PDF file with Acrobat Reader (9.3.4), this properties are not shown (and some other properties are shown I set during the first FOP PDF Rendering to produce the PDF).

I wonder if there are multiple ways to store such information in a PDF? Why is showing FoxItReader the properties I set afterwards with PDFBox, but Adobe Reader ignores those Properties and show the properties set on the first PDF generation?

          Component/s: JempBox
                           (was: PDModel)

Found XMP Metadata example.

> NullPointerException in DateConverter.toISO8601(DateConverter.java:221)
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-823
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-823
>             Project: PDFBox
>          Issue Type: Bug
>          Components: JempBox
>    Affects Versions: 1.2.1
>         Environment: JDK 1.6.0_21, Windows XP 32 Bit
>            Reporter: Martin Hilpert
>
> I tried to add metadata as shown in AddMetadataFromDocInfo.java. There's also the line
>    basicSchema.setModifyDate( info.getModificationDate() );
> but I get a NullPointerException at this line:
>     java.lang.NullPointerException
>     	at org.apache.jempbox.impl.DateConverter.toISO8601(DateConverter.java:221)
>     	at org.apache.jempbox.xmp.XMPSchema.setDateProperty(XMPSchema.java:249)
>     	at org.apache.jempbox.xmp.XMPSchemaBasic.setModifyDate(XMPSchemaBasic.java:266)
> because the info.getModificationDate() returns null. It would be better to catch null parameters in the metadata set methods.
> Workaround:
>             if (pddi.getModificationDate() != null) {
>                 basicSchema.setModifyDate(pddi.getModificationDate());
>             }//else: avoid NPE

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-823) NullPointerException in DateConverter.toISO8601(DateConverter.java:221)

Posted by "Martin Hilpert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Hilpert updated PDFBOX-823:
----------------------------------

    Comment: was deleted

(was: Ha: the FoxIt Reader "Document Properties" window also has a butten "More...". If I click it, a new window "Properties of <file name>" shows up - it's tab "PDF" also shows the old/wrong title (set by Apache FOP PDF generation) , but the new creator set by PDFBOx ...!?!?

So, there really seems to be multiple "PDF properties"?)

> NullPointerException in DateConverter.toISO8601(DateConverter.java:221)
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-823
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-823
>             Project: PDFBox
>          Issue Type: Bug
>          Components: JempBox
>    Affects Versions: 1.2.1
>         Environment: JDK 1.6.0_21, Windows XP 32 Bit
>            Reporter: Martin Hilpert
>
> I tried to add metadata as shown in AddMetadataFromDocInfo.java. There's also the line
>    basicSchema.setModifyDate( info.getModificationDate() );
> but I get a NullPointerException at this line:
>     java.lang.NullPointerException
>     	at org.apache.jempbox.impl.DateConverter.toISO8601(DateConverter.java:221)
>     	at org.apache.jempbox.xmp.XMPSchema.setDateProperty(XMPSchema.java:249)
>     	at org.apache.jempbox.xmp.XMPSchemaBasic.setModifyDate(XMPSchemaBasic.java:266)
> because the info.getModificationDate() returns null. It would be better to catch null parameters in the metadata set methods.
> Workaround:
>             if (pddi.getModificationDate() != null) {
>                 basicSchema.setModifyDate(pddi.getModificationDate());
>             }//else: avoid NPE

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-823) DocumentInformation is not visible (with Acrobat Reader)

Posted by "Martin Hilpert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907253#action_12907253 ] 

Martin Hilpert commented on PDFBOX-823:
---------------------------------------

Ha: the FoxIt Reader "Document Properties" window also has a butten "More...". If I click it, a new window "Properties of <file name>" shows up - it's tab "PDF" also shows the old/wrong title (set by Apache FOP PDF generation) , but the new creator set by PDFBOx ...!?!?

So, there really seems to be multiple "PDF properties"?

> DocumentInformation is not visible (with Acrobat Reader)
> --------------------------------------------------------
>
>                 Key: PDFBOX-823
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-823
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.3.0
>         Environment: JDK 1.6.0_21, Windows XP 32 Bit
>            Reporter: Martin Hilpert
>
> I try to set PDF document inforamtion (http://pdfbox.apache.org/userguide/metadata.html), but the final PDF doesn't have my information set! E.g.
> final PDDocumentInformation pddi = doc.getDocumentInformation();
> pddi.setAuthor("MeAndMyself");
> I debugged and ensured that after creation of PDF with APache FOP, this is the last action on the PDF done. But when viewing with Acrobat Reader, only the information that I set during FOP rendering is shown.
> But then I noticed that when I view the PDF file with FoxIt Reader (4.0), File > Properties show all the properties I set like Title, Author, Producer. Viewing this exact same PDF file with Acrobat Reader (9.3.4), this properties are not shown (and some other properties are shown I set during the first FOP PDF Rendering to produce the PDF).
> I wonder if there are multiple ways to store such information in a PDF? Why is showing FoxItReader the properties I set afterwards with PDFBox, but Adobe Reader ignores those Properties and show the properties set on the first PDF generation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.