[javascript] stamp property .appearance stream

Please post any ideas or requests for new features here for the End User Version of PDF-XChange (printer Drivers)

Moderators: Tracker Support, TrackerSupp-Daniel, Sean - Tracker, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Tracker - Clarion Support, John - Tracker Supp, Ivan - Tracker Software, Tracker Supp-Stefan, moderators, Support Staff

Post Reply
Mathew
User
Posts: 395
Joined: Thu Jun 19, 2014 7:30 pm

[javascript] stamp property .appearance stream

Post by Mathew »

When working with stamp annotations in javascript, I know of no property that gives the actual appearance stream of the stamp. This makes it impossible for javascript to duplicate a stamp within a document, or to another document. The property AP is just a name, so using it to duplicate a stamp doesn't work for dynamic stamps, images, stamps that don't exist on the machine...

I'd request that:
  1. Stamp annotations have a read-only property .appearance (or some other name) that returns a stream object.
  2. doc.addAnnot() accepts that property and object when creating a new stamp
This would allow the actual instance of a dynamic stamp, images as stamps, and stamps that don't exist on the current machine, to be duplicated by javascript.
Last edited by Mathew on Sat Nov 02, 2024 12:13 am, edited 2 times in total.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9921
Joined: Wed Jan 03, 2018 6:52 pm

Re: [javascript] stamp property .appearance stream

Post by TrackerSupp-Daniel »

Hello, Mathew

I have passed this request up the chain, so we will need to wait and see what the dev team has to say.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
User avatar
Paul - Tracker Supp
Site Admin
Posts: 7302
Joined: Wed Mar 25, 2009 10:37 pm
Contact:

Re: [javascript] stamp property .appearance stream

Post by Paul - Tracker Supp »

Hi Mathew,

the devs responded with:

It will require the adding the kind of limited access to native pdf-objects through the JS. We doubt it is a good idea. It may increase the complexity of our internal code and consume significant the memory.

I do not think we are likely to see it eventuate I am afraid.
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Mathew
User
Posts: 395
Joined: Thu Jun 19, 2014 7:30 pm

Re: [javascript] stamp property .appearance stream

Post by Mathew »

😢
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 19117
Joined: Mon Jan 12, 2009 8:07 am
Contact:

Re: [javascript] stamp property .appearance stream

Post by Tracker Supp-Stefan »

Hello Mathew,

Yes - unfortunately for some operations you would need to use an SDK package and the JS supported in our Editor (and by other PDF Tools) does not give full control over the files and their contents.

Kind regards,
Stefan
Mathew
User
Posts: 395
Joined: Thu Jun 19, 2014 7:30 pm

Re: [javascript] stamp property .appearance stream

Post by Mathew »

I may have made this more complex than necessary: What I’m thinking is just a way to duplicate stamps with JavaScript. It’s exactly what copying and pasting a stamp would do but under the control of JavaScript
User avatar
Paul - Tracker Supp
Site Admin
Posts: 7302
Joined: Wed Mar 25, 2009 10:37 pm
Contact:

Re: [javascript] stamp property .appearance stream

Post by Paul - Tracker Supp »

Hi, Mathew

is there a specific question you have around this or shall we wait to see what you come up with?
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Mathew
User
Posts: 395
Joined: Thu Jun 19, 2014 7:30 pm

Re: [javascript] stamp property .appearance stream

Post by Mathew »

Paul - Tracker Supp wrote: Tue Nov 05, 2024 6:11 pm Hi, Mathew

is there a specific question you have around this or shall we wait to see what you come up with?
Sorry for my lack of clarity: My feature request should be “add a way for JavaScript to copy stamp annotations “.

Even if JavaScript cannot access the underlying appearance data, so long as there’s some mechanism to replicate the stamp instance it would solve this problem.

I apologize: this was a badly written FR. I should have presented the problem (cannot duplicate stamp annotations with JavaScript) and asked for a solution instead of providing my take on a solution.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9921
Joined: Wed Jan 03, 2018 6:52 pm

Re: [javascript] stamp property .appearance stream

Post by TrackerSupp-Daniel »

Hello, Mathew

Thank you for the clarification, After speaking with the Dev team, I am afraid that copy/paste of annotations is not currently something we plan to offer in the JS toolkit.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply