You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Guillaume Bailleul (JIRA)" <ji...@apache.org> on 2012/08/07 22:02:10 UTC

[jira] [Comment Edited] (PDFBOX-1374) Error On MetaData: Title

    [ https://issues.apache.org/jira/browse/PDFBOX-1374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430580#comment-13430580 ] 

Guillaume Bailleul edited comment on PDFBOX-1374 at 8/7/12 8:00 PM:
--------------------------------------------------------------------

This is an encoding problem of the last character

Try this little example

		PDDocument document = PDDocument.load(path);
		PDDocumentCatalog catalog = document.getDocumentCatalog();
		PDDocumentInformation info = document.getDocumentInformation();
		
		PDMetadata metadata = catalog.getMetadata();
		
		XMPDocumentBuilder builder = new XMPDocumentBuilder();
		XMPMetadata rxmp = builder.parse(metadata.createInputStream());

We have to find if the problem is from PDF part or xmp part

		DublinCoreSchema dc = rxmp.getDublinCoreSchema();
		
		System.err.println(info.getTitle());
		System.err.println(dc.getTitle());

                
      was (Author: gbm.bailleul):
    This is an encoding problem of the last character

Try this little example

		PDDocument document = PDDocument.load(path);
		PDDocumentCatalog catalog = document.getDocumentCatalog();
		PDDocumentInformation info = document.getDocumentInformation();
		
		PDMetadata metadata = catalog.getMetadata();
		
		XMPDocumentBuilder builder = new XMPDocumentBuilder();
		XMPMetadata rxmp = builder.parse(metadata.createInputStream());

		DublinCoreSchema dc = rxmp.getDublinCoreSchema();
		
		System.err.println(info.getTitle());
		System.err.println(dc.getTitle());

                  
> Error On MetaData: Title
> ------------------------
>
>                 Key: PDFBOX-1374
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1374
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Preflight, XmpBox
>    Affects Versions: 1.7.1, 1.8.0
>         Environment: Linux
>            Reporter: William Fausser
>             Fix For: 1.8.0
>
>         Attachments: AA.pdf
>
>
> The file/home/fausser/AA.pdf is not valid, error(s) :
> 7.2 : Error on MetaData, Title present in the document catalog dictionary doesn't match with XMP information

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira