Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...It's extraordinarily refreshing to see truly expert advice without having to wade through hipper than thou attitude..."

Geography

Where in the world do Tek-Tips members come from?
nycwipeout (IS/IT--Management)
26 Apr 12 14:51
I need to build a workflow for right to left reading pubs and renumber the pages from say 238 to 000, 237 to 001 and so on. each pub will have a different page count.

I get 2 PDFs, one is a dummy file which has the page count in the filename "0512ESQ_Maps_238.pdf"

the 2nd PDF is the one that gets processed "ESQ050112_eReader.pdf" into single pages "ESQ050112_eReader_001.pdf"etc.

is there a tcl expression I can use?

I am currently using this to number one down #1_00[epr #3-1]
but want to know if I can reverse it in tcl
Bong (Programmer)
26 Apr 12 16:17
I don't understand the question.  Can you post an example?

_________________
Bob Rashkin

mikrom (Programmer)
26 Apr 12 16:25
Don't know about editing/changing PDF documents with Tcl. Probably not possible.
mikrom (Programmer)
26 Apr 12 16:38
Or do you mean to something like this?

CODE

set i 238
while {$i > 0} {
  set k [expr 238 - $i]
  puts "$i --> $k"
  set i [expr $i - 1]
}
Output:

CODE

238 --> 0
237 --> 1
236 --> 2
235 --> 3
...
...
5 --> 233
4 --> 234
3 --> 235
2 --> 236
1 --> 237

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close