I have a question concerning stamp-annotation-elements that were added by copy&paste into a pdf (name contains clipboard). What I found out is that they have an appearance-attribute which has Base64 enconded content. It is some kind of XML-structure (DICT-Element with subelements). I took a look at the content for the same 'image' with different rotations. The 'image'-content remained the same. The only difference I could find was an additional Matrix-Array that was existing, whenever it was not a 'normal' orientation (0 degree). For example for a 90 degree left rotation it was
<ARRAY KEY="Matrix">
<FIXED VAL="0"/>
<FIXED VAL="1"/>
<FIXED VAL="-1"/>
<FIXED VAL="0"/>
<FIXED VAL="55.502362"/>
<FIXED VAL="0"/>
</ARRAY>
So I wanted to be clever and 'simulate' the rotation by decoding the appearance-value, adding a Matrix-Array (in relation to the rotation), encoding it back to Base64 and assigning this new value to the appearance-attribute before the annotations were added back to PDF-XChange. The problem I have: the image/stamp is still shown in 'normal' orientation afterwards - even with the new appearance-value. Is there some kind of trick to force a repaint or something? At first I thought it might be a problem of an old version of PDF-XChange-Editor (we were using some 7.x-version) but it's the same behaviour in a newer version I have tried (10.1.0 - build 380).
In the attached images you can see how the clipboard-Stamp (the about-Dialog was used for it) looks after the insertion into the PDF (as an annotation) and then after the content-processing + rotation. The size and position of the element is as expected, only the orientation and scale of the image is wrong.
Before:
Afterwards:
For non-clipboard-stamp-elements, where the image content is somewhere in the filesystem, the workaround is to simply clear the content of the stamp-element. Afterwards the stamp is displayed as expected (e.g. rotated the right way). But that doesn't work for clipboard-stamp-elements since the 'image information' is only available within the encoded appearance-Attribute and in that case clearing the content only leads to an empty square.
Force repaint for clipboard stamp elements
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 16
- Joined: Thu Jun 27, 2019 11:21 am
Force repaint for clipboard stamp elements
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Force repaint for clipboard stamp elements
Hello MaSeife,
I have asked my colleagues from the dev team to take a look at this topic and get back to you as soon as possible!
Kind regards,
Stefan
I have asked my colleagues from the dev team to take a look at this topic and get back to you as soon as possible!
Kind regards,
Stefan
-
- User
- Posts: 16
- Joined: Thu Jun 27, 2019 11:21 am
Re: Force repaint for clipboard stamp elements
Hi Stefan,
did you get any feedback from the dev team?
Regards,
Markus
did you get any feedback from the dev team?
Regards,
Markus
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Force repaint for clipboard stamp elements
Hello Markus,
I can not see a reply - so I've asked once again and will chase this so that I can get you further information as soon as possible!
Kind regards,
Stefan
I can not see a reply - so I've asked once again and will chase this so that I can get you further information as soon as possible!
Kind regards,
Stefan