You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Rene Smit (JIRA)" <ji...@apache.org> on 2010/04/06 14:31:33 UTC
[jira] Created: (PDFBOX-680) Adding XMP data to a PDF causes
different kinds of mutialitions of the original pdf.
Adding XMP data to a PDF causes different kinds of mutialitions of the original pdf.
------------------------------------------------------------------------------------
Key: PDFBOX-680
URL: https://issues.apache.org/jira/browse/PDFBOX-680
Project: PDFBox
Issue Type: Bug
Components: Writing
Affects Versions: 0.7.3
Environment: Windows XP
Reporter: Rene Smit
Priority: Blocker
Fix For: 0.7.3
We are using PdfBox for a Material Workflow application for one of the major Newspaper publishers in the Netherland.
One of the things we use PdfBox for is adding MMP data to the XML file.
Doing this causes different kinds of mutilation of the original pdf.
The way in which this occurs varies. Sometimes a character is altered, sometimes an element or complete ad is mutilated, sometimes the color of/in an ad is changed.
These files also tend crash Adobe Acrobat (Professional 9, with Pitstop Professional) (not all files);
The files also may create a "Failed to open PDF file" when trying to place it InDesign (not all files).
We use the following source in out application:
InputStream pdfStream = Core.getFileDocumentContent(pdfFileDocument.getMendixObject());
PDDocument pdfDoc = PDDocument.load(pdfStream);
PDDocumentInformation pdfInfo = pdfDoc.getDocumentInformation();
IMendixObject materiaalMetaMendixObject = xmpDocument.getMendixObject();
Set<String> memberKeys = materiaalMetaMendixObject.getMembers().keySet();
for (String memberKey : memberKeys) {
Object member = materiaalMetaMendixObject.getMember(memberKey).getValue();
if (member!= null) {
String memberString = member.toString();
if (memberKey.startsWith("XMP"))
pdfInfo.setCustomMetadataValue(memberKey, memberString);
}
}
pdfDoc.setDocumentInformation(pdfInfo);
pdfDoc.save(pdfOutputPath + File.separator + fileName);
pdfDoc.close();
pdfStream.close();
Please HELP
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PDFBOX-680) Adding XMP data to a PDF causes
different kinds of mutilations of the original pdf.
Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler updated PDFBOX-680:
--------------------------------------
Fix Version/s: (was: 0.7.3)
> Adding XMP data to a PDF causes different kinds of mutilations of the original pdf.
> -----------------------------------------------------------------------------------
>
> Key: PDFBOX-680
> URL: https://issues.apache.org/jira/browse/PDFBOX-680
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 0.7.3
> Environment: Windows XP
> Reporter: Rene Smit
> Priority: Blocker
> Attachments: Examples Pdf Mutilations.jpg
>
>
> We are using PdfBox for a Material Workflow application for one of the major Newspaper publishers in the Netherland.
> One of the things we use PdfBox for is adding MMP data to the XML file.
> Doing this causes different kinds of mutilation of the original pdf.
> The way in which this occurs varies. Sometimes a character is altered, sometimes an element or complete ad is mutilated, sometimes the color of/in an ad is changed.
> These files also tend crash Adobe Acrobat (Professional 9, with Pitstop Professional) (not all files);
> The files also may create a "Failed to open PDF file" when trying to place it InDesign (not all files).
> We use the following source in out application:
> InputStream pdfStream = Core.getFileDocumentContent(pdfFileDocument.getMendixObject());
> PDDocument pdfDoc = PDDocument.load(pdfStream);
> PDDocumentInformation pdfInfo = pdfDoc.getDocumentInformation();
>
> IMendixObject materiaalMetaMendixObject = xmpDocument.getMendixObject();
> Set<String> memberKeys = materiaalMetaMendixObject.getMembers().keySet();
> for (String memberKey : memberKeys) {
> Object member = materiaalMetaMendixObject.getMember(memberKey).getValue();
> if (member!= null) {
> String memberString = member.toString();
> if (memberKey.startsWith("XMP"))
> pdfInfo.setCustomMetadataValue(memberKey, memberString);
> }
> }
> pdfDoc.setDocumentInformation(pdfInfo);
> pdfDoc.save(pdfOutputPath + File.separator + fileName);
> pdfDoc.close();
> pdfStream.close();
> Please HELP
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PDFBOX-680) Adding XMP data to a PDF causes
different kinds of mutilations of the original pdf.
Posted by "Rene Smit (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rene Smit updated PDFBOX-680:
-----------------------------
Summary: Adding XMP data to a PDF causes different kinds of mutilations of the original pdf. (was: Adding XMP data to a PDF causes different kinds of mutialitions of the original pdf.)
> Adding XMP data to a PDF causes different kinds of mutilations of the original pdf.
> -----------------------------------------------------------------------------------
>
> Key: PDFBOX-680
> URL: https://issues.apache.org/jira/browse/PDFBOX-680
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 0.7.3
> Environment: Windows XP
> Reporter: Rene Smit
> Priority: Blocker
> Fix For: 0.7.3
>
>
> We are using PdfBox for a Material Workflow application for one of the major Newspaper publishers in the Netherland.
> One of the things we use PdfBox for is adding MMP data to the XML file.
> Doing this causes different kinds of mutilation of the original pdf.
> The way in which this occurs varies. Sometimes a character is altered, sometimes an element or complete ad is mutilated, sometimes the color of/in an ad is changed.
> These files also tend crash Adobe Acrobat (Professional 9, with Pitstop Professional) (not all files);
> The files also may create a "Failed to open PDF file" when trying to place it InDesign (not all files).
> We use the following source in out application:
> InputStream pdfStream = Core.getFileDocumentContent(pdfFileDocument.getMendixObject());
> PDDocument pdfDoc = PDDocument.load(pdfStream);
> PDDocumentInformation pdfInfo = pdfDoc.getDocumentInformation();
>
> IMendixObject materiaalMetaMendixObject = xmpDocument.getMendixObject();
> Set<String> memberKeys = materiaalMetaMendixObject.getMembers().keySet();
> for (String memberKey : memberKeys) {
> Object member = materiaalMetaMendixObject.getMember(memberKey).getValue();
> if (member!= null) {
> String memberString = member.toString();
> if (memberKey.startsWith("XMP"))
> pdfInfo.setCustomMetadataValue(memberKey, memberString);
> }
> }
> pdfDoc.setDocumentInformation(pdfInfo);
> pdfDoc.save(pdfOutputPath + File.separator + fileName);
> pdfDoc.close();
> pdfStream.close();
> Please HELP
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PDFBOX-680) Adding XMP data to a PDF causes
different kinds of mutilations of the original pdf.
Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854070#action_12854070 ]
Andreas Lehmkühler commented on PDFBOX-680:
-------------------------------------------
Am I right that you are using the quite old version 0.7.3?
Did you ever try a more recent version, e.g. 1.1.0?
If the pdf is somehow scrambled, what kind of MetaData did you add to those pdfs?
Is it possible to get a hand of at least one of these files?
> Adding XMP data to a PDF causes different kinds of mutilations of the original pdf.
> -----------------------------------------------------------------------------------
>
> Key: PDFBOX-680
> URL: https://issues.apache.org/jira/browse/PDFBOX-680
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 0.7.3
> Environment: Windows XP
> Reporter: Rene Smit
> Priority: Blocker
> Attachments: Examples Pdf Mutilations.jpg
>
>
> We are using PdfBox for a Material Workflow application for one of the major Newspaper publishers in the Netherland.
> One of the things we use PdfBox for is adding MMP data to the XML file.
> Doing this causes different kinds of mutilation of the original pdf.
> The way in which this occurs varies. Sometimes a character is altered, sometimes an element or complete ad is mutilated, sometimes the color of/in an ad is changed.
> These files also tend crash Adobe Acrobat (Professional 9, with Pitstop Professional) (not all files);
> The files also may create a "Failed to open PDF file" when trying to place it InDesign (not all files).
> We use the following source in out application:
> InputStream pdfStream = Core.getFileDocumentContent(pdfFileDocument.getMendixObject());
> PDDocument pdfDoc = PDDocument.load(pdfStream);
> PDDocumentInformation pdfInfo = pdfDoc.getDocumentInformation();
>
> IMendixObject materiaalMetaMendixObject = xmpDocument.getMendixObject();
> Set<String> memberKeys = materiaalMetaMendixObject.getMembers().keySet();
> for (String memberKey : memberKeys) {
> Object member = materiaalMetaMendixObject.getMember(memberKey).getValue();
> if (member!= null) {
> String memberString = member.toString();
> if (memberKey.startsWith("XMP"))
> pdfInfo.setCustomMetadataValue(memberKey, memberString);
> }
> }
> pdfDoc.setDocumentInformation(pdfInfo);
> pdfDoc.save(pdfOutputPath + File.separator + fileName);
> pdfDoc.close();
> pdfStream.close();
> Please HELP
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PDFBOX-680) Adding XMP data to a PDF causes
different kinds of mutilations of the original pdf.
Posted by "Rene Smit (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rene Smit updated PDFBOX-680:
-----------------------------
Attachment: Examples Pdf Mutilations.jpg
Some examples of file Mutilations occuring when adding meta(XMP)data to a PDF
> Adding XMP data to a PDF causes different kinds of mutilations of the original pdf.
> -----------------------------------------------------------------------------------
>
> Key: PDFBOX-680
> URL: https://issues.apache.org/jira/browse/PDFBOX-680
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 0.7.3
> Environment: Windows XP
> Reporter: Rene Smit
> Priority: Blocker
> Fix For: 0.7.3
>
> Attachments: Examples Pdf Mutilations.jpg
>
>
> We are using PdfBox for a Material Workflow application for one of the major Newspaper publishers in the Netherland.
> One of the things we use PdfBox for is adding MMP data to the XML file.
> Doing this causes different kinds of mutilation of the original pdf.
> The way in which this occurs varies. Sometimes a character is altered, sometimes an element or complete ad is mutilated, sometimes the color of/in an ad is changed.
> These files also tend crash Adobe Acrobat (Professional 9, with Pitstop Professional) (not all files);
> The files also may create a "Failed to open PDF file" when trying to place it InDesign (not all files).
> We use the following source in out application:
> InputStream pdfStream = Core.getFileDocumentContent(pdfFileDocument.getMendixObject());
> PDDocument pdfDoc = PDDocument.load(pdfStream);
> PDDocumentInformation pdfInfo = pdfDoc.getDocumentInformation();
>
> IMendixObject materiaalMetaMendixObject = xmpDocument.getMendixObject();
> Set<String> memberKeys = materiaalMetaMendixObject.getMembers().keySet();
> for (String memberKey : memberKeys) {
> Object member = materiaalMetaMendixObject.getMember(memberKey).getValue();
> if (member!= null) {
> String memberString = member.toString();
> if (memberKey.startsWith("XMP"))
> pdfInfo.setCustomMetadataValue(memberKey, memberString);
> }
> }
> pdfDoc.setDocumentInformation(pdfInfo);
> pdfDoc.save(pdfOutputPath + File.separator + fileName);
> pdfDoc.close();
> pdfStream.close();
> Please HELP
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.