A. 电脑打印的文字怎么旋转
方法一:.在“文件”的选项下,选择“打印”,在弹出的窗口中选择“属性”,然后就可以在“属性”的“基本”按钮下选择文件的打印效果选择“横向”,就可以达到旋转90°的效果 。
方法二:在“文件”的选项下,选择“页面设置”,在弹出窗口的“页边距”下选择“方向”,进行更改,选择“横向”,也可以达到旋转90°的效果
B. 如何:更改字处理文档的打印方向
本文包含一个演示此任务的示例 SetPrintOrientation 方法。必须安装 才能使用本主题中的示例代码。必须在项目中明确引用以下程序集:WindowsBaseDocumentFormat.OpenXml(由 Open XML SDK 安装)还必须使用以下 using 指令或 Imports 语句编译本主题中的代码。 C# using�0�2System.Linq; using�0�2DocumentFormat.OpenXml; using�0�2DocumentFormat.OpenXml.Packaging; using�0�2DocumentFormat.OpenXml.Wordprocessing; Visual Basic Imports�0�2DocumentFormat.OpenXml Imports�0�2DocumentFormat.OpenXml.Packaging Imports�0�2DocumentFormat.OpenXml. 方法可以使用 SetPrintOrientation 方法更改字处理文档的打印方向。该方法接受两个参数,分别指示要修改的文档的名称(字符串)和新打印方向 (PageOrientationValues)。以下代码显示 SetPrintOrientation 方法。 C# publicstaticvoid SetPrintOrientation( string fileName, PageOrientationValues newOrientation) Visual Basic PublicSub SetPrintOrientation( ByVal fileName AsString, ByVal newOrientation As PageOrientationValues)对于文档中的每个部分,如果新的方向与该部分当前的打印方向不同,则该代码将修改该部分的打印方向。此外,该代码必须手动更新每个部分的宽度、高度和边距。调用示例 SetPrintOrientation 方法若要调用示例 SetPrintOrientation 方法,请传递包含要转换的文件的名称的字符串。以下代码显示示例方法调用。 C# SetPrintOrientation(@"C:\Users\Public\Documents\ChangePrintOrientation.docx", PageOrientationValues.Landscape); Visual Basic SetPrintOrientation("C:\Users\Public\Documents\ChangePrintOrientation.docx", PageOrientationValues.Landscape)代码的工作方式以下代码先使用 Open 方法打开文档,并将 isEditable 参数设置为 true,以指示应读/写该文档。该代码将保留一个布尔变量来跟踪文档是否已更改(以便在稍后出现此情况时能够保存文档)。该代码将检索对主文档部分的引用,然后使用该引用检索文档内容中类型为 SectionProperties 的所有后代的集合。稍后,代码将使用此集合轮流为每个部分设置方向。 C# using (var document = WordprocessingDocument.Open(fileName, true)) { bool documentChanged = false; var docPart = document.MainDocumentPart; var sections = docPart.Document.Descendants(); // Code removed here... } Visual Basic Using document = WordprocessingDocument.Open(fileName, True) Dim documentChanged AsBoolean = FalseDim docPart = document.MainDocumentPart Dim sections = docPart.Document.Descendants(Of SectionProperties)() ' Code removed here... End Using循环访问所有部分下一个代码块将循环访问 SectionProperties 元素集合的所有部分。对于每个部分,该代码都将初始化一个用于跟踪该部分的页面方向是否已更改的变量,以便代码能够更新页面大小和边距。(如果新方向与原始方向匹配,则该代码不更新页面。)该代码将继续检索对 PageSize 元素的第一个 SectionProperties 后代的引用。如果此引用不为空,则该代码将根据需要更新方向。 C# foreach (SectionProperties sectPr in sections) { bool pageOrientationChanged = false; PageSize pgSz = sectPr.Descendants().FirstOrDefault(); if (pgSz != null) { // Code removed here... } } Visual Basic ForEach sectPr As SectionProperties In sections Dim pageOrientationChanged AsBoolean = FalseDim pgSz As PageSize = sectPr.Descendants(Of PageSize).FirstOrDefault If pgSz IsNot NothingThen ' Code removed here... EndIfNext设置部分的方向下一代码块先检查 PageSize 元素的 Orient 属性是否存在。与 Open XML 元素的许多属性 (Property) 一样,该属性 (Property) 或属性 (Attribute) 可能并不存在。在这种情况下,检索该属性的操作将返回空引用。默认情况下,如果该属性不存在,并且新方向为纵向,则该代码将不会更新该页面。如果 Orient 属性已存在,并且其值与作为参数提供给方法的新方向值不同,则该代码将设置 Orient 属性的 Value 属性,并设置 pageOrientationChanged 和documentChanged 标志。(该代码使用 pageOrientationChanged 标志确定它是否必须更新页面大小和边距。它使用 documentChanged 标志确定是否必须在最后保存文档。) 注释如果该代码必须创建 Orient 属性,则它还必须创建要在该属性中作为新的 EnumValue) 实例存储的值,并在 EnumValue 构造函数中提供新方向。 C# if (pgSz.Orient == null) { if (newOrientation != PageOrientationValues.Portrait) { pageOrientationChanged = true; documentChanged = true; pgSz.Orient = new EnumValue(newOrientation); } } else { if (pgSz.Orient.Value != newOrientation) { pgSz.Orient.Value = newOrientation; pageOrientationChanged = true; documentChanged = true; } } Visual Basic If pgSz.Orient IsNothingThenIf newOrientation PageOrientationValues.Portrait Then pageOrientationChanged = True documentChanged = True pgSz.Orient = New EnumValue(Of PageOrientationValues)(newOrientation) EndIfElseIf pgSz.Orient.Value newOrientation Then pgSz.Orient.Value = newOrientation pageOrientationChanged = True documentChanged = TrueEndIfEndIf更新页面大小此时,在代码中,页面方向可能已更改。如果出现此情况,则代码必须再完成两个任务:它必须更新页面大小,并且必须更新该部分的页边距。第一个任务非常简单 - 以下代码将交换页面高度和宽度,并将值存储到 PageSize 元素中。 C# if (pageOrientationChanged) { // Changing the orientation is not enough. You must also // change the page size. var width = pgSz.Width; var height = pgSz.Height; pgSz.Width = height; pgSz.Height = width; // Code removed here... } Visual Basic If pageOrientationChanged Then ' Changing the orientation isnot enough. You must also ' change the page size. Dim width = pgSz.Width Dim height = pgSz.Height pgSz.Width = height pgSz.Height = width ' Code removed here... EndIf更新边距本示例过程中的下一个步骤是处理该部分的边距。如果页面方向已更改,则该代码必须旋转边距以进行匹配。为此,该代码将检索对该部分的 PageMargin 元素的引用。如果该元素存在,该代码将旋转这些边距。请注意,该代码会将边距旋转 90 度 - 而一些打印机会将边距旋转 270 度,并且您可以修改代码来说明这一点。另请注意,PageMargin 对象的 Top 和Bottom 属性为有符号值,而 Left 和Right 属性为无符号值。当该代码旋转边距设置时,它必须在这两类值之间转换,如下面的代码所示。 Create it now. Otherwise, just // set its value. Assume that the default orientation // is Portrait.if (pgSz.Orient == null) { // Need to create the attribute. You do not need to // create the Orient property if the property does not // already exist, and you are setting it to Portrait. // That is the default value.if (newOrientation != PageOrientationValues.Portrait) { pageOrientationChanged = true; documentChanged = true; pgSz.Orient = new EnumValue(newOrientation); } } else { // The Orient property exists, but its value// is different than the new value.if (pgSz.Orient.Value != newOrientation) { pgSz.Orient.Value = newOrientation; pageOrientationChanged = true; documentChanged = true; } } if (pageOrientationChanged) { // Changing the orientation is not enough. You must also // change the page size. var width = pgSz.Width; var height = pgSz.Height; pgSz.Width = height; pgSz.Height = width; PageMargin pgMar = sectPr.Descendants().FirstOrDefault(); if (pgMar != null) { // Rotate margins. Printer settings control how far you // rotate when switching to landscape mode. Not having those// settings, this code rotates 90 degrees. You could easily// modify this behavior, or make it a parameter for the // procere. var top = pgMar.Top.Value; var bottom = pgMar.Bottom.Value; var left = pgMar.Left.Value; var right = pgMar.Right.Value; pgMar.Top = new Int32Value((int)left); pgMar.Bottom = new Int32Value((int)right); pgMar.Left = new UInt32Value((uint)System.Math.Max(0, bottom)); pgMar.Right = new UInt32Value((uint)System.Math.Max(0, top)); } } } } if (documentChanged) { docPart.Document.Save(); } } } } } Visual Basic ' Given a document name, set the print orientation for ' all the sections of the document. PublicSub SetPrintOrientation( ByVal fileName AsString, ByVal newOrientation As PageOrientationValues) Using document = WordprocessingDocument.Open(fileName, True) Dim documentChanged AsBoolean = FalseDim docPart = document.MainDocumentPart Dim sections = docPart.Document.Descendants(Of SectionProperties)() ForEach sectPr As SectionProperties In sections Dim pageOrientationChanged AsBoolean = FalseDim pgSz As PageSize = sectPr.Descendants(Of PageSize).FirstOrDefault If pgSz IsNot NothingThen ' No Orient property?
C. Word文档怎么将字体和数字变换方向
Word文档将字体和数字变换方向的方法如下:
如图所示,打开Word文档,切换至“页面布局”选项卡,单击“文字方向”按钮,展开下拉列表,单击不同列表项(包括“水平”、“垂直”和“将文字符旋转270°”),设置不同的文字方向,结果如下图所示。
D. 怎样把打印的文字横着打
用WORD将文字横着打的方法如下:
1、打开需要横向打印的wold文档。
E. 如何设置WORD中的字体方向
操作方法如下:
1、打开 办公软件 Word ,选择文字右键;
F. 在word纵向打印中怎样改变一个字的方向
如果想让该字向左转比较简单:选中该字,在字体框的字体名称前面加一个@回车,该字就向左转了。
如果要向右、向下可插入艺术字,在艺术字格式中设置旋转90°或者180°
G. 使用Word如何让字体加大,变方向(横向)
本文以win7系统word2016为例进行演示,具体步骤如下所示。
1、输入需要编辑的文字,选中后选择字体大小,这里可选择的最大值为72。
H. 怎么把字体改成这个方向打印出来
打开word ————选字————按鼠标右键————文字方向
I. 如何设置文字打印方向,不是在WORD文档里面
打开word文档,点击word上面菜单栏的“页面布局”,“文字方向”,在下拉菜单中点击“垂直”。
J. 打印名字牌,文字方向怎么调
1:打开需要打印的文档,点击“文件”→“打印(P)”→“打印”,不要选择快速打印。快速打印都是默认值打印,不会弹出打印参数调试窗口;2:在弹出的“打印”设置对话框中,点击“属性(P)”一栏,对打印机进行参数设置;3:切换选项卡至“页设置”,在页面方向中可以选择“纵向”和“横向”,打印机默认是纵向,我们使用最多的也是纵向打印,这里我们更改为“横向”,点击“确认”退出;4:这时点击打印,打印效果就是横向的了。