Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PostScript printing - raw embed of bold, italic, etc.
Message
 
 
To
18/09/2007 14:13:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01255129
Message ID:
01255261
Views:
19
Dragan,

>Seems to be you are not generating a postscript file. That is, it's not you, it's your printer driver that does that. There's a difference. If you'd generate .ps straight from Fox using textmerge, you'd be in full control - and would probably have to apply the same amount of coding as with PCL. I've done both (ps and pcl) and can't say one is easier than the other.

You are 100% correct, Dragan. We are not creating a .PS file, just like we are not really creating a PCL file. We are just trying to send whatever works to either a PCL device (e.g. the actual printer) or to a PS device (e.g. a PostScript print driver that creates the .PS file).

I am learning a lot about why we do things the way we do. *smile* All letters that go straight to the printer start with:
??? ""
What does that do? Well, it appears to tell the printer that we are going to do all the work, sending straight text along with embedded ESC sequences for formatting (we do that because we have to take control of printer macros to generate letterhead and digitized signatures). I had no idea, but after the ??? "", trying to use the FONT or STYLE clause on @..SAY commands causes a syntax error! In the same way, if we do not start with ??? "", and then try to send ESC sequences, the sequences come through as raw text instead of affecting formatting.

>Did you try Font clauses with your @say commands? Don't send it sequences, it accepts text only and interprets sequences as text, but VFP will send font commands to the driver if you use them, and it should translate them into proper PostScript code.

Ever had a day where you just lost your mind? That would be me. *smile* I have been so intent on using existing code and doing things the "hard way" that I totally forgot about the FONT and STYLE clauses. Those work when sent to the PostScript driver! Those play by the standard driver rules and tell it how to make the output! Now, the only problem is that using those clauses means I will have to have to further genericize my @..SAY commands. Whereas before I was hoping to get by with functions like:
@ 1,1 SAY BoldText("Here is bold text!)
I will now have to do something like:
DoSay(1,1,"Here is bold text!,"B")
where the entire SAY operation is made more abstract (wish it had been done that way in the forst place!) Luckily, I only have to visit SAY lines that do formatting -- straight text (still the bulk of the lines) prints fine on both PS and PCL.

Though, saving that work by buying a straight PCL to PDF layer does not seem that silly, even if it does cost a couple thousand dollars. *smile*

Thanks for lighting the dim bumb in my head! I feel like I at least have control over the issue again! *smile*

Thanks,
JoeK
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform