页面方向HTML [英] Page Orientation HTML

查看:60
本文介绍了页面方向HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于没有人能回答以下问题:


我有问题。我需要创建一个命令行应用程序/或windows

应用程序,它将获取2

参数,并将打印到默认打印机而不需要任何弹出窗口。

第一个参数是html文件名(位置)第二个是一个开关,它将告诉应用程序以横向或版本打印。基本上当我输入

(例如)PrintApp" c:\ printthis.html" \L它应该打印文件

printthis.html in landscape。我已经尝试了所有的东西,我有一些应用程序

会写,但有提示和其他人会写但但不会

正确打印html(因为我不是渲染它)。有没有人有任何线索?

我需要打开应用程序,打印然后关闭,用户不知道


有人可以指点我如何更改页面

在html页面上的方向,以便它可以在肖像或

风景中打印?

Since no one can answer the following question:

I have a issue. I need to create a command line application/or windows
application that will take 2
parameters and will print to the default printer without any popups. the
first parameter is the html file name(location) second is a switch that will
tell the app to print in landscape or protrait. Basicly I when I type in
(for example) PrintApp "c:\printthis.html" \L it should print the file
printthis.html in landscape. I have tried everything and I have some apps
that will write but with a prompt and others that will write but it will not
print the html correctly (because I am not rendering it). Does anyone have
any clues?
I need to open the app, Print then close without the user knowing


Can someone please point me in direction of how to change the page
orientation on a html page so it will print in either in portait or
landscape?

推荐答案

" Sean McKaharay" < SE ** @ classactweb.com>写道:
"Sean McKaharay" <se**@classactweb.com> wrote:
有人可以指点我如何改变html页面上的页面方向,以便它可以在portait或者landscape中打印?
Can someone please point me in direction of how
to change the page orientation on a html page so it
will print in either in portait or landscape?




打印方向不是文档的属性;这是打印机的

属性。


我想做类似的事情(打印出ActiveX网页

浏览器控制),也没有找到一种方法在C#中做到这一点。我会暂时改变默认打印机的设置,但是我还是b $ b不知道怎么做...请回发如果你发现了!


P.



Printing orientation is not a property of the document; it is a
property of the printer.

I want to do something similar (printing out of the ActiveX Web
browser control), and also haven''t found a way to do it in C#. I''d
settle for temporarily changing the default printer''s settings, but I
don''t know how to do that either... please post back if you find out!

P.


我可以帮你处理肖像/风景部分,或者至少点

你是正确的方向。


HTML没有页面方向的概念。 HTML是一种标记语言

围绕流动文本进行了调整。当您在

屏幕上的窗口中呈现HTML时,它只是将文本倒入窗口并让它包裹

无论它在哪里包装。 (这是过于简单化了:当然HTML有

表和其他允许你更多控制的结构。

但是,底线仍然是:肖像就HTML而言,风景是

外国概念。)


我打算告诉你,你必须告诉_page_

你要呈现HTML应该是肖像或

landscape,然后,在概念上,pour将HTML放到页面上,但是在查看.NET框架时,它可能是一个学术点。


框架为_creating_提供了很多类HTML,但没有什么

用于阅读和呈现HTML,我可以看到。您可能必须通过可调用的界面调用Internet Explorer来获得


(假设它有一个)然后看看你是否不能让IE渲染

页面并打印它们而不会出现在屏幕上。


我看不到使用.NET框架直接呈现HTML的方法。

I can help you with the portrait / landscape part, or at least point
you in the right direction.

HTML has no notion of "page orientation." HTML is a markup language
deisnged around flowing text. When you render HTML in a window on your
screen, it just pours the text into the window and lets it wrap
wherever it wraps. (This is an oversimplification: of course HTML has
tables and other constructs that allow you more control than this.
However, the bottom line still stands: "portrait" and "landscape" are
foreign concepts as far as HTML is concerned.)

I was going to tell you that you have to tell the _page_ on which
you''re going to render the HTML that it should be either portrait or
landscape, and then, conceptually, "pour" the HTML onto the page, but
in looking over the .NET framework, it may be an academic point.

The Framework provides lots of classes for _creating_ HTML, but nothing
for reading and rendering HTML, that I can see. You may have to have
your program call Internet Explorer through a callable interface
(assuming that it has one) and then see if you can''t get IE to render
the pages and print them without also showing up on the screen.

I can see no way of rendering HTML directly by using the .NET framework.


我有一个可以打开和打印html的应用程序,但我需要改变页面打印出来的方式

。所以基本上我需要打印页面8 1/2 X 11到11 X

8 1/2。


" Bruce Wood" <峰; br ******* @ canada.com>在消息中写道

news:11 ********************* @ f14g2000cwb.googlegro ups.com ...
I have the app that can open and print the html but I need to change the way
the page prints out. So basicly I need to print the page 8 1/2 X 11 to 11 X
8 1/2.

"Bruce Wood" <br*******@canada.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
我可以帮助你处理肖像/风景部分,或者至少指出你正确的方向。

HTML没有页面方向的概念。 HTML是一种围绕流动文本的标记语言。当您在
屏幕上的窗口中呈现HTML时,它只是将文本倒入窗口,并将其包裹在任何包装的地方。 (这是过于简单化了:当然HTML有表格和其他结构可以让你更多地控制它。
然而,底线仍然是:肖像和风景是
关于HTML的外国概念。)

我要告诉你,你必须告诉_page_你要在哪个HTML上呈现它应该是肖像或
风景,然后,从概念上讲,倾倒。将HTML放到页面上,但是在查看.NET框架时,它可能是一个学术点。

框架为_creating_ HTML提供了很多类,但没有什么
用于阅读和呈现HTML,我可以看到。您可能必须通过可调用的界面调用您的程序来调用Internet Explorer(假设它有一个),然后看看您是否无法通过IE来呈现页面并打印它们没有出现在屏幕上。

我看不到使用.NET框架直接呈现HTML的方法。
I can help you with the portrait / landscape part, or at least point
you in the right direction.

HTML has no notion of "page orientation." HTML is a markup language
deisnged around flowing text. When you render HTML in a window on your
screen, it just pours the text into the window and lets it wrap
wherever it wraps. (This is an oversimplification: of course HTML has
tables and other constructs that allow you more control than this.
However, the bottom line still stands: "portrait" and "landscape" are
foreign concepts as far as HTML is concerned.)

I was going to tell you that you have to tell the _page_ on which
you''re going to render the HTML that it should be either portrait or
landscape, and then, conceptually, "pour" the HTML onto the page, but
in looking over the .NET framework, it may be an academic point.

The Framework provides lots of classes for _creating_ HTML, but nothing
for reading and rendering HTML, that I can see. You may have to have
your program call Internet Explorer through a callable interface
(assuming that it has one) and then see if you can''t get IE to render
the pages and print them without also showing up on the screen.

I can see no way of rendering HTML directly by using the .NET framework.



这篇关于页面方向HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