Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unreadable .PS output
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01089112
Message ID:
01095283
Vues:
52
Pascal,

(I don't get here very often, so if this message doesn't give you enough help please reply to me e-mail. Otherwise I am not likely to see your questions <s>.)


>>
Thanks for all the solution hints; they make most sense. But could you clarify what you meant by class-finding being alien to Windows-users and font-embedding?
<<


Re classpath I'm saying that gs has command-line arguments that help it find its "bits" and most Windows people are not used to this approach. One of the "bits", btw, is its fonts directory. I typically streamline the gs distribution directories to make some of this easier, but I still use the explicit arguments that help gs find everything it needs. My command line args look something like this:
#DEFINE GS_COMMAND_STRING_1  " -q -dNOPAUSE -I./lib;./fonts " + ;
                             "-sFONTPATH=./fonts " + ;
                             "-sFONTMAP=./lib/FONTMAP.GS " + ;
                             "-sDEVICE=pdfwrite -sOUTPUTFILE="

#DEFINE GS_COMMAND_STRING_2 " -dBATCH  "   
Re font-embedding... this was a long shot because gs does pretty efficient font-mapping and I'll assume you distribute with the appropriate font files that it expects to find as a base set. See above for it finding the files. Let's not worry about this unless we have to.


>>
On font-embedding however, I don't know what you mean, I haven't coded anything to that effect, could you elaborate? (must the path to gs' FONTS subfolder be included, in my VFP path too?)
<<


This would do you no good at all, as far as I know. You need to use the appropriate argument(s) to the gs command line. That's speaking from my experience with gswin32c.exe and the other exe, of course; I don't use ps2pdf, which might have slightly different arguments. It's also possible that ps2pdf uses a different distribution of gs than I use. FWIW I have used both AFPL and GNU/GPL GS with very good results.


>>
If by class finding you meant looking up the computer for the folder containing gs' DLLs and EXEs, I think I got that part ok(as far as I can see), and so's my use of macros for proofing against spaces in folders (see relevant parts of code below...).
<<


No, I really don't think you do. For one thing, on the Fox side, I would avoid TO FILE &lcPSFile in your REPORT FORM command, in favor of an indirect reference. And yes, I'm only looking at this quickly but I do see where you're adding the quotes.

For another, on the non-Fox side, there is still a good possibility that gs is having a problem with your pathing, quotes or no quotes. To know for sure I'd have to screw around with your lcPSFile contents etc. For example: forward or back slashes in the path? Remember: you're talking to an xplat program here <s>. NOT a Windows native.

Again, I don't use ps2pdf, I use the base gs executable explicitly, and I can't tell whether the argument you're passing to ShellEx is going to solve your problem 100% of the time. I'm betting it does not.

I can only tell you that I take no chances with this (any more, after years of banging my head against the wall <s>). I CD directly to the GS directory, restoring the SET("DIRECTORY") afterwards, to do the work. And this is true whether I use Run or several different incarnations of ShellEx that I've tried, plus Windows scripting host!

As another possibility -- I'm sure I mentioned this in the article -- you can probably try the gs DLL rather than the EXE. I've just been doing this longer than that was possible, and I never switched. It might make all the difference to any pathing issues that exist. Of course then you're "thinking like a Windows person" and you probably need to register the DLL etc, possibly even use the Windows setup program -- which I avoid, but which would tell Windows where all the bits are in an "alternative" manner.

>L<
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform