Jumping to specific page in specific document and highlighting

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

m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Jumping to specific page in specific document and highlighting

Post by m.rison »

This is a follow up to viewtopic.php?p=160355&sid=8b130dcd17cb ... 4d#p160355 .

I have the following comments/questions/requests regarding this functionality, but I should start by saying it's already a great feature!

- If I use the highlight= feature repeatedly for the same document, the highlights pile up (and get darker and darker!). How do I delete them? Ideally there would be an option like "highlight=<left>,<right>,<top>,<bottom>[,deleteexistinghighlight=all|this|no]" ("all" deletes all highlights in document, "this" deletes any existing highlight at this location, i.e. doesn't add an extra highlight if there's already one there, "no" is current behaviour), but I couldn't even find a way to delete them in the GUI!

- It might be nice if the viewrect= and highlight= components could (optionally) be expressed with a % at the end, e.g. viewrect=0,0,100%,20% to show the full-width top fifth of the page

- It might be nice if there were an option for search= to do "all of these words" or "exact phrase" searches

- It might be even nicer if you could specify proximity, case-sensitivity, whole wordness, etc. search options, and if there were an option to just show the first hit on the page/viewrect (as if Ctrl-F had been used rather than Ctrl-Shift-F)

- It says "page=<pageNum> – uses an integer value to specify a numbered page in the document. The document’s first page has a pageNum value of 1." Could there be an option to use physical page numbers, so e.g. if the logical first page is physically numbered i and the logical tenth or twentieth page is physically numbered 1, you could jump to that physical page 1?

[Note to readers/archaeologists: I was confusingly using exactly the wrong terminology here and for the next few posts! I meant being able to specify the page number as it appears on the page, not just being able to specify to go to the n-th page in the document.]

- It says "usept[=yes|no] – when specified, all values for positioning are absolute and measured in points (1/72 inch)." If usept is "no" or not specified, what are the units?

- It's somewhat confusing that the order and values in "viewrect=<left>,<top>,<width>,<height>" is not the same as in "highlight=<left>,<right>,<top>,<bottom>"! This probably can't be changed, and it seems this matches the PDF Reference, but it might be worth highlighting it in the documentation!
Last edited by m.rison on Fri Oct 10, 2025 8:11 am, edited 2 times in total.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, m.rison

I believe that these creation definitions are set by the specification, and are not able to be altered, so the "<left>,<right>,<top>,<bottom>" configuration is likely immutable, though I will pass all of your feedback along.

In order to delete items, if they were the last item placed, you can simply use ctrl+Z to undo their creation, or you can click on the highlight, with any commenting tool (including the hand tool), and then simply push the delete key on your keyboard.

Regarding page=, this one cannot be changed to use "logical numbers", because it is possible to make a document where there are multiple sets of the same page number values. As such, only the strict intergered page number is available.

usept=no or undefined should result in the Editor using your default units, if I am not mistaken, though that would need some testing.

I hope this helps,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Re: Jumping to specific page in specific document and highlighting

Post by m.rison »

Thanks, Dan.

> I believe that these creation definitions are set by the specification

Well, which specification? So far the best I've found is https://pdfobject.com/pdf/pdf_open_parameters_acro8.pdf , which is dated April 2007 and is for Acrobat 8.1!

> In order to delete items, if they were the last item placed, you can simply use ctrl+Z to undo their creation, or you can click on the highlight, with any commenting tool (including the hand tool), and then simply push the delete key on your keyboard.

Neither of these seem to work for me.

> Regarding page=, this one cannot be changed to use "logical numbers", because it is possible to make a document where there are multiple sets of the same page number values. As such, only the strict intergered page number is available.

Well, yes, I suppose in theory you could have two pages with the same physical number. However, this must be a corner case, and the vast majority of documents that don't do this must be like the documents I handle, which start from i and then eventually get to 1 and then count up, or I suppose start from 1-1 and count up to 1-n and then go 2-1 and count up etc. I think "open the first page whose physical number is <whatever>" would be fine.

> usept=no or undefined should result in the Editor using your default units, if I am not mistaken, though that would need some testing.

Ah, OK. I don't even know what my default units are, so explicitly forcing points is probably OK!

Thanks,

Mark
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, m.rison
m.rison wrote: Mon Oct 06, 2025 11:41 pm which specification?
I was referencing the ISO Specification for PDF, however...

...On further testing, I realize that the highlight method used here is not a physical highlight comment, but instead the visual "emphasis area" styled temporary highlight added by the search/find tools specifically. This explains why undo and selection/delete did not work as well.
I apologize for my misunderstanding, however this may change things in a better light. We will have to wait and see what the Dev team finds in this area. Perhaps a simple solution would be to auto-clear the last highlight when a new command is sent, but we will see what we can do.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. 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
PHK
User
Posts: 1499
Joined: Tue Nov 24, 2020 4:02 pm

