Andreas,
sorry for my late reply - I was on a business journey.
I could not find it in the references too, but when creating a blank PDF
with a RubberStamp using Acrobat Pro 7.0 and higher (tested versions:
7.0, 7.0.7, 7.0.9, 7.1, 9.0.0) this reference is always set.
When the reference is missing, I experienced some problems displaying
the Rubebrstamp with Apple Preview 4.1. The RubberStamps content wasn't
shown, when the reference is missing. With the reference set, it works
as expected. On the other hand, Adobe Acrobat had in both versions no
problem to display the RubberStamp.
I have no idea, why it is not mentioned in the references, but it seems
to be more compatible and I think it is more consistent to have a
back-reference, since all PDResources in a PDF created with Acrobat Pro
have one.
If you need example documents, created with Acrobat Pro, I can upload
them in JIRA.
Greetings,
Erik
Andreas Lehmkühler (JIRA) wrote:
[ https://issues.apache.org/jira/browse/PDFBOX-609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833567#action_12833567 ]
Andreas Lehmkühler commented on PDFBOX-609:
-------------------------------------------
I've tried to find a hint in the pdf reference that a rubber stamp annotation
needs a reference to its parent, but I can't find any. Where do you read about
it?
PDAnnotationRubberStamp is missing a setParent method
-----------------------------------------------------
Key: PDFBOX-609
URL: https://issues.apache.org/jira/browse/PDFBOX-609
Project: PDFBox
Issue Type: Improvement
Components: PDModel
Affects Versions: 0.8.0-incubator, 1.0.0
Environment: all
Reporter: Erik Scholtz
Priority: Trivial
PDAnnotationRubberStamp class is missing a setParent method:
Simply to add:
/**
* This will set the RubberStamps parent it relates to.
*
* @param myparent
* the parent of the RubberStamp (usually a page).
*/
public void setParent( COSObjectable myparent ) {
getDictionary().setItem( COSName.PARENT, myparent.getDictionary() );
}
The setParent is needed to build correctly RubberStamps with a customized
appearance.