×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Chr(27)+Chr(15) for condensed printing in FPD26

Chr(27)+Chr(15) for condensed printing in FPD26

Chr(27)+Chr(15) for condensed printing in FPD26

(OP)
Chr(27)+Chr(15) Used for condensed printing in FPD26

Printing condensed okay on Printer Cannon BJC-1000 with parallel port but now Cannon cartridge not available as well as printer obsolete

Anyone know the list of substitutes Printers supported Parallel port as well as Condensed printing in FPD26

Tried HP Laserjet 1320 but not supporting condensed printing in FPD26

RE: Chr(27)+Chr(15) for condensed printing in FPD26

Rather than looking for a compatible printer, it would make much more sense to stop using control codes and switch instead to using a Windows printer driver and Windows fonts.

Connect your Laserjet (or any other modern printer) to the USB port or a local network. Then install its printer driver. To get the effect of condensed print, either use a smaller print size, or select a condensed font. For example, if your normal font is Arial, then use Arial Narrow for the condensed print.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Chr(27)+Chr(15) for condensed printing in FPD26

Sure, if the whole report text should be condensed, that's also simple in a normal FRX report.

I also second Mike for the long run. For whatever details your report has, you can surely solve your reporting with FRXes. Many people never did any other reporting.

I can imagine using control codes on some printer directly doesn't only allow to switch to condensed for a whole report, you can switch between all kinds of different font styles at any time, in the middle of a sentence, etc.

When it comes to variety of printing in font styles not only per report control, but within a passage of text, then you may automate Word and print the doc(x) resulting from that. Create HTML and automate a browser to print that, use RTF and embed an RTF control in a VFP report to print that, etc.

Besides, I don't find it, but there is some extension to VFP reports supporting a set of some markup tags. Not many, and as far as I remember neither switching font type nor size, but that should in principle be extensible to also do that. Surely is based on report listener, which in detail allows you to render things via GDI+ with control over every pixel, in extreme.

Bye, Olaf.



RE: Chr(27)+Chr(15) for condensed printing in FPD26

If you really want to stay with control codes, you could use your Laserjet, but install the Windows Generic/Text Only printer driver. Then search on-line for the PCL5 Printer Language Manual. That will show you the HP codes, including the equivalent of the code for condensed print.

But I really don't recommend this solution, except as a short-term measure. Much better to use a modern printer driver and the appropriate fonts.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Chr(27)+Chr(15) for condensed printing in FPD26

Quote:

I think this is just a case of a misplaced thread

I am assuming that he has an old application, originally written for FPD, that is now running under VFP. If that's not the case, then you're right, Atlopes. It should be posted in the "old versions" forum.

But the solution would still be the same as in my previous post: download for the PCL5 Printer Language Manual, and use whichever codes are specified there for condensed print.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Chr(27)+Chr(15) for condensed printing in FPD26

Quote (Me)

download for the PCL5 Printer Language Manual, and use whichever codes are specified there for condensed print

To save you the trouble, I've just done that. The relative codes are specified on p. 136.

To turn on condensed print:

<esc>(s4S

To turn off condensed print:

<esc>(s0S

where <esc> stands for the escape character - CHR(27).

Actually, it's slightly more complicated than that, because you might need to consider the difference between the primary and the secondary font. The manual explains that in detail.

And, of course, this won't work if you are running your FPD app under Windows with a Windows printer driver. If that's the case, refer back to the earlier posts in this thread.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close