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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EPS in form / limitcheck

Status
Not open for further replies.

svmarti

Programmer
Apr 5, 2004
6
NO
We have an Canon CLC1000 with an ColorPass 8000 RIP and are trying to do VDP
with "large" EPS'es embedded in form procedures (execform).
I have succesfully applied the technique found in another thread in this forum (How to place EPS into a PS?)

This works fine with Ghostscript/GSView, but when trying
to print on our RIP i get
"ERROR: limitcheck"
OFFENDING COMMAND: filter

The RIP has 512 MB of total RAM and the EPS that is embedded is about 2.5 MB (and not too complicated) so
i guess this should not be an impossible task to print this EPS embedded in a form.

I have NO documentation whatsoever on this RIP (and Canon does not want to provice any as we bought this RIP
second-hand without any manual - if anyone has one to share, let me know).

I have not tried to store this EPS to a file and RUN it, as i am afraid of cluttering
up the disk on my RIP with "failed" programs writing to it.

Any idea of what i could/should try next?
 
These "preprint-EPS'es" most often contain large bitmap-files, so there is not alot overhead that can be removed. They are "structurally" simple but still large.

This is not a one-off problem but something we would have to do every day and need to print at "full speed". Downloading the EPS for every page is not an option.

I also tried the method published by Adobe:
"Technical Note #5144 Using EPS Files in Postscript Language Forms".
This filter versjon splits the stream up in 16000 byte chunks to conserve memory. The problem is that i cannot
make it work on any platform. Even Ghostscript returns error when processing the files, even with tiny EPS-files.
 
The error message i get from Ghostscript is:
GSview 4.6 2004-01-11
Unknown in Prolog section at line 10:
%%Title: (Forms Operators)


Unknown in Prolog section at line 11:
%%Version: 1.0


AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Displaying DSC file F:/Postscript/lmidG3.PS
Displaying page 1
Error: /invalidaccess in --def--
Operand stack:
false spg --nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 2 5 %oparray_pop --nostringval-- false 1 %stopped_push 2 5 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1120/1686(ro)(G)-- --dict:0/20(G)-- --dict:85/200(L)-- --dict:7/10(ro)(L)-- --dict:85/200(L)-- --dict:7/10(ro)(L)-- --dict:85/200(L)-- --dict:13/300(G)--
Current allocation mode is global
Last OS error: No such file or directory

--- Begin offending input ---
%%Page: 1 1

%%BeginPageSetup

/pgsave save def

%%EndPageSetup

TestForm execform

%%PageTrailer

pgsave restore

showpage


--- End offending input ---
file offset = 0
gsapi_run_string_continue returns -101

***************************************************
The source is (i have shortened the EPS-part.):
%!PS-Adobe-3.0
%%Title: (Using EPS file in Form in VM)
%%BoundingBox: 0 0 596 842 % UPDATE FOR EACH EPS
%%DocumentProcessColors: Black % PROMOTE DSC COMMENTS FROM EPS
%%LanguageLevel: 2
%%Pages: 3
%%EndComments
%%BeginProlog
%%BeginResource: procset forms_ops 1.0 0
%%Title: (Forms Operators)
%%Version: 1.0
userdict /forms_ops 10 dict dup begin put
/StartEPSF { % prepare for EPSF inclusion
userdict begin
/PreEPS_state save def
/dict_stack countdictstack def
/ops_count count 1 sub def
/showpage {} def
} bind def
/EPSFCleanUp { % clean up after EPSF inclusion
count ops_count sub {pop} repeat
countdictstack dict_stack sub {end} repeat
PreEPS_state restore
end % userdict
} bind def
/STRING_SIZE 16000 def % Best value to not fragment printer's VM
/ARRAY_SIZE 169 def % UPDATE FOR EACH EPS == filesize/16000 + 2
% for initial counter and final empty string.
/buffer STRING_SIZE string def
/inputFile currentfile 0 (% EOD_Marker_7654) /SubFileDecode filter def
/readdata { % array readdata --
1 { % put counter on stack
% stack: array counter
2 copy % stack: array counter array counter
inputFile buffer readstring % read contents of currentfile into buffer
% stack: array counter array counter string boolean
4 1 roll % put boolean indicating EOF lower on stack
STRING_SIZE string copy % copy buffer string into new string
% stack: array counter boolean array counter newstring
put % put string into array
not {exit} if % if EOF has been reached, exit loop.
1 add % increment counter
} loop
% increment counter and place empty string in next position
1 add 2 copy () put pop
currentglobal true setglobal exch
0 1 array put % create an array for counter in global VM,
% so as not to be affected by save/restore calls in EPS file.
% place as first element of string array.
} bind def
currentdict readonly pop end
%%EndResource
%%EndProlog
%%BeginSetup
% set MaxFormItem to be equivalent to MaxFormCache
<< /MaxFormItem currentsystemparams /MaxFormCache get >> setuserparams
% make forms procset available
forms_ops begin
userdict begin
% download form resource
%%BeginResource: form TestForm
/TestForm
10 dict begin
/FormType 1 def
/EPSArray ARRAY_SIZE array def
/AcquisitionProc {
EPSArray dup 0 get dup 0 get % array counter_array counter
dup 3 1 roll % array counter counter_array counter
1 add 0 exch put % increment counter
get % use old counter as index into array, placing
% next string on operand stack.
} bind def
/PaintProc {
begin
StartEPSF
% May want to translate here, prior to executing EPS
EPSArray 0 get 0 1 put
//AcquisitionProc 0 () /SubFileDecode filter
cvx exec
EPSFCleanUp
end
} bind def
/BBox [ 0 0 596 842] def % UPDATE FOR EACH EPS
/Matrix [1 0 0 1 0 0] def
currentdict end def % TestForm
TestForm /EPSArray get
readdata
%%BeginDocument: (LMID.EPS) % UPDATE FOR EACH EPS
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 596 842
%%LanguageLevel: 1
%%Creator: CorelDRAW 9
%%Title: LMID.eps
%%CreationDate: Mon Feb 07 15:29:41 2005


