• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Numbers providing with a thousands/decimal separator?

New Here ,
Sep 12, 2012 Sep 12, 2012

Copy link to clipboard

Copied

Hi all,

I have wrote a little EPS-file, which generates a number, if the EPS file is placed on every page in Indesign and print out in a PostScript file. The number changes depending of the page count of the Indesign document and increases from 1 up to 15000000 - so the number may have up to 8 digits.

So far so good, the EPS works well.

The problem:

I want to mark the number with a thousands separator sign like a point, so the EPS delivers me the numbers in the following way:
from 1 to 999 without point
from 1.000 to 999.999 with a point in front of the last 3 digits
from 1.000.000 to ......   with a point in front of the last 3 digits and 6 digits and so on

I don't know how I may solve this problem. Would be glad for help.

Yosimo

%!PS-Adobe-3.1 EPSF-3.0
%%Title: (counter.eps)
%%BoundingBox: 0 0 400 60
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)

%%Page: 1 1

/SpecialInjectData where
{
    pop
    /stringBuffer 10 string def
    0 35 moveto
    /ArialMT findfont 16 scalefont setfont
    /_Number_1 { SpecialInjectData /RecipientData get (Number_1) get cvi } def        % Number_1 is delivered by a database
    /_PageIndex { SpecialInjectData /PageIndex get 1 add} def
    /_rightAligne { dup stringwidth pop
                    xPosition exch sub
                    yPosition moveto show } def
     _PageIndex stringBuffer cvs show

%    left Number
    /xPosition 50 def
    /yPosition 5 def
    /couponNo {_PageIndex 2 mul _Number_1 add 2 sub stringBuffer cvs } def            % this couponNo should be setted with the thousands separator
    couponNo _rightAligne

%    right Number (= left Number + 1)
    /xPosition 260 def
    /yPosition 5 def
    /couponNo {_PageIndex 2 mul _Number_1 add 1 sub stringBuffer cvs } def            % this couponNo should be setted with the thousands separator
    couponNo _rightAligne

}

{}ifelse

%%Trailer
%%Pages: 1
%%DocumentNeededResources: font ArialMT
%%DocumentSuppliedResources:
%%EOF

TOPICS
Programming

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Sep 12, 2012 Sep 12, 2012

Copy link to clipboard

Copied

I would most strongly discourage this type of use of EPS with InDesign. It may currently work if your output workflow is strictly PostScript, but PostScript is increasingly becoming a legacy / archaic workflow. If you were to export PDF from this InDesign file, your exported PDF would definitely not show these numbers the way you want or expect since InDesign would do its own static interpretation of the EPS and create PDF from same. And even for PostScript output, you should not assume that InDesign will always send out the EPS as-is and uninterpreted.

          - Dov

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

Hi Dove,

you are right and I know about these circumstances.

Normally I use the PDF export too. Only for this special case I need to use the EPS because in Indesign I'm printing out via a personalisation plug-in and the output format must be PostScript or PPML. Both formats are working well.

Only formatting the number with the thauthands separator is now my problem.

Regards

Yosimo

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2013 Feb 09, 2013

Copy link to clipboard

Copied

You need postscript routine which take string as input  and generate string as output

In your case the string must be the number it self  (6719000390)  for example

and the oputput will be (6.719.000.390)   etc

Any PS developer can provide it to you either free or with cost.

Regards

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2013 Feb 10, 2013

Copy link to clipboard

Copied

Yes, what could be better than to look for PostScript programmers at Adobe. I thought this would be the forum of Adobe find someone who could help me. But I was wrong.

Regards

Yosimo

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Feb 10, 2013 Feb 10, 2013

Copy link to clipboard

Copied

LATEST

This is a user forum, not an official help-from-Adobe forum or an outlet for Adobe Technical Support!

          - Dov

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines