Replace or skip a line
Greetings!
I'm injecting a piece of ps code into an existing print stream with a separator page. The injecting works fine, but I can't to seem to get the injected code right. The code should actually skip (or delete or replace by empty line) one or more lines further down in the ps datastream.
I've tried using currentfile and readline/readstring but I can't seem to figure this out. How can I skip a command matching a certain text.
something like:
*here I setup some forms to overlay on the printjob*
%this is the code I created to skip a line/or delete/ignore it
{ currentfile 14 string
{2 copy readline {(12345X) search {exit}{pop} ifelse}{exit}ifelse} loop
pop pop
} exec
%end of my miserably failed tries
*here is the line I'm trying to skip/avoid, it maybe right after my code or further down the following ps code*
The line I'm trying to skip/avoid is the first line of the printjob itself, the hp driver adds a UEL <esc>%-12345X command which resets the memory and with it my ps code from the separator page (the forms to overlay the printjob with).
To test, I deleted the line I want to delete manually and it works. So all I need to complete this is a way to skip/delete/ignore it.
Thank you very much for any tips ![]()
Greetings,
Lex