%%....
%% HERE IS A QUITE BIG EPS WITH SOME BIG IMAGES
%%....


0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
/$msimage false def
%%PageTrailer
@rs
@rs
%%Trailer
@EndSysCorelDict
end
%%DocumentSuppliedResources: procset wCorel9Dict 9.0 0
%%EOF
%%EndDocument
% EOD_Marker_7654 % Put this comment after your EPS file so
% SubFileDecode filter will reach end of data.
%%EndResource
%%EndSetup


%%Page: 1 1
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
TestForm execform
%%PageTrailer
pgsave restore
showpage
%%Page: 2 2
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
TestForm execform
%%PageTrailer
pgsave restore
showpage
%%Page: 3 3
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
TestForm execform
%%PageTrailer
pgsave restore
showpage
%%Trailer
end % userdict
end % forms_ops
%%EOF
 
That's way ugly... I don't want to try and debug it. Let's start over.

You say the EPS files contain large bitmap images. Instead of an EPS, can you work with hexpaired image data?

Look inside the EPS, and you'll probably find a lot of ASCII Hex, or ASCII-85 data, used by or inside of an image dictionary.

We can use that data natively; we can write our own Image dictionary. That image dictionary will use a Data Acquisition Procedure. That procedure will read from an array of strings. We'll create that array of strings out of the image data.



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
The challenge is that our operator is used to receive ready made designs in Corel Draw including maybe 5 logos and 2 text lines (we are printing start numbers for sport events) and are only to add a few numbers / barcodes to this design. We print about 2000 such jobs every year and i have today a hand written C program that accepts this layout as monochrome bitmap for our monchrome line for download as macros to our HP printers (HP PCL).

Now we want to do this for color designs as well. My idea was to try do adapt my C program to support color printers as well. I am afraid that if i export to bitmap instead of EPS i might loose control over exact colors and the files would become even bigger (A4 page in monochrome is already about 1 MB - in 8 bit for CMYK it could become 32 MB - encoded binary!). Of course i could break the design up into multiple logos/text and implement them one by one and defining color for every-one of them, but that again would rise the workload for our operator. Also sometimes we receive ready-made EPS from our customers and conversjon to bitmaps might reduce quality (apart from that about 50% of the EPS we recieve are rejected by Corel Draw, but accepted by the printer, so EPS is - again - the only simple option).

My plan - for now - is still to try to store the big EPS on the harddisk. I am not a proficient Postscript programmer, so i am browsing for doucumentation on how to do this (with "run" operator). Any pointers to where i could find some examples of this approach. Reading Adobes 900 page redbook is not quite what i had hoped for this weekend!

Thank you for all help this far!

/Sven
 
Your form cache may be too small. Try to increase it. You can also consider running the EPS directly from the disk or memory. You can try to compress the EPS file and run it
through a decoding filter.

I love to debug PostScript code. Where are you ?
I'm in Philadelphia, PA.

--
Your PostScript expert is just a click away.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top