Inconsistency in the Value Produced by the %[Page] Macro Across Different Features

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

User avatar
rakunavi
User
Posts: 2242
Joined: Sat Sep 11, 2021 5:04 am

Inconsistency in the Value Produced by the %[Page] Macro Across Different Features

Post by rakunavi »

Hello all,

I have a question regarding the behavior of the %[Page] macro. I have noticed that its output value varies depending on the specific feature being used, which is quite confusing.

For example, the manual explains how to use this macro in the "Add Bates Numbering" dialog. It states that if you use the macro %[Page] and set the custom page range to page 7, the output value produced on the 7th page will be "1" (and it actually works exactly as described).

  • figure.png
However, when I tested the exact same conditions across various other features, the values produced were different. In fact, the features can be divided into two distinct groups based on which value is actually produced (whether in headers, footers, watermarks, file names, or bookmarks):

Group A: Produces the value "1" when processing the 7th page
  • Add Header and Footer
  • Add Bates Numbering
Group B: Produces the value "7" when processing the 7th page
  • Add Watermark
  • Export to Image(s)
  • Bookmark Every N-th Page
  • group_b.png
If you want to get the Group B result using a Group A feature, you can use %[Page:;7]. Conversely, if you want to get the Group A result using a Group B feature, you can use %[Page:;-5].

While these workarounds exist, I am very curious as to why the starting page reference behaves so differently depending on the feature. Could you please explain the reason behind this inconsistency?

Thank you for taking the time to read this message.

Best regards,
rakunavi

- PDF-XChange Editor PRO Version: 11.0.1
- OS Version: Windows 11 Pro / Home 25H2 Build 26200.8655
- PC Model: GMKtec Nucbox M7 Pro with HUION Kamvas Pro 19 / Lenovo IdeaPad C340-15IWL
You do not have the required permissions to view the files attached to this post.
Top needs for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FullScrnMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Dimitar - PDF-XChange
Site Admin
Posts: 2731
Joined: Mon Jan 15, 2018 9:01 am

Re: Inconsistency in the Value Produced by the %[Page] Macro Across Different Features

Post by Dimitar - PDF-XChange »

Hi rakunavi,

Thank you for reporting this issue as well.

It has also been forwarded to our developers for further investigation.

As always, we will keep you posted on any progress regarding this matter.

Regards.