Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto populating text fields. Text insert question. 2

Status
Not open for further replies.

stevef22

Technical User
Sep 20, 2005
83
US
Hello and good day to everyone, glad to be a part of this forum! I am going to stick around this site, GREAT INFORMATION!

My question is how do I insert text faster? I am bulding a plaque. Booooring yes I know but necessary. Anyone know how to set up "pre-determined" text fields that populate from an internal or external text? Right now I have to >duplicate layer>drag layer to new spot>enter in new text. It would be really neat if PS could populate from a file like web-site populate pages from other text files. If anyone knows a faster way to enter in this text then your are the PS GURU. Thanks again.
Steve
attachment.php
 
Ok, sec, let me retype them they are in a .PDF, I will get them into text for you.
 
Nice to see that you're appreciated Duncs!
I always knew you were worth money! ;-)
Still, all joking aside, it was an excellent solution.
Can't wait to see the final results.


Trojan.
 
please don't send money!!! i was only kidding!


Kind Regards
Duncan
 
LOL!
You should accept it Duncs, it demonstrates real appreciation.
It also demonstrates that stevef22 is one of the good guys that respects peoples abilities and efforts.
I doubt you're retire on it though! ;-)


Trojan.
 
This is the layout of the text.

attachment.php


Here are the names in layout format.

Leann Mckneand
Store 592
January 2005
Angela Schuessler
Store 0593
January 2005
Rufus Smith
Store 2220
January 2005
Sara Doss
Store 2310
January 2005
Laynette Mccray
Store 2319
January 2005
Atalissa Vaughn
Store 2394
January 2005
Alex Camarrillo
Store 0903
January 2005
Roseann Lyson
Store 1409
January 2005
Jon Weller
Store 2352
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005

Very interesting to see what you do w/ this!
 
He's done it again - made it so easy to understand what he needs! Even the first names on the list are the same as on the picture - so i can see immediately that he needs the 2nd name on the right of the 1st. Superb start!

Now to get on with the interesting bit...


Kind Regards
Duncan
 
attachment.php


Here are more dimensions of my document. Hope this helps.
 
Let me know if anything else needs clarification.
Thank you very much,
Steve
 
sorry... food!

kind of along these lines:-

Code:
[b]#!/usr/bin/perl[/b]

$v = 20;

open (PS_OUT, "> plaque_names.ps");

select PS_OUT;

chomp (@data = <DATA>);

print <<PREAMBLE;
%!PS

%---------- Procedures ----------

/cm {28.3464567 mul} def

%---------- Postscript ----------


PREAMBLE

for ($x=0; $x<=$#data; $x++) {
  if ($x % 3 == 0) {
    for ($y=1; $y<=4; $y++) {
    
       $name = shift @data;
      $store = shift @data;
       $date = shift @data;
       
      ($firstname, $surname) = split(/ /, $name);
      
      print $y * 4 . " cm " . $v . " cm moveto\n";
      print "/Helvetica-Bold findfont 16 scalefont setfont\n";
      print "($firstname) dup stringwidth pop 2 div neg 0 rmoveto show\n";
      
      print $y * 4 . " cm " . ($v - 0.75) . " cm moveto\n";
      print "/Helvetica-Bold findfont 16 scalefont setfont\n";
      print "($surname) dup stringwidth pop 2 div neg 0 rmoveto show\n";
      
      print $y * 4 - 1.5 . " cm " . ($v - 1.25) . " cm moveto\n";
      print "/Helvetica findfont 8 scalefont setfont\n";
      print "($store) show\n";
      
    }
    print "\n";
    $v-=5;
  }
}

close PS_OUT;

[blue]__DATA__
Leann Mckneand
Store 592
January 2005
Angela Schuessler
Store 0593
January 2005
Rufus Smith
Store 2220
January 2005
Sara Doss
Store 2310
January 2005
Laynette Mccray
Store 2319
January 2005
Atalissa Vaughn
Store 2394
January 2005
Alex Camarrillo
Store 0903
January 2005
Roseann Lyson
Store 1409
January 2005
Jon Weller
Store 2352
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005[/blue]

... what you reckon Trojan?


Kind Regards
Duncan
 
will generate:-

Code:
%!PS

%---------- Procedures ----------

/cm {28.3464567 mul} def

%---------- Postscript ----------


4 cm 20 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Leann) dup stringwidth pop 2 div neg 0 rmoveto show
4 cm 19.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Mckneand) dup stringwidth pop 2 div neg 0 rmoveto show
2.5 cm 18.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 592) show
8 cm 20 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Angela) dup stringwidth pop 2 div neg 0 rmoveto show
8 cm 19.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Schuessler) dup stringwidth pop 2 div neg 0 rmoveto show
6.5 cm 18.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 0593) show
12 cm 20 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Rufus) dup stringwidth pop 2 div neg 0 rmoveto show
12 cm 19.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Smith) dup stringwidth pop 2 div neg 0 rmoveto show
10.5 cm 18.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 2220) show
16 cm 20 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Sara) dup stringwidth pop 2 div neg 0 rmoveto show
16 cm 19.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doss) dup stringwidth pop 2 div neg 0 rmoveto show
14.5 cm 18.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 2310) show

4 cm 15 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Laynette) dup stringwidth pop 2 div neg 0 rmoveto show
4 cm 14.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Mccray) dup stringwidth pop 2 div neg 0 rmoveto show
2.5 cm 13.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 2319) show
8 cm 15 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Atalissa) dup stringwidth pop 2 div neg 0 rmoveto show
8 cm 14.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Vaughn) dup stringwidth pop 2 div neg 0 rmoveto show
6.5 cm 13.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 2394) show
12 cm 15 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Alex) dup stringwidth pop 2 div neg 0 rmoveto show
12 cm 14.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Camarrillo) dup stringwidth pop 2 div neg 0 rmoveto show
10.5 cm 13.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 0903) show
16 cm 15 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Roseann) dup stringwidth pop 2 div neg 0 rmoveto show
16 cm 14.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Lyson) dup stringwidth pop 2 div neg 0 rmoveto show
14.5 cm 13.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 1409) show

4 cm 10 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
4 cm 9.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Weller) dup stringwidth pop 2 div neg 0 rmoveto show
2.5 cm 8.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 2352) show
8 cm 10 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
8 cm 9.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
6.5 cm 8.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
12 cm 10 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
12 cm 9.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
10.5 cm 8.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
16 cm 10 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
16 cm 9.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
14.5 cm 8.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show

4 cm 5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
4 cm 4.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
2.5 cm 3.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
8 cm 5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
8 cm 4.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
6.5 cm 3.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
12 cm 5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
12 cm 4.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
10.5 cm 3.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
16 cm 5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
16 cm 4.25 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
14.5 cm 3.75 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show

4 cm 0 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
4 cm -0.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
2.5 cm -1.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
8 cm 0 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
8 cm -0.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
6.5 cm -1.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
12 cm 0 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
12 cm -0.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
10.5 cm -1.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
16 cm 0 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
16 cm -0.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
14.5 cm -1.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show

4 cm -5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
4 cm -5.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
2.5 cm -6.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
8 cm -5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
8 cm -5.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
6.5 cm -6.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
12 cm -5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
12 cm -5.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
10.5 cm -6.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show
16 cm -5 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Jon) dup stringwidth pop 2 div neg 0 rmoveto show
16 cm -5.75 cm moveto
/Helvetica-Bold findfont 16 scalefont setfont
(Doh) dup stringwidth pop 2 div neg 0 rmoveto show
14.5 cm -6.25 cm moveto
/Helvetica findfont 8 scalefont setfont
(Store 5555) show


Kind Regards
Duncan
 
Ok, so the first one I save as ASCII text with the extention ???
 
sry, I mean how do I run the top script to generate the second .ps file?
 
ah - that might require Trojan to help!

basically you are going to need Perl on your machine - what machine do you have?

for the time being ... just save the output first as names.ps and open it with Photoshop (as a generic EPS file) - and rasterise


Kind Regards
Duncan
 
I have win XP, too bad I cant just put .exe on perl file and run it. : (
 
I think you should possibly install Activestate Perl - very easy!


Kind Regards
Duncan
 
The second one is done for you!
Duncs, that script looks cool but I'm getting Postscript errors with the output file.

:-(



Trojan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top