Search found 331 matches

by Roman - Tracker Supp
Wed Apr 09, 2025 9:32 pm
Forum: PDF-XChange Editor
Topic: [javascript bug] app.setInterval crashes with function parameter SOLVED
Replies: 6
Views: 1138

Re: [javascript bug] app.setInterval crashes with function parameter SOLVED

By the way, the Editor supports a few extensions to Adobe JS API that facilitate Javascript async features. For example, global.changed : async function monitorGlobal(varName) { try { for(;;) { const newValue = await global.changed(varName); console.println(`New value for ${varName}: ${newValue}`); ...
by Roman - Tracker Supp
Wed Apr 09, 2025 6:26 pm
Forum: PDF-XChange Editor
Topic: [javascript bug] app.setInterval crashes with function parameter SOLVED
Replies: 6
Views: 1138

Re: [javascript bug] app.setInterval crashes with function parameter SOLVED

Mathew, you might find it suitable to use this utility class: class AsyncIntervalGenerator { constructor(t) { this.count = 0; this.interval = app.setInterval( () => this.resolve({value : this.count++, done : false}), t ); } next() { return new Promise((resolve) => this.resolve = resolve); } return()...
by Roman - Tracker Supp
Tue Apr 08, 2025 8:12 pm
Forum: PDF-XChange Editor
Topic: [javascript bug] app.setInterval crashes with function parameter SOLVED
Replies: 6
Views: 1138

Re: [javascript bug] app.setInterval crashes with function parameter SOLVED

Hi Mathew,
The bug has been fixed for the upcoming v10.6 release of the Editor.
by Roman - Tracker Supp
Fri Mar 28, 2025 12:04 am
Forum: PDF-XChange Editor
Topic: doc.addWatermarkFromFile() - Possible bug in Javascript implementation
Replies: 21
Views: 5581

Re: doc.addWatermarkFromFile() - Possible bug in Javascript implementation

Hello, nuflux
Yes, this is a recent regression. It will be fixed in the next 10.6 release.
by Roman - Tracker Supp
Fri Mar 21, 2025 7:45 pm
Forum: PDF-XChange Editor
Topic: [javascript] assigning function to variable in PXCE SOLVED
Replies: 3
Views: 1182

Re: [javascript] assigning function to variable in PXCE SOLVED

Hi Mathew,
When you assign an object member function to a variable, the function loses its binding to that object. println can only work as a member of console object.

Perhaps you want something like this:

Code: Select all

{
const println = console.println.bind(console);
println("test");
}
by Roman - Tracker Supp
Thu Feb 27, 2025 12:52 am
Forum: PDF-XChange Core API SDK
Topic: Crashing while multiple combines
Replies: 2
Views: 1645

Re: Crashing while multiple combines

Hi Christian,

Please try these modifications in your project settings:
image.png
by Roman - Tracker Supp
Wed Dec 18, 2024 12:20 am
Forum: PDF-XChange Editor
Topic: Find line endings with RegEx, for redaction
Replies: 8
Views: 2273

Re: Find line endings with RegEx, for redaction

Hello David,

If you want to match your regular expression pattern only at the end of a string, you can use $ anchor (similarly to ^ that anchors at the beginning of a string).
For example, the regexp

Code: Select all

ab$
will match "cab" but not "abc".
by Roman - Tracker Supp
Fri Nov 29, 2024 4:26 am
Forum: PDF-XChange Editor
Topic: PDF-XCE JavaScript Index SOLVED
Replies: 13
Views: 12379

Re: Mathew's PDF-XCE JavaScripts SOLVED

In the next 10.5 release of the Editor we are planning PDF-XChange specific extensions to the JavaScript API (mostly inspired by Mathew :D ). app.execDialog: Selection tracking for intermediate items in "hier_list_box". An option to disable sorting in "hier_list_box". Multi-selec...
by Roman - Tracker Supp
Tue Nov 26, 2024 7:11 pm
Forum: PDF-XChange Editor
Topic: Sessions disappearing after restart & system specified error
Replies: 32
Views: 4265

Re: Sessions disappearing after restart & system specified error

Can you please clarify whether the lost sessions were all created since the last start of the
Editor?
What is a typical uptime of your machine? Do you keep the Editor running in the background for a long time (say, for days) when you do not use it?
by Roman - Tracker Supp
Tue Nov 26, 2024 2:18 am
Forum: PDF-XChange Editor
Topic: Sessions disappearing after restart & system specified error
Replies: 32
Views: 4265

Re: Sessions disappearing after restart & system specified error

In case of abnormal termination of the Editor (including the termination during a forced system shutdown or power off) the changes made to the Editor settings since the last start of the Editor, can be lost. If you keep the Editor running for a long time and then abruptly terminate it, you can lose ...
by Roman - Tracker Supp
Mon Nov 25, 2024 10:48 pm
Forum: PDF-XChange Editor
Topic: Sessions disappearing after restart & system specified error
Replies: 32
Views: 4265

Re: Sessions disappearing after restart & system specified error

Hello MedBooster,
What version of the Editor are currently using?
Was the latest case a full reset of the settings or only the sessions were affected?
Did you sessions disappear altogether or only the recently added ones?
by Roman - Tracker Supp
Sat Nov 23, 2024 2:41 am
Forum: PDF-XChange Editor
Topic: [javascript] determine which row is selected in dialog "hier_list_box" SOLVED
Replies: 9
Views: 2319

Re: [javascript] determine which row is selected in dialog "hier_list_box" SOLVED

Hi Mathew, We will address both issues in the next feature release of the Editor. - tier_list_box intermediate nodes will support selection tracking through a special (with a runtime id to facilitate uniqueness) property that holds a signed integer value - exactly as it currently works for the leaf ...
by Roman - Tracker Supp
Fri Aug 02, 2024 11:12 pm
Forum: PDF-XChange Editor
Topic: [javascript] find current active document SOLVED
Replies: 4
Views: 2014

Re: [javascript] find current active document SOLVED

app.doc is an undocumented property, however Adobe Acrobat implements it as well.
by Roman - Tracker Supp
Fri Aug 02, 2024 10:18 pm
Forum: PDF-XChange (End Users FR)
Topic: [javascript] dialog that returns file path SOLVED
Replies: 5
Views: 4429

Re: [javascript] dialog that returns file path SOLVED

You can use something like

Code: Select all

app.browseForDoc({cFilenameInit:"*.myext"})
This will allow to browse for files with .myext extension.
by Roman - Tracker Supp
Fri Aug 02, 2024 7:08 pm
Forum: PDF-XChange (End Users FR)
Topic: [javascript] flag for when UI is in ribbon mode OR support app.listMenuItems() SOLVED
Replies: 3
Views: 4439

Re: [javascript] flag for when UI is in ribbon mode OR support app.listMenuItems() SOLVED

Hi Mathew,
app.listMenuItems will be implemented in the next release of PDF-XChange Editor.
by Roman - Tracker Supp
Fri Aug 02, 2024 6:40 pm
Forum: PDF-XChange Editor
Topic: [javascript] find current active document SOLVED
Replies: 4
Views: 2014

Re: [javascript] find current active document SOLVED

Hi Mathew,
To get the foreground document when it cannot be referenced as this, you can use the app.doc property.
by Roman - Tracker Supp
Wed Jun 12, 2024 10:48 pm
Forum: PDF-XChange Editor
Topic: [javascript] Limit on size of global object? SOLVED
Replies: 3
Views: 892

Re: [javascript] Limit on size of global object? SOLVED

Hi Mathew,
The Editor does not explicitly limit GlobData file size but limits the number of persistent properties by 65536.
As of an alternative to persistent global properties, you can consider Doc.createDataObject, Doc.exportDataObject, Doc.importDataObject and related API.
by Roman - Tracker Supp
Mon Jun 10, 2024 5:01 pm
Forum: PDF-Tools
Topic: Save Documents - Regex Fun with Backslash
Replies: 3
Views: 1420

Re: Save Documents - Regex Fun with Backslash

Hello, could you share more information about it? The issue with "undeletable" directory occurred because of discrepancy between the underlying filesystem and Windows API capabilities. The filesystem itself allows trailing spaces and dots in file and directory names while the API can filt...
by Roman - Tracker Supp
Thu Jun 06, 2024 9:21 pm
Forum: PDF-Tools
Topic: Save Documents - Regex Fun with Backslash
Replies: 3
Views: 1420

Re: Save Documents - Regex Fun with Backslash

Hello bkennedy, Thank you. Yes, this is an issue in our product, we will resolve it in a next release of PDF-XChange Tools. You can delete a directory with leading and/or trailing spaces with this console command: rd /Q /S "\\?\<full path to the directory>" For example, if your directory i...
by Roman - Tracker Supp
Wed Jun 05, 2024 9:53 pm
Forum: PDF-XChange Print Drivers
Topic: Crash scenario - Firefox - Xchange Printer home
Replies: 6
Views: 7508

Re: Crash scenario - Firefox - Xchange Printer home

The issue has been resolved. The fix will be available in the upcoming maintenance release of our products (v10.3.1).
by Roman - Tracker Supp
Sat May 18, 2024 2:03 am
Forum: PDF-XChange Editor
Topic: [javascript] Cannot set name and modDate on annotation SOLVED
Replies: 3
Views: 1376

Re: [javascript] Cannot set name and modDate on annotation SOLVED

Hi Mathew, Thank you. It is a bug. It will be resolved in the next release of the Editor. In the meanwhile you can use this workaround: function myAddAnnot(doc, annotData) { const newAnnot = doc.addAnnot(annotData); newAnnot.name = annotData.name; return newAnnot; } { let partyDate = new Date('1999-...
by Roman - Tracker Supp
Wed May 08, 2024 12:05 am
Forum: PDF-XChange Editor
Topic: [javascript bug?] list_box type in app.execDialog() does not have a change or validate event ? SOLVED
Replies: 6
Views: 1004

Re: [javascript bug?] list_box type in app.execDialog() does not have a change or validate event ? SOLVED

Hi Mathew,
Thanks, the first issue is already resolved, the fix will be available in the next release of the Editor.
by Roman - Tracker Supp
Wed Apr 17, 2024 9:21 pm
Forum: PDF-XChange Editor
Topic: [javascript] determine if field has focus SOLVED
Replies: 8
Views: 1555

Re: [javascript] determine if field has focus SOLVED

Actually, we have implemented it as a method, not property, to be more consistent with the existing Acrobat API ( Field.setFocus() ).
by Roman - Tracker Supp
Wed Apr 17, 2024 9:09 pm
Forum: PDF-XChange Editor
Topic: [javascript bug] cEnable expressions may cause application crash
Replies: 4
Views: 508

Re: [javascript bug] cEnable expressions may cause application crash

Hi Mathew,
I was unable to reproduce the crash. Can you please setup automatic crash dumps for the Editor and send us the crash dump file when you get that crash next time? Thanks.
by Roman - Tracker Supp
Wed Apr 17, 2024 9:03 pm
Forum: PDF-XChange Editor
Topic: [javascript] determine if field has focus SOLVED
Replies: 8
Views: 1555

Re: [javascript] determine if field has focus SOLVED

Mathew wrote: Wed Mar 27, 2024 6:25 pm I'll look forward to the day of .hasFocus as an additional property...
The property has been implemented and will be available in the next release of the Editor.
by Roman - Tracker Supp
Tue Mar 26, 2024 10:23 pm
Forum: PDF-XChange Editor
Topic: [javascript] determine if field has focus SOLVED
Replies: 8
Views: 1555

Re: [javascript] determine if field has focus SOLVED

Hi Mathew,
I do not currently see an non-intrusive way to achieve that. We will consider adding hasFocus property to Field object, as an PDF-XChange extension to the Acrobat JS API.
by Roman - Tracker Supp
Thu Feb 01, 2024 4:44 am
Forum: Editor plugins
Topic: My pluggin is not working anymore with last update
Replies: 11
Views: 8328

Re: My pluggin is not working anymore with last update

Hi nbmani, Please try this one: app.addToolButton({ cName: "ExtractPagesByKeywords", cLabel: "Extract Pages by Keywords to one PDF file", cExec: "extractPagesByKeywords()", cTooltext: "Extract pages containing specific keywords", cEnable: true, nPos: -1 }); va...
by Roman - Tracker Supp
Tue Jan 23, 2024 11:09 pm
Forum: PDF-XChange Editor
Topic: Redact names with PDFTools
Replies: 3
Views: 343

Re: Redact names with PDFTools

Hello basbeek,

Assuming the organization name has the same pattern as the last and first name (i.e. [A-Za-z0-9_%+-]+),
the regular expression for your first case can be:
\b[A-Za-z0-9_%+-]+\s*,\s*[A-Za-z0-9_%+-]+\s*(?=\([A-Za-z0-9_%+-]+\))
by Roman - Tracker Supp
Fri Jan 12, 2024 6:41 pm
Forum: PDF-XChange Editor
Topic: Forced Exit
Replies: 19
Views: 6519

Re: Forced Exit

Hi bwelsh_tracker,
We will contact you later today with further steps.
Thanks for your patience.
by Roman - Tracker Supp
Wed Jan 10, 2024 8:16 pm
Forum: PDF-XChange Editor
Topic: Forced Exit
Replies: 19
Views: 6519

Re: Forced Exit

Thanks.
Were any other applications opened when that issue occurred?
If you are unsure, please open MS Office Word application and leave you computer locked for a while. As you did this with the Editor.
by Roman - Tracker Supp
Wed Jan 10, 2024 6:19 pm
Forum: PDF-XChange Editor
Topic: Forced Exit
Replies: 19
Views: 6519

Re: Forced Exit

Please create a memory dump of the Editor process when you see it in that state next time.
You can use Windows Task Manager for this:
image.png
Then upload the resulting dump file (%TEMP%\PDFXEdit.dmp) here.
by Roman - Tracker Supp
Tue Jan 09, 2024 8:39 pm
Forum: PDF-XChange Editor
Topic: Forced Exit
Replies: 19
Views: 6519

Re: Forced Exit

Hello bwelsh_tracker,

Please disable Windows Screensaver and check if the issue still persists when you leave your computer for a while.
image.png
by Roman - Tracker Supp
Tue Sep 12, 2023 9:13 pm
Forum: PDF-XChange Editor
Topic: WARNING new update 368→370 [glitch] UI is reset
Replies: 17
Views: 3766

Re: WARNING new update 368→370 [glitch] UI is reset

Hello MedBooster, We are terribly sorry for this. Were you able to load your settings from that backup file before? Can you please send us that backup file? You can use our file service to upload the file. Also, next time you run into the UI settings having been reset, please launch Windows Command ...
by Roman - Tracker Supp
Tue Jul 18, 2023 6:33 pm
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

Thank you too, Mathew. Your observations really help us to improve our software. I agree, it might be controversial and not intuitive, but our implementation of JS API has to be compatible with Adobe specification, so that documents created by other software will work in the Editor. However, we can ...
by Roman - Tracker Supp
Mon Jul 17, 2023 7:01 pm
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

If you have documents open, and set a global variable with a privileged function while it is open, the first unprivileged document to access that variable after setting it will become the owner. I cannot reproduce this behavior, Mathew. Here are my steps: Open those 2 test documents (containing but...
by Roman - Tracker Supp
Fri Jul 14, 2023 6:49 pm
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

7. Set the global variable again using the trusted function, and go to the other document. It will now be able to access it, and will be the new "owner" of this variable. This does not change the owner of the document. After this step the other document still cannot access the variable. B...
by Roman - Tracker Supp
Tue Jul 11, 2023 6:47 pm
Forum: PDF-XChange Editor
Topic: "Save As" Button not working anymore SOLVED
Replies: 4
Views: 3790

Re: "Save As" Button not working anymore SOLVED

Hello, Finn, According to the Adobe Acrobat JS API specification, Doc.saveAs method can only be called in a privileged context - i.e. either from the JS console or an application initialization script, or by using privilege elevation functions app.beginPriv/endPriv, which, it their turn, can only be...
by Roman - Tracker Supp
Fri Jul 07, 2023 10:03 pm
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

Hello, Mathew, According to the Adobe Acrobat JS API specification, when a global variable is changed, it becomes associated with the active document (receives that document as a security origin). In non-privileged context it is possible to access only global variables whose origin is the active doc...
by Roman - Tracker Supp
Sat Jul 01, 2023 7:10 pm
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

Hello, Mathew,
What version of the Editor are you talking about in your previous post?
by Roman - Tracker Supp
Wed Jun 28, 2023 8:54 pm
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

Hi Mathew,
I just ran your test cases on the latest release candidate build. The issues you have reported above, have been addressed in the upcoming v10.0.1 release of the Editor.
Thank you again.
by Roman - Tracker Supp
Wed Jun 28, 2023 2:58 am
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

Thank you, Mathew, for your thorough analysis.
We are aware of certain inconsistencies in our implementation of JS globals.
We are working to address some of the issues (at least) in the next release of the Editor.
by Roman - Tracker Supp
Mon Jun 26, 2023 10:24 pm
Forum: PDF-XChange Editor
Topic: javascript feature request: global object policy refinement? SOLVED
Replies: 21
Views: 7904

Re: javascript feature request: global object policy refinement? SOLVED

Hello, Mathew Even if I make trusted functions, unless the GlobData file is edited manually, or Global Object Security Policy is disabled, that variable name remains blocked. In privileged context all global variables should be accessible, regardless of their origin. If that was your observation, no...
by Roman - Tracker Supp
Fri Jun 23, 2023 10:38 pm
Forum: PDF-XChange Editor
Topic: Hatch pattern tool SOLVED
Replies: 99
Views: 57731

Re: Hatch pattern tool SOLVED

Hi Mathew,
It is really impressive that you keep sharing such a useful and high quality work.
Maybe it makes sense to publish your code in a public source version control service (such as https://github.com/) ? I think this could make your work more accessible to other people.
by Roman - Tracker Supp
Thu Jun 22, 2023 9:56 pm
Forum: PDF-XChange Editor
Topic: javascript: app.beginPriv() error in v10.0 SOLVED
Replies: 11
Views: 3267

Re: javascript: app.beginPriv() error in v10.0 SOLVED

You can automate copy/paste by using a kind of preprocessor. If you have a C/C++ compiler installed, you can use it for this purpose. It sounds weird but should work. For example, assuming clang compiler (you can download the installer here ), if you have a shared.js file containing declarations to ...
by Roman - Tracker Supp
Wed Jun 21, 2023 8:23 pm
Forum: PDF-XChange Editor
Topic: javascript: app.beginPriv() error in v10.0 SOLVED
Replies: 11
Views: 3267

Re: javascript: app.beginPriv() error in v10.0 SOLVED

We are thinking on implementing JS module support as an extension to Adobe JS API, but it is not a trivial task, considering all the peculiarities of Adobe Acrobat behaviour we need to conform to. I think, you can use the following workaround for your case: var C = class { // normal class content he...
by Roman - Tracker Supp
Tue Jun 20, 2023 5:42 pm
Forum: PDF-XChange Editor
Topic: javascript: app.beginPriv() error in v10.0 SOLVED
Replies: 11
Views: 3267

Re: javascript: app.beginPriv() error in v10.0 SOLVED

You are very welcome, Mathew!
Thank you too for helping us improve our product.