public void CheckThatAllMethodsArePresent() { HtmlFixedSaveOptions htmlFixedSaveOptions = new HtmlFixedSaveOptions(); htmlFixedSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png); imageSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); pdfSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); PsSaveOptions psSaveOptions = new PsSaveOptions(); psSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); SvgSaveOptions svgSaveOptions = new SvgSaveOptions(); svgSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); XamlFixedSaveOptions xamlFixedSaveOptions = new XamlFixedSaveOptions(); xamlFixedSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); XpsSaveOptions xpsSaveOptions = new XpsSaveOptions(); xpsSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); }
public void UseBookFoldPrintingSettings(bool renderTextAsBookFold) { //ExStart //ExFor:PsSaveOptions //ExFor:PsSaveOptions.SaveFormat //ExFor:PsSaveOptions.UseBookFoldPrintingSettings //ExSummary:Shows how to save a document to the Postscript format in the form of a book fold. Document doc = new Document(MyDir + "Paragraphs.docx"); // Create a "PsSaveOptions" object that we can pass to the document's "Save" method // to modify how that method converts the document to PostScript. // Set the "UseBookFoldPrintingSettings" property to "true" to arrange the contents // in the output Postscript document in a way that helps us make a booklet out of it. // Set the "UseBookFoldPrintingSettings" property to "false" to save the document normally. PsSaveOptions saveOptions = new PsSaveOptions { SaveFormat = SaveFormat.Ps, UseBookFoldPrintingSettings = renderTextAsBookFold }; // If we are rendering the document as a booklet, we must set the "MultiplePages" // properties of the page setup objects of all sections to "MultiplePagesType.BookFoldPrinting". foreach (Section s in doc.Sections) { s.PageSetup.MultiplePages = MultiplePagesType.BookFoldPrinting; } // Once we print this document on both sides of the pages, we can fold all the pages down the middle at once, // and the contents will line up in a way that creates a booklet. doc.Save(ArtifactsDir + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions); //ExEnd }
public void UseBookFoldPrintingSettings() { //ExStart //ExFor:PsSaveOptions //ExFor:PsSaveOptions.SaveFormat //ExFor:PsSaveOptions.UseBookFoldPrintingSettings //ExSummary:Shows how to create a bookfold in the PostScript format. Document doc = new Document(MyDir + "Paragraphs.docx"); // Configure both page setup and PsSaveOptions to create a book fold foreach (Section s in doc.Sections) { s.PageSetup.MultiplePages = MultiplePagesType.BookFoldPrinting; } PsSaveOptions saveOptions = new PsSaveOptions { SaveFormat = SaveFormat.Ps, UseBookFoldPrintingSettings = true }; // Once we print this document, we can turn it into a booklet by stacking the pages // in the order they come out of the printer and then folding down the middle doc.Save(ArtifactsDir + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions); //ExEnd }
public void CheckThatAllMethodsArePresent() { HtmlFixedSaveOptions htmlFixedSaveOptions = new HtmlFixedSaveOptions(); htmlFixedSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png); imageSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); pdfSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); PsSaveOptions psSaveOptions = new PsSaveOptions(); psSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); SvgSaveOptions svgSaveOptions = new SvgSaveOptions(); svgSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); SwfSaveOptions swfSaveOptions = new SwfSaveOptions(); swfSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); XamlFixedSaveOptions xamlFixedSaveOptions = new XamlFixedSaveOptions(); xamlFixedSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); XpsSaveOptions xpsSaveOptions = new XpsSaveOptions(); xpsSaveOptions.PageSavingCallback = new CustomPageFileNamePageSavingCallback(); }