Re: Jumping to specific page in specific document and highlighting

Post by PHK »

If you are talking about true Highlights (not the colorization that comes as a result of a search), then those Highlights will appear as Comments in the Comments panel. You can then review each of those Highlight/Comments and do various things with them such as delete, modify opacities, colors, etc.
All best,

FringePhil
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, PHK

Yes, that was what I originally thought these were, however in testing the aforementioned command line items, they are not true highlights, but simply the same type of area that appear when you use the "search" feature.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. 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
PHK
User
Posts: 1499
Joined: Tue Nov 24, 2020 4:02 pm

Re: Jumping to specific page in specific document and highlighting

Post by PHK »

OK then, but might they be isolatable objects that can be found in the Contents panel?
All best,

FringePhil
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, PHK

No, they are not physical objects on the page, and thus cannot be interacted with or reported anywhere, when you save/close the document, they vanish as they are not part of the file at all, but purely a visual "effect" somewhat like using the "rotate view" buttons, which do not make any changes to the file.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Re: Jumping to specific page in specific document and highlighting

Post by m.rison »

Perhaps then the options are:

1) Add an optional argument to say what to do with existing highlights, e.g.
"highlight=<left>,<right>,<top>,<bottom>[,deleteexistinghighlight=all|this|no]"
with the default being "no" so the current behaviour is preserved should anybody like/be relying on it.

2) Delete any existing highlight before applying the new one.

The advantage of the latter is that it doesn't require changes to the command-line interface. But the disadvantage is that anyone who really does want multiple highlights (whether overlapping or not) would lose that feature.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, m.rison

The Dev team are looking into the possibilities now, so I will probably have an answer for you by this time tomorrow :D

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Re: Jumping to specific page in specific document and highlighting

Post by m.rison »

> Regarding page=, this one cannot be changed to use "logical numbers", because it is possible to make a document where there are multiple sets of the same page number values. As such, only the strict intergered page number is available.

To add to this: if you type a number in the box at the bottom for a document whose logical and physical page numbers differ, you get taken to the physical page number, so in fact it already works, you just need to make it an option available at the command line:

image.png

(This is a document whose second logical page is physical page 1 and as shown here whose 100th logical page is physical page 99. For the avoidance of doubt, by "logical" I mean "numbered starting from 1 for the first one" and by "physical" I mean "what actually appears on the page (and what the PDF reader should consider the page number to be, assuming the PDF file has been generated to correctly match what appears on the page)")
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, m.rison

First and foremost, I should apologize, I forgot to come back and post the ticket number for the highlight feature:
RT#7648: FR: cmd "highlight=" cannot be cleared

Now, back to the other suggestion, just to clear confusion... The PDF Specification defines the items differently from what you stated, and that may be part of our confusion..
  • "Logical" pages specifically refers to unique added page numbers/names etc in the thumbnails pane, which are NOT counting from the start of the document. An example of "logical page number is:
    image.png
  • "Physical" page numbers strictly means the actual counted page number, starting from the first page.
    In practice, this is inverse to what you just described. Meanwhile and example of "physical" page numbers is:
    image(1).png
(For the record, I am very much of the mind that using the term "logical" to refer to "labelled" pages is itself an "illogical" practice, but this is what the specification calls it, so we are stuck with it... If it was up to me, I would have used your own terminology or something like "labelled" and "unlabelled" pages instead).

So, following my above screenshots, as far as I know, even though there is only one "logical" page which is named "Ch1 - p4" you cannot input that as part of the command line, you would instead need to use the "physical" page number "10" specifically.
Another reason we cannot offer this is illegal characters. it is possible (and surprisingly common) to put characters in labels which are command breaking, like quotes and semicolon:
image(2).png
So while I understand the desire to use "logical" page numbers, at the moment, only "physical" page numbers are supported, and it does not seem that is likely to change anytime soon.

Kind regards,
You do not have the required permissions to view the files attached to this post.
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Re: Jumping to specific page in specific document and highlighting

Post by m.rison »

Sorry, yes, my mistake, I was just making up my own terminology, which I now realise was confusingly the exact opposite of the PDF spec terminology!

However, I do not buy your arguments for saying it is not feasible to pass logical == thumbnail (hopefully == what is actually shown on the page) page numbers on the command line:

  • yes, maybe there would be more than one page with the same logical page number, but this should not normally happen, and if it does you could just take the first one
  • yes, maybe there would be some pages that would have a "number" that contains characters that are problematic, but you could just say "too bad" for those, or allow a substring to be used, or introduce an escape mechanism
  • this is the killer counterargument: you already support this! I can enter a number in the box at the bottom centre, and I am taken to that logical == thumbnail == on-the-page number, as I showed in my previous post, where entering 99 took me to (using the correct terminology now) logical page 99, which is in fact physical page 100
[Thanks re the highlight ticket. Is there a way to view and sign up for updates to a ticket?]
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, m.rison

I am sorry to say that I cannot reproduce what you said, as a rest, I configured a document where the first 3 pages are roman numerals, and so the "physical" page 4, is labelled as the starting point for standard Arabic numerals, in this example, I entered page 10, and was taken to the physical page 10, which has a "logical" page label, of 7.
image.png
I cannot seem to reproduce your situation where entering an existing "logical" value brings me to the corresponding labelled page.

Regardless, I understand the desire for this, but I am sorry to say that the request has been rejected at this time. The dev team may reconsider in the future, but for now, logical number handling will not be added to our command line handling.

As for the first request, ticket RT#7648, all tickets are internal only, so there is no way to sign up for progress updates on them. If you have questions, you can post again here or email us via support@PDF-XChange.com with a link to this post, and the ticket number inline. Any member of the support team will be able to check if there are any new notes added to the ticket at that time.

Kind regards,
You do not have the required permissions to view the files attached to this post.
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Re: Jumping to specific page in specific document and highlighting

Post by m.rison »

Perhaps I used the wrong terminology again!

I have a document whose first page is called "Front", whose second page is called "1" and has a 1 at the bottom, etc.

If I go /a "page=99" at the command line I end up on the page that has 98 at the bottom, i.e. the 99th page of the document.

If I enter 99 in the box at the bottom middle I end up on the page that has 99 at the bottom, i.e. the 100th page of the document.

I would like to have a way to get the latter behaviour from the command line.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11798
Joined: Wed Jan 03, 2018 6:52 pm

Re: Jumping to specific page in specific document and highlighting

Post by Daniel - PDF-XChange »

Hello, m.rison

Okay, so it is working as expected on your end as well. I was worried that there was a bug with the logic there.

Unfortunately as I said in my previous post, logical page number handling via the command line has been rejected as a feature request at this time. We may reconsider later on, but currently I cannot make any promises today.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. 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
PHK
User
Posts: 1499
Joined: Tue Nov 24, 2020 4:02 pm

Re: Jumping to specific page in specific document and highlighting

Post by PHK »

Perhaps you, m.rison, could consider the following workaround.

If you create Bookmarks based on 'logical' page names, you have more scope for organization. You can sort them, sort the associated pages and many other things. Fortunately, Mathew has created an add-on tool that facilitates doing just that. See viewtopic.php?p=179173#p179173, Mathew's entry of Sep 25, 2025 11:31 am.

I hope that gets you closer to achieving your objectives.
All best,

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

Re: Jumping to specific page in specific document and highlighting

Post by rakunavi »

Hello Mark,

By creating named destinations in advance based on page labels (logical page numbers), and then specifying these named destinations as arguments on the command line instead of page numbers, you should be able to achieve something close to what you want to do.

  • sample.pdf
  • Video2.webm
The verification video below records the actual process of creating a sample file. The key is to combine these two features:

Starting from the default settings and performing the operations for presentation purposes, it takes about a minute and a half. However, if the page labels are already created, the task should be completed in under 10 seconds. While you need to create named destinations for each file, doing it just once isn't that much effort. If you create named destinations for all pages beforehand, you can simply double-click an item in the Named Destinations pane to specify the action (e.g., when creating links), which is very convenient (details in the previous topic).

  • Video1.webm
For at least the past ten years, I have made it a practice to create named destinations for all pages in advance. When setting GoToR actions for external PDF documents, I consider specifying actions via named destinations essential to minimize the impact of future page edits within those external PDF documents.

Best regards,
rakunavi
You do not have the required permissions to view the files attached to this post.
TOP desires 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 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Re: Jumping to specific page in specific document and highlighting

Post by m.rison »

OK, I can just add support for a configurable offset. But it's weird that at the command line you can't achieve what you can achieve in the GUI, and vice-versa.

Thanks for the other suggestions, but I can't fiddle with the PDF file as it's externally generated and shared by lots of people and I don't have any scope to create a variant version.
User avatar
rakunavi
User
Posts: 1907
Joined: Sat Sep 11, 2021 5:04 am

Re: Jumping to specific page in specific document and highlighting

Post by rakunavi »

Hello Mark, thank you for your feedback.
m.rison wrote: Fri Oct 10, 2025 10:41 pm But it's weird that at the command line you can't achieve what you can achieve in the GUI, and vice-versa.
I'm curious what “vice-versa” refers to. If it means that physical page numbers cannot be specified in the Page Navigation Toolbar when logical page numbers are set, then adding a "+" sign at the beginning allows you to specify physical page numbers. In that case, the previous post might be helpful.

Best regards,
rakunavi
TOP desires 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 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
m.rison
User
Posts: 20
Joined: Sat Oct 04, 2025 9:28 am

Re: Jumping to specific page in specific document and highlighting

Post by m.rison »

So it does -- I had no idea! Thanks for the cross-reference to the post in the other thread. As stated in that thread, it would be worth documenting this in the tooltip and at https://help.pdf-xchange.com/pdfxe10/in ... ce_ed.html (and corresponding locations in other embodiments of the documentation), where currently it just vaguely says "Page" and "Enter a page number and press Enter to move to it." respectively.

It might also be worth adding a note at https://help.pdf-xchange.com/pdfxe10/in ... ns_ed.html (etc.) to say that it is not possible to specify a logical page number, i.e. the number that typically appears on the page and that is used by default in the thumbnail view and in the page navigation toolbar.
User avatar
rakunavi
User
Posts: 1907
Joined: Sat Sep 11, 2021 5:04 am

Re: Jumping to specific page in specific document and highlighting

Post by rakunavi »

Hello Mark, I'm glad I could be of some help.

Regarding your original goal of specifying page labels (logical page numbers) via the command line, you mentioned you could achieve this by specifying a configurable offset. However, the following method might also be useful in some way.

Specifically, you could pre-create JavaScript files for each page label, one for each label number. Then, as a command-line option, specify the JavaScript file corresponding to the page label you want to open. This way, the desired page opens. Of course, this method requires preparing the JavaScript files in advance, so it has the drawback that the page label naming convention must be predictable.

For now, as a proof of concept, I've attached 1,000 scripts as files, each corresponding to a page label from 1 to 1,000. You should be able to test basic functionality with these.

  • SampleFiles.zip
For example, the following is the 77.js code used for verification, but each JavaScript file itself is extremely simple.

Code: Select all

(function goToLabel(){
  for (var i = 0; i < this.numPages; i++) {
    var label = this.getPageLabel(i);
    if (label === "77") {
      this.pageNum = i;
      return;
    }
  }
  this.pageNum = 76;
}).call(this);
In the video, the following command is executed to open page label 77 (logical page number 77, physical page number 87). Similarly, execute the command to open page label 55 (logical page number 55, physical page number 65).

  • "c:\Program Files\Tracker Software\PDF Editor\PDFXEdit.exe" /A sample.pdf /runjs page\77.js
      "c:\Program Files\Tracker Software\PDF Editor\PDFXEdit.exe" /A sample.pdf /runjs page\55.js

    • Video.webm

    Another possible approach could involve using Python or similar to first extract the page label information from the PDF document, then determine the corresponding physical page number for the input page label, and finally launch PDF-XChange Editor via the command line. However, this inevitably introduces overhead time for parsing the PDF file with an external tool, so it's likely to be slow. Preparing a large number of JavaScript files in advance like this is primitive, but precisely because of that, it might be surprisingly fast.

    Of course, if the assigned page labels are always fixed—that is, if the offset amount is fixed—your method would be the fastest.

    Best regards,
    rakunavi
    You do not have the required permissions to view the files attached to this post.
    TOP desires 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 FulScrMultiMon
    forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
    m.rison
    User
    Posts: 20
    Joined: Sat Oct 04, 2025 9:28 am

    Re: Jumping to specific page in specific document and highlighting

    Post by m.rison »

    Thanks. However, I don't think the approaches you suggest are workable for my use case, which is review of standards documents. We're talking about hundreds of people in dozens of independent organisations consulting the same externally generated documents, and expecting them to be willing to faff around with JavaScript is a non-starter. Just saying "for this document you need to configure the offset to 1" is much more workable.

    It's just mildly frustrating that the command line doesn't allow you to do what the GUI allows you to do by default (and I surmise "go to physical page n" is indeed overwhelmingly what people want to do, rather than "go to nth page"), but so be it! It should be better documented though.
    User avatar
    Daniel - PDF-XChange
    Site Admin
    Posts: 11798
    Joined: Wed Jan 03, 2018 6:52 pm

    Re: Jumping to specific page in specific document and highlighting

    Post by Daniel - PDF-XChange »

    Hello, m.rison

    I am sorry that we cannot currently offer what you are looking for, but the request is now in our system, and it may at some point be reconsidered.

    Kind regards,
    Dan McIntyre - Support Technician
    PDF-XChange Co. LTD

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