Sequential Numbering in 'Text'  SOLVED

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

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
BPZ
User
Posts: 4
Joined: Fri Nov 26, 2021 10:50 am

Sequential Numbering in 'Text'

Post by BPZ »

Goodafternoon,

We want to generate a sequential number in a Text Field.
This number needs to get +1 integer bigger every time we generate a new text field.
For instance, after placing a text field with number 1, the next one should be 2, 3, 4 and so forth.

We tried a bit with adding a java script to the text field, but had no succes so far.

Another thing we need is that the number should be able to change after the text field is originally generated.

For instance, after placing number 5, we want to be able to change it to number 10.
The next text field generated after that should be number 11.
That is why we think this should be done with a text field and not through a stamp, but we could be wrong.

Is this Possible in Xchange Editor and can somebody help us with this problem?

Thanks in advance!
User avatar
Radi - Tracker Supp
Site Admin
Posts: 597
Joined: Tue Mar 03, 2015 12:46 pm

Re: Sequential Numbering in 'Text'

Post by Radi - Tracker Supp »

Hello BPZ,

Could you please let us know if you need the text fields to be form fields in the document or just any kind of numbers (e.g. stamps)?

Please provide a sample file so we can see what you've done so far and let us know what would be the desired final result for the document. Thanks.

Regards,
Radi
BPZ
User
Posts: 4
Joined: Fri Nov 26, 2021 10:50 am

Re: Sequential Numbering in 'Text'

Post by BPZ »

Seq. Numb. Example.pdf
(352.75 KiB) Downloaded 44 times
Hello Radi,

We are under the impression that the numbers need to be in a text form.

Our colleagues need to be able to change the number after it has been placed in the document.
We think that stamps are not as easily changeble, but we are open for everything.

I attached a PDF file. We have the numbers 1 to 4 on the first floor, but on the second floor we want to continue on from 10 etc.

We want to be able to change the numbers, so we can change the number to the next interval if we move on from floors.
So instead of continuing on with 5 on the next floor, we want to be able to change it to 10.

I'm happy to provide more information!

Thanks
lev
User
Posts: 258
Joined: Fri Apr 11, 2014 1:18 am

Re: Sequential Numbering in 'Text'

Post by lev »

Take a look at https://forum.pdf-xchange.com/viewtopic.php?f=62&t=28271&p=110314&hilit=circle+stamp#p110314
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17820
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Sequential Numbering in 'Text'  SOLVED

Post by Tracker Supp-Stefan »

Hello BPZ,

I believe that the solution you need is like in the attached stamp collection
Stamps_indexes.pdf
(9.47 KiB) Downloaded 67 times
Place this file in %Appdata%\Tracker Software\PDFXEditor\3.0\Stamps and restart the Editor.
After that you will have a new stamp collection with 3 stamps in it.
One is a counter for the current document only, the second is a global counter (you can stamp e.g. 1 and 2 in one file, open another in a new tab and stamp 3 in it). These two counters are "live" only for the current Editor session and will be reset to 1 when you restart the Editor.

The third is a "persistent" counter that is stored on your disk, and the value the counter has reached will be remembered between Editor sessions. The name of the variable is one you can select yourself and you can select other similar variable names. These stamps do not have a way for you to "reset" the counter or skip ahead a given number of counts, but this can be implemented with some more JS:
Advanced Dynamic Stamp Creation

Kind regards,
Stefan
BPZ
User
Posts: 4
Joined: Fri Nov 26, 2021 10:50 am

Re: Sequential Numbering in 'Text'

Post by BPZ »

Hello Stefan,

This is a huge step in the right direction!

We will see what we can change in the java script regarding the manual adjustment of the starting number.

Thank you.
BPZ
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17820
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Sequential Numbering in 'Text'

Post by Tracker Supp-Stefan »

:)
BPZ
User
Posts: 4
Joined: Fri Nov 26, 2021 10:50 am

Re: Sequential Numbering in 'Text'

Post by BPZ »

Hello Forum,

Sadly, we still cant figure out how to implement the code that gives the user the option to change the starting number.

We would like to have a little pop-up menu where the start of the interval can be changed.
But a parameter in the property menu would also suffice.

Also, to be able to change the text size would be great.

You would think there would be a readily available script for something like this, considering Bluebeam has the function build-in
.
Thanks in Advance & great holidays!

-BPZ
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17820
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Sequential Numbering in 'Text'

Post by Tracker Supp-Stefan »

Hello BPZ,

Bluebeam do a lot of things that are aimed at Engineers anr Architects but some of them while technically valid for PDF files and not breaking them are not standard for the PDF specification - so as soon as you open the file in another PDF Tool - you find out that e.g. a complex object that behaves like 1 in Bluebeam is actually several separate other objects (as per the PDF Specification).

The font for stamps you are creating will be fixed in size relative to the rest of the stamp, but you can click and drag whill placing a stamp to place it in different sizes.

As for resetting your counters - you will need to implement e.g. custom buttons (that appear in an "Add-on Tools" toolbar):
image.png
Which when clicked could reset your counters.
(Technically you can implement a counter reset in the stamp itself, and prompt for a dialogue - but then this will be called every time you try to use that stamp!)

Kind regards,
Stefan
Post Reply