Public Discussions > General Discussion

Help transforming INF to PDF

<< < (3/3)

Dave Yeo:

--- Quote from: Martin Iturbide on April 12, 2015, 12:18:07 am ---uhm...


--- Quote ---[E:\OS2TK45\BOOK]ps2pdf addendum.ps
     1 +++   ??????parse arg params??gs = '@gsos2'?inext = '.ps'?outext = '.pdf'
??if params = '' then call usage??options = ''???i = 1?param = word(params, i)?d
o while substr(param, 1, 1) = '-'? options = options param? i = i + 1? param = w
ord(params, i)?end??infile = param?if infile = '' then call usage?outfile = word
(params, i + 1)?if outfile = '' then do? outfile = infile''outext? infile = infi
le''inext?end??gs options '-q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -s
OutputFile='outfile options '-c save pop -f' infile?exit??usage : ?say 'Usage: p
s2pdf [options...] input[.ps output.pdf]'?exit?;
REX0013: Error 13 running C:\programs\gs\gs9.15\lib\ps2pdf.cmd, line 1:
Invalid character in program

--- End quote ---

--- End quote ---

Looks like a line ending problem where the REXX script has unix line endings. Simplest is to load it into the system editor and save it (untested with the eCS editor) or run unix2dos on it.

Andreas Schnellbacher:

--- Quote from: Dave Yeo on April 12, 2015, 05:03:00 am ---Simplest is to load it into the system editor and save it (untested with the eCS editor) or run unix2dos on it.

--- End quote ---
Or use EPM:

* Load the file
* Press Ctrl+I or Esc to open the command dialog
* Type save /o and press Ok to save it with CRLF line endings.

Martin Iturbide:
Hi Andreas.

The EPM did the trick with ps2pdf.cmd.

But I still get an error with Ghostscipt 9.15.


--- Quote ---[E:\OS2TK45\BOOK\PS]ps2pdf addendum.ps addendum.pdf

*** Warning: GenericResourceDir doesn't point to a valid resource directory.
               the -sGenericResourceDir=... option can be used to set this.

Error: /invalidfont in /findfont
Operand stack:
   150   Helvetica
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push   1935   1   3   %oparray_pop   1934   1   3   %oparray_
pop   1918   1   3   %oparray_pop   1804   1   3   %oparray_pop   --nostringval-
-   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringv
al--   2   %stopped_push   --nostringval--   --nostringval--   1887   2   4   %o
parray_pop
Dictionary stack:
   --dict:1178/1684(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--   --dict:55
/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 3692
GPL Ghostscript 9.15: Unrecoverable error, exit code 1

--- End quote ---

Now I'm reading about "-sGenericResourceDir=".

Martin Iturbide:
Maybe I'm loosing some basic information on how to configure ghostscript on OS/2.

Is there any documentation available. I followed the readme.os2 instructions on ghostscript but I think I'm missing more.
I had only included the \bin and \lib on path and libpath as extra.

Any recommendations?

Dave Yeo:
Haven't tried gs9.15 but with gs8.00 I use this cmd to invoke it, note that the device=os2pm no longer works with 9.x as the driver is no longer there. Gs is installed in f;\utils\gs8.00.


--- Code: ---@f:\utils\gs\gs8.00\bin\gsos2.exe -If:/utils/gs;f:/utils/gs/fonts;n:/psfonts -sDEVICE=os2pm -dBitsPerPixel=8 -sPAPERSIZE=a4 %1 %2 %3 %4 %5 %6 %7 %8

--- End code ---

The important part to fix your error is probably including psfonts.

Navigation

[0] Message Index

[*] Previous page

Go to full version