how to use printer control codes/ landscape printing in JS or CSS

LINUS

New Member
[6:21:30 PM] Arvind Thakur: Hi All,


From last couple of months I am trying to set printer orientation to landscape using javascript or css but haven't got success.I have tried so many things
like @ page { size: landscape; } or writing-mode:tb-rl; in css but nothing works for me.

Recently I found printer command language concept in which we can pass the escape sequence like ~&l1O is used for landscape.I also tried following simple stuff in
progress which is working.


OUTPUT TO "e:\test.txt".

define var comp-beg as char format "x(30)".

comp-beg = "~033&k2G~033&l1O~033&l5.45C~033&k2S".

put control comp-beg.

display "test" .

OUTPUT CLOSE.



But I don't know how to use these printer control codes in HTML, bcoz in my application we are using HTML, Javascript and CSS to do all front end stuff and i want to use this
in HTML.

Otherwise it will be good if any one knows how to do this in Javascript or CSS. Currently we are using IE9 browser for our web application.


Thanks & regards,

Arvind Thakur
 

sdjensen

Member
I don't think you can do this in HTML/CSS.

My best suggestion would be to output the data to PDF and then print the PDF.
 

CyrixInstead

New Member
What sdjensen said.

I would use PDFInclude, which will allow you to easily create PDF files in Progress. It is available on the OpenEdge Hive here. If you need some information on how to send a PDf down the web stream, see this thread here at ProgressTalk.

~Cyrix
 
Top