Bug 691481 - hpgl call failed (pglabel.c)
Summary: hpgl call failed (pglabel.c)
Status: RESOLVED INVALID
Alias: None
Product: GhostPCL
Classification: Unclassified
Component: PCL interpreter (show other bugs)
Version: unspecified
Hardware: PC Windows 7
: P4 normal
Assignee: Henry Stiles
QA Contact: Bug traffic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 08:31 UTC by Florian Rausch
Modified: 2010-08-27 23:57 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
3 pages, images/tables (76.47 KB, application/octet-stream)
2010-07-21 08:31 UTC, Florian Rausch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Rausch 2010-07-21 08:31:53 UTC
Created attachment 6518 [details]
3 pages, images/tables

GhostPCL 8.71, Compiler: VS2008 debug

conversion fails, output file is incomplete and destructive.

D:\>pcl6d -sDEVICE=pdfwrite -sOutputFile="D:\test.pdf" "D:\Auftrag1_PCL-Quelldatei.prn"
End of page 1, press <enter> to continue.

hpgl call failed
       called from:
       file: ..\pcl\pglabel.c
       line: 140
       error code: -1
hpgl call failed
       called from:
       file: ..\pcl\pglabel.c
       line: 1179
       error code: -1
hpgl call failed
       called from:
       file: ..\pcl\pglabel.c
       line: 1364
       error code: -1
Warning interpreter exited with error code -1
Flushing to end of job
Comment 1 Henry Stiles 2010-07-21 16:55:46 UTC
Looks like it isn't finding the fonts, there is an environment variable PCLFONTSOURCE you can use.  See the documentation ghostpcl.pdf.
Comment 2 Florian Rausch 2010-07-21 20:38:27 UTC
This variable is set, i installed the urwfonts.
And i can successfull convert other files. Only this file fails.
It is not just a missing font :/
Comment 3 Henry Stiles 2010-07-22 00:31:10 UTC
(In reply to comment #2)
> This variable is set, i installed the urwfonts.
> And i can successfull convert other files. Only this file fails.
> It is not just a missing font :/

I am fairly confident that is the issue, the job works for me but if I "hide" the fonts by moving the font directory I get the same error as you.  

Some pcl files don't need fonts and those files will work fine.

There might be some problem with using an external drive.  See if you can get it to work with everything on the default drive - no drive designators (d:\), if that works I'll see if there is a bug in parsing the external drive.  I'm not a windows developer so I'd appreciate your help in isolating the problem as much as possible.
Comment 4 Florian Rausch 2010-07-22 10:32:37 UTC
Okay, than i'll explain the other problems i had to solve first. This all is valid for Win7 and WinXP (Virtual Machine).
After i compiled pcl6.exe, i used it on drive D:\. At this point there was no PCLFONTSOURCE environment variable. I discovered, that i could not use pcl6.exe when my current command line location was C:\ - no matter where pcl6.exe was located. For example, the following worked (i'll skip the arguments and switches):

D:\>pcl6.exe
D:\>C:pcl6.exe

But this did not work:

C:\>pcl6.exe
C:\>D:\pcl6.exe

... producing the following endless repeating output: 

cannot open file /windows/fonts/sseriffg.fo 
cannot open file /windows/fonts/sseriffr.fo 
cannot open file /windows/fonts/sserifft.fo 
cannot open file /windows/fonts/StaticCache 
cannot open file /windows/fonts/STENCIL.TTF 
cannot open file /windows/fonts/StencilStd. 
cannot open file /windows/fonts/svgafix.fon 
cannot open file /windows/fonts/svgasys.fon 
cannot open file /windows/fonts/sylfaen.ttf 
cannot open file /windows/fonts/symbol.ttf 
cannot open file /windows/fonts/tahoma.ttf
(and may more lines)


Of course the fonts have been there. Than i tried to use the PCLFONTSOURCE environment variable, set to "C:/Windows/Fonts/" (forward slashes, as mentioned in doc) which produced:

cannot open file C:/Windows/Fonts/sseriffg.fon 
cannot open file C:/Windows/Fonts/sseriffr.fon 
cannot open file C:/Windows/Fonts/sserifft.fon 
cannot open file C:/Windows/Fonts/StaticCache.dat 
cannot open file C:/Windows/Fonts/STENCIL.TTF 
...

After that, i just tried to use backward-slashes: "C:\Windows\Fonts\".
This worked, i was able to work with pcl6.exe on drive C:\.

So everything was fine, until i tried to convert the file in the attachment in my first post.

I also set PCLFONTPATH to another location, where only the urwfonts are located. Currently i installed the urwfonts to Windows\Fonts and PCLFONTPATH points there.

I tried this all on Win7 X86 and X64, using VS 2008 command line and GUI to compile, and also compiled as debug and release.

Using WinXP, i had to set PCLFONTSOURCE in every case, no matter if command line location is C:\ or isn't. Here also Backward-Slashes have to be used in PCLFONTPATH. And of course i also installed urwfonts to Windows\Fonts.


> See if you can get it to work with everything on
> the default drive - no drive > designators (d:\),

C:\>pcl6 -sDEVICE=pdfwrite -sOutputFile=output.pdf Auftrag1_PCL-Quelldatei.prn
End of page 1, press <enter> to continue.

hpgl call failed
        called from:
        file: ..\pcl\pglabel.c
        line: 140
        error code: -1
hpgl call failed
        called from:
        file: ..\pcl\pglabel.c
        line: 1179
        error code: -1
hpgl call failed
        called from:
        file: ..\pcl\pglabel.c
        line: 1364
        error code: -1
Warning interpreter exited with error code -1
Flushing to end of job

C:\>



Other files are working, of course. Anything else, i can try?
Thanks for your great work!
Comment 5 Henry Stiles 2010-07-22 19:17:57 UTC
> 
> 
> 
> Other files are working, of course. Anything else, i can try?
> Thanks for your great work!

running the interpreter with -Z= might be useful.  But the sfopen() in pllfont.c:256 is failing on your machine for some reason, that shouldn't happen, it is simply opening the files.

Maybe a tool like:


http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

can tell us why the file open system call is failing.
Comment 6 Henry Stiles 2010-07-29 17:50:43 UTC
Any progress on this? I can't seem to reproduce it on my windows platform.
Comment 7 Florian Rausch 2010-07-29 17:57:32 UTC
Hello, in the past days i haven't been at home, so no progress. I will go on tomorrow.

Which windows platform do you use? I got the error on XP and Seven.
What's the exact environment variable you set?
Comment 8 Florian Rausch 2010-08-20 10:32:09 UTC
Hi Henry, i still did not find a solution. Due to working on another project in a foreign country currently, i had time for this.

I have the problem on 3 different Win7 Machines and on my virtual WinXP. Could it be possible, that the compiled executable has some problem/error? Could it be worth to try your compiled windows executable in my environment?

Which win version did you use? Where did you place the urwfonts, what is your PCLFONTPATH environment variable set to?
Comment 9 Henry Stiles 2010-08-23 16:41:09 UTC
Ken Sharp raised an interesting idea:  The fonts are supposed to be compiled into the executable, see the makefile pcl6_msvc.mak - it should have COMPILE_INIT=1.  The fonts should be placed in the directory ghostpdl-8.71/urwfonts and *then* the code should be compiled.  It sounds like you installed the fonts after compiling.

This is the first release we have done with wrapping the fonts in the executable by default.  We'll need to clarify the build and configure documentation, sorry for the inconvenience.
Comment 10 Florian Rausch 2010-08-24 18:36:54 UTC
Wow, it works. :)
The executable is now much larger in filesize and i also had to delete the environment variable. While it was present and set to windows fonts-path, it produced the same error.

Thanks! :)