Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Michel LECLERC

Homepage E-mail

France,
20.07.2007, 15:21
 

GhostScript 8.57 for DOS (V0.00) available ! (DOSX)

Hello Every Body

After a lot of experiences a little miracle has arrived !!!

It seems that it works. I need to be prudent because only one little test done...

Look at http://www.milec.com/download/GSWC_DLL.ZIP

To test you can use a BAT file like this one:

Set XGSDIR=D:\GS
Set GS_LIB=
Set GS_FONTPATH=

Set GS_OPTIONS=-I%XGSDIR%\GS8.57\lib;%XGSDIR%\fonts;%XGSDIR%\GS8.57\Resource -q

IF "%1" == "" GOTO DEFAULT
SET FN=%1
GOTO SUITE
:DEFAULT
SET FN=LISTING

echo /Times-Roman findfont 32 scalefont setfont 1.0 1.0 0.0 setrgbcolor>%FN%.PS

echo 100 350 moveto (Hello world!)show 1.5 setlinewidth 500 600 lineto stroke showpage >>%FN%.PS

rem SET FN=%XGSDIR%\GS8.57\EXAMPLES\snowflak
:SUITE
rem Impression sur imprimante
gswin32c -sDEVICE=deskjet -dBitsPerPixel=1 %FN%.PS -c quit
SET FN=

rr(R)

Homepage E-mail

Berlin, Germany,
20.07.2007, 16:11

@ Michel LECLERC

GhostScript 8.57 for DOS (V0.00) available !

> After a lot of experiences a little miracle has arrived !!!

Nice. :-)

> To test you can use a BAT file like this one:

[snip]

I hope you don't mind me surrounding your batch file content with a BBCode tag. ;-)

Japheth(R)

Homepage

Germany (South),
20.07.2007, 19:29

@ Michel LECLERC

GhostScript 8.57 for DOS (V0.00) available !

> Look at http://www.milec.com/download/GSWC_DLL.ZIP

Thanks! How has your printer problem finally been solved?

---
MS-DOS forever!

flox(R)

Homepage

21.07.2007, 16:34

@ Michel LECLERC

GhostScript 8.57 for DOS (V0.00) available !

> After a lot of experiences a little miracle has arrived !!!
>
> It seems that it works. I need to be prudent because only one little test
> done...
>
> Look at http://www.milec.com/download/GSWC_DLL.ZIP

I will test it! Btw: when you will have finished it, I will make a big announcement at Club Dr-DOS. I think your work is important (I am using TeX under Linux at the moment...which produces pdf and ps files...).

Thanks
Flo

Rugxulo(R)

Homepage

Usono,
22.07.2007, 00:56

@ rr

GhostScript 8.57 for DOS (V0.00) available !

> [snip]
>
> I hope you don't mind me surrounding your batch file content with a BBCode
> tag. ;-)

Sorry, I'm confused. Is this .BAT supposed to print something or convert or neither, just a simple test?? (Looks complex to setup, and I'm not experienced with Ghostscript. Guess I should check out the Win32 version first.)

---
Know your limits.h

rr(R)

Homepage E-mail

Berlin, Germany,
22.07.2007, 21:17

@ Rugxulo

GhostScript 8.57 for DOS (V0.00) available !

> Sorry, I'm confused. Is this .BAT supposed to print something or convert
> or neither, just a simple test?? (Looks complex to setup, and I'm not

Why do you ask me? ;-)
You should have replied to Michel. :-)
Thread or mix view is best for this.

DOS386(R)

23.07.2007, 02:29

@ Michel LECLERC

GhostScript 8.57 for DOS (V0.00) available - how to use it ?

> After a lot of experiences a little miracle has arrived !!!
> Look at http://www.milec.com/download/GSWC_DLL.ZIP
> To test you can use a BAT file like this one:

Thanks. But:

- What can it do ? View PDF's in DOS ?
- How to use it (to view a PDF file) ?

Japheth(R)

Homepage

Germany (South),
24.07.2007, 11:35

@ DOS386

GhostScript 8.57 for DOS (V0.00) available - how to use it ?

> - How to use it (to view a PDF file) ?

I use it this way to view PDFs (GS installed at C:\GS):

1. created a SHOWPDF.BAT:


@echo off
dpmild32 -g c:\gs\gs8.57\bin\gswin32c.exe "-Ic:\gs\gs8.57\lib;c:\gs\fonts;c:\gs\gs8.57\Resource" -q "%1" >c:\temp\gs.log


2. added a line in VC.EXT (using Volkov Commander):


...
pdf:    c:\bat\showpdf.bat "!.!"
...


browsing the file is limited, however, because you cannot jump to a specific page and there is also no key to jump to the previous page.

---
MS-DOS forever!

Iw2evk

Homepage E-mail

Magenta (North Italy),
24.07.2007, 13:29
(edited by rr, 24.07.2007, 13:49)

@ Japheth

GhostScript 8.57 for DOS (V0.00) available - how to use it ?

This .pdf files cause a hang up during conversion and printing from GS.
you can normally view the contents of file, but can't convert or printing.

Whath is the problem?

this is the file:

http://www.bobrathbone.com/manuals/Avo/M7Mk2opinst.pdf

Thanks

EDIT by rr: removed full-quote -- Please do not top-post!

Michel LECLERC

Homepage E-mail

France,
24.07.2007, 16:05
(edited by rr, 24.07.2007, 16:17)

@ Japheth

GhostScript 8.57 for DOS (V0.00) available !

Hello Japheth

> > Look at http://www.milec.com/download/GSWC_DLL.ZIP
>
> Thanks! How has your printer problem finally been solved?

It was necessary to specify 'raw' mode access for **device** 'lpt1' just after the opening of **file** 'lpt1'. Here is the source (Microsoft Visual C++ ToolKit 2003):


Test3:

#ifdef MILEC_DEBUG
    eprintf("Test n°3...\n");
#endif

    /* open 'LPT1' avec option 'OPEN_EXISTING' ('CREATE_ALWAYS' fonctionne aussi) */
    PPrinter = CreateFile("LPT1", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
    if (PPrinter == INVALID_HANDLE_VALUE) {

        eprintf("Ouverture de 'LPT1' impossible !\n");

        free(buffer);
        fclose(f);
        return FALSE;
    }

    if (Win_Mode) goto copy3;

    /* 170707: Mettre en place le mode 'RAW' */
    _asm
      {

         push ebx
         push edx

         mov  ebx, PPrinter     ; PPrinter est un HANDLE sur 32 bits. CF 'CopyFile.asm'
         mov  dx, 20h
         mov  ax, 4401h
         int  21h
         jc   error3
         xor  ax, ax
error3:
         mov  xRC, ax

         pop  edx
         pop  ebx

      }

#ifdef MILEC_DEBUG
    eprintf1("xRC: %i\n", xRC);
#endif


copy3:

    /* copy file to printer */
    while ((count = fread(buffer, 1, PRINT_BUF_SIZE, f)) != 0) {

#ifdef MILEC_DEBUG
        eprintf1("%i byte(s) read...\n", count);
#endif

        WriteFile(PPrinter, buffer, count, &written, NULL);
       
        if (written != count) {

#ifdef MILEC_DEBUG
            eprintf("Erreur écriture sur 'LPT1' !\n");
#endif

            free(buffer);
            fclose(f);
            CloseHandle(PPrinter);
            return FALSE;
        }

    }
    CloseHandle(PPrinter);


EDIT by rr: added {code} tag

Michel LECLERC

Homepage E-mail

France,
24.07.2007, 16:51

@ Michel LECLERC

GhostScript 8.57 for DOS (V0.01) available !

Hello Every Body

Many Thanks to all those who have manifested they interest for this project. I have been highly encouraged...

You can get a more usable version (which simply does not emit any debug information) here: http://www.milec.com/download/GSWC_DLL.ZIP

Note: You must have installed the (normal) GhostScript 8.57 for Windows on your computer (in c:\gs, not in c:\Program Files\gs) before decompacting GSWC_DLL.ZIP in c:\gs\gs8.57.

GhostScript has numerous possibilities, in order to remaind them the best is to ask Google with 'how to use ghostscript'.

Japheth(R)

Homepage

Germany (South),
24.07.2007, 17:46

@ Michel LECLERC

GhostScript 8.57 for DOS (V0.00) available !

> It was necessary to specify 'raw' mode access for **device** 'lpt1' just
> after the opening of **file** 'lpt1'. Here is the source (Microsoft Visual
> C++ ToolKit 2003):

Thanks, I see. There is indeed no matching Win32 function to set "raw" mode. Good that you implemented a Win32 query, so it will still run on Win32.

---
MS-DOS forever!

Steve(R)

Homepage E-mail

US,
24.07.2007, 20:05

@ DOS386

GhostScript 8.57 for DOS (V0.00) available - how to use it ?

> - What can it do ? View PDF's in DOS ?
> - How to use it (to view a PDF file) ?

A good online manual:
http://ghostscript.com/doc/current/Use.htm

Laaca(R)

Homepage

Czech republic,
31.07.2007, 21:14

@ Michel LECLERC

GhostScript 8.57 for DOS (V0.01) available !

Wow! At least viewing of PDF files works very well!
I recomend to use switch -r100 for comfortable size on screen.

Back to the board
Thread view  Mix view  Order
15108 Postings in 1358 Threads, 245 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum