/// <summary> /// 打印 /// </summary> /// <param name="printName"></param> /// <returns></returns> public bool printByAspos(string printName) { //生成打印对象 PrintHelper printDemo = new PrintHelper(); //保存默认打印机 defaultPrintName = DefaultPrinter(); //设定使用的打印机 printDemo.setPrint(printName); Aspose.Words.Document document = new Aspose.Words.Document(printFilePath); //foreach (Aspose.Words.Section section in document) //{ // section.PageSetup.Orientation = Orientation.Landscape; // section.PageSetup.TextColumns.SetCount(2); // section.PageSetup.TextColumns.EvenlySpaced = true; // section.PageSetup.TextColumns.LineBetween = true; //} document.Print(); //删除文件 existsFile(printFilePath.ToString()); return(true); }
public void PrintToNamedPrinter() { //ExStart //ExFor:Document.Print(String) //ExSummary:Prints the whole document to a specified printer. Aspose.Words.Document doc = new Aspose.Words.Document(MyDir + "Document.doc"); doc.Print("KONICA MINOLTA magicolor 2400W"); //ExEnd }
public void Print() { //ExStart //ExFor:Document.Print //ExSummary:Prints the whole document to the default printer. Aspose.Words.Document doc = new Aspose.Words.Document(MyDir + "Document.doc"); doc.Print(); //ExEnd }
public void PrintRangeWithDocumentName() { //ExStart //ExFor:Document.Print(PrinterSettings, String) //ExSummary:Prints a range of pages along with the name of the document. Aspose.Words.Document doc = new Aspose.Words.Document(MyDir + "Rendering.doc"); PrinterSettings printerSettings = new PrinterSettings(); // Page numbers in the .NET printing framework are 1-based. printerSettings.FromPage = 1; printerSettings.ToPage = 3; doc.Print(printerSettings, "My Print Document.doc"); //ExEnd }
public void PrintToNamedPrinter() { //ExStart //ExFor:Document.Print(String) //ExSummary:Prints the whole document to a specified printer. Aspose.Words.Document doc = new Aspose.Words.Document(ExDir + "Document.doc"); doc.Print("KONICA MINOLTA magicolor 2400W"); //ExEnd }
public void PrintRangeWithDocumentName() { //ExStart //ExFor:Document.Print(PrinterSettings, String) //ExSummary:Prints a range of pages along with the name of the document. Aspose.Words.Document doc = new Aspose.Words.Document(ExDir + "Rendering.doc"); PrinterSettings printerSettings = new PrinterSettings(); // Page numbers in the .NET printing framework are 1-based. printerSettings.FromPage = 1; printerSettings.ToPage = 3; doc.Print(printerSettings, "My Print Document.doc"); //ExEnd }
public void Print() { //ExStart //ExFor:Document.Print //ExSummary:Prints the whole document to the default printer. Aspose.Words.Document doc = new Aspose.Words.Document(ExDir + "Document.doc"); doc.Print(); //ExEnd }
public void PrintRange() { //ExStart //ExFor:Document.Print(PrinterSettings) //ExSummary:Prints a range of pages. Aspose.Words.Document doc = new Aspose.Words.Document(MyDir + "Rendering.doc"); PrinterSettings printerSettings = new PrinterSettings(); // Page numbers in the .NET printing framework are 1-based. printerSettings.FromPage = 1; printerSettings.ToPage = 3; doc.Print(printerSettings); //ExEnd }