Link to home
Start Free TrialLog in
Avatar of talon121a
talon121a

asked on

RTF - printer control?

Ok, so... Ive been experimenting with RTF specification, but unsure how to force the printer to do printer control codes using RTF.

\'0x1233 or something like that, anyone have ideas?? I really need to know this for an application im developing.

Thanks
Avatar of Kim Ryan
Kim Ryan
Flag of Australia image

This document indicates that you can insert characters such as cariage return by using \13, but they get treated as a paragraph mark.
http://www.biblioscape.com/rtf15_spec.htm#Heading46

Perhaps you could get by with \par, \page, \tab etc?
Avatar of talon121a
talon121a

ASKER

Well, Im tryin to force a print using RTF.

like force a printer feed or print page..

\page will insert a page break. When you print a document with \page in it, it should be interpetered by the printer as 'start a new page'.
the escape code is \’XX where XX is your hexadecimal code, 0x prefix is notrequired

btw, I think it only accepts 8bit hexa decimals, so you might have to give it as \’AE\’1F etc

Have Fun!
Pratap
How about creating .ps files?
Hmm I need to use the RTF code to actually start a print process... Is this possible, I tried \page but without luck...

I was thinking maybe an escape character or something perhaps a unicode or other escape sequence to actually initiate the printer...

I just need it to make some response from RTF output.. (either feed a piece of paper, print a line of text. etc)

try \’0C for a form feed
IVe tried the following without luck ( no response from a printer )

{\rtf\ansi\'1B\'0C\ \'01\'02\'03\'04\'05\'06\'07\'08\'09\'0A\'0B\'0C\'0D\'0E\'0F\'10\'11\'12\'13\'14\'15\'16\'17\'18\'19\'1A\'1B\'1C\'1D\'1E\'1F\'20\'7F\'1B\'80\'81\'82\'83\'84\'85\'86\'87\'88\'89\'8A\'8B\'8C\'8D\'8E\'8F\'90\'91\'92\'93\'94\'95\'96\'97\'98\'99\'9A\'9B\'9C\'9D\'9E\'9F; }

Did I miss any?

what happens when you print the file?
well, particularly im tryin to print or activate the printer when a user 'visits' the document... (using an rtf display).
ASKER CERTIFIED SOLUTION
Avatar of pratap_r
pratap_r
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your efforts.

I would love to at least award you points for trying ;-)

thanks :)

may be if you explain your requirements, I can help you better