Solved

RTF - printer control?

Posted on 2006-06-18
13
426 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:talon121a
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
  • +1
13 Comments
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 16931244
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?
0
 

Author Comment

by:talon121a
ID: 16931248
Well, Im tryin to force a print using RTF.

like force a printer feed or print page..

0
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 16931328
\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'.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 11

Expert Comment

by:pratap_r
ID: 16932319
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
0
 
LVL 2

Expert Comment

by:Naishal
ID: 16932385
How about creating .ps files?
0
 

Author Comment

by:talon121a
ID: 16932530
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)

0
 
LVL 11

Expert Comment

by:pratap_r
ID: 16932572
try \’0C for a form feed
0
 

Author Comment

by:talon121a
ID: 16932641
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?

0
 
LVL 11

Expert Comment

by:pratap_r
ID: 16932653
what happens when you print the file?
0
 

Author Comment

by:talon121a
ID: 16932669
well, particularly im tryin to print or activate the printer when a user 'visits' the document... (using an rtf display).
0
 
LVL 11

Accepted Solution

by:
pratap_r earned 195 total points
ID: 16932676
ah, well no, thats not possible. That would be a security violation if it did that. Some parsers may implement this (none that I know of though), but then you'll have to write the parser yourself. I'd suggest to look for alternate methods.

Have Fun!
Pratap
0
 

Author Comment

by:talon121a
ID: 16932722
Thank you for your efforts.

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

0
 
LVL 11

Expert Comment

by:pratap_r
ID: 16932725
thanks :)

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

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question