From 28d5af332bff7726e48a578ee8591b94f0d84c40 Mon Sep 17 00:00:00 2001 From: Vyacheslav Date: Sat, 1 Feb 2020 16:00:29 +0700 Subject: [PATCH] Added MultipagePrintDocument example --- .../MultipagePrintDocumentExample.sln | 25 +++ .../Data/TestFile.docx | Bin 0 -> 17642 bytes .../MultipagePrintDocument.cs | 149 ++++++++++++++++++ .../MultipagePrintDocumentExample.csproj | 83 ++++++++++ .../MultipagePrintDocumentExample/Program.cs | 58 +++++++ .../Properties/AssemblyInfo.cs | 36 +++++ .../packages.config | 4 + .../README.md | 2 + 8 files changed, 357 insertions(+) create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample.sln create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Data/TestFile.docx create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocument.cs create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocumentExample.csproj create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Program.cs create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Properties/AssemblyInfo.cs create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/packages.config create mode 100644 Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/README.md diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample.sln b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample.sln new file mode 100644 index 000000000..b0ad52dbf --- /dev/null +++ b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultipagePrintDocumentExample", "MultipagePrintDocumentExample\MultipagePrintDocumentExample.csproj", "{D3DA798D-215F-428D-83FF-7D39CEAC046A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D3DA798D-215F-428D-83FF-7D39CEAC046A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3DA798D-215F-428D-83FF-7D39CEAC046A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3DA798D-215F-428D-83FF-7D39CEAC046A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3DA798D-215F-428D-83FF-7D39CEAC046A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FCAD1746-9BA2-4A00-8032-F06955C7A37A} + EndGlobalSection +EndGlobal diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Data/TestFile.docx b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Data/TestFile.docx new file mode 100644 index 0000000000000000000000000000000000000000..0e1d4e656ef393c6f5d341144063c0870817fb31 GIT binary patch literal 17642 zcmeHvgL^K^vUi*nJ1e%G72CFL+jdrL+t!M0+qSb}+h6v%=iI%|zUTW3?w$9knd#~I zRnOZ`^;B1N)yPT!gCGNd0ek}h0Kf<=L%_z`(a73SN72pJ z$U%$7)yfht4+MxT2LR~n{{P$l7xzGY!kBp<9lX$E;K$FI#%1wVvcmq6yl5j#(-*)n zMrpx&{`~fj&OKK8LLz#`kwLtvb&siU^gm}-(<~tn8eE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MC)_-#Nw~6!L@&7(S y`V$QRz{&vt@IR(Ye~16O{`xC?nd>j`e`+&X3D7U`0sw&i`T>4P=p5f4rT+)C>07@5 literal 0 HcmV?d00001 diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocument.cs b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocument.cs new file mode 100644 index 000000000..6d2f836d5 --- /dev/null +++ b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocument.cs @@ -0,0 +1,149 @@ +using System; +using System.Drawing; +using System.Drawing.Printing; +using System.Drawing.Text; +using Aspose.Words; +using Aspose.Words.Rendering; + +namespace MultipagePrintDocumentExample +{ + internal class MultipagePrintDocument : PrintDocument + { + /// + /// Initializes a new instance of this class. + /// + /// The document to print. + /// The number of pages per one sheet. + /// The flag that indicates if the printed page borders are needed. + public MultipagePrintDocument(Document document, int pagesPerSheet, bool printPageBorder) + { + if (document == null) + throw new ArgumentNullException("document"); + + mDocument = document; + mPagesPerSheet = pagesPerSheet; + mPrintPageBorder = printPageBorder; + } + + /// + /// Called before the printing starts. Initializes the range of pages to be printed + /// according to the user selection. + /// + /// The event arguments. + protected override void OnBeginPrint(PrintEventArgs e) + { + base.OnBeginPrint(e); + + switch (PrinterSettings.PrintRange) + { + case PrintRange.AllPages: + mCurrentPage = 1; + mPageTo = mDocument.PageCount; + break; + case PrintRange.SomePages: + mCurrentPage = PrinterSettings.FromPage; + mPageTo = PrinterSettings.ToPage; + break; + default: + throw new InvalidOperationException("Unsupported print range."); + } + + // Store the page size, selected by user, taking into account the paper orientation. + if (PrinterSettings.DefaultPageSettings.Landscape) + mPaperSize = new Size(PrinterSettings.DefaultPageSettings.PaperSize.Height, + PrinterSettings.DefaultPageSettings.PaperSize.Width); + else + mPaperSize = new Size(PrinterSettings.DefaultPageSettings.PaperSize.Width, + PrinterSettings.DefaultPageSettings.PaperSize.Height); + + } + + private static Size GetThumbCount(int pagesPerSheet) + { + switch (pagesPerSheet) + { + case 16: return new Size(4, 4); + case 9: return new Size(3, 3); + case 8: return new Size(4, 2); + case 6: return new Size(3, 2); + case 4: return new Size(2, 2); + case 2: return new Size(2, 1); + default: return new Size(1, 1); + } + } + + /// + /// Called when each page is printed. This method actually renders the page to the graphics object. + /// + /// The event arguments. + protected override void OnPrintPage(PrintPageEventArgs e) + { + base.OnPrintPage(e); + + e.Graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; + + // This gives us how many thumbnails we print across and down. + Size thumbCount = GetThumbCount(mPagesPerSheet); + + // These are in "display" units (1/100 inch). + SizeF thumbSize = new SizeF((float)mPaperSize.Width / thumbCount.Width, (float)mPaperSize.Height / thumbCount.Height); + + mPageTo = (mPageTo + mPagesPerSheet < mPageTo) ? mPageTo + mPagesPerSheet : mPageTo; + + for (int pageIndex = mCurrentPage - 1; pageIndex < mPageTo; pageIndex++) + { + int dividend = pageIndex - (mCurrentPage - 1); + int rowIdx = dividend / thumbCount.Width; + int columnIdx = dividend % thumbCount.Width; + + // This renders the page in the appropriate location and size given in world coordinates (1/100 inch in our case). + float thumbLeft = columnIdx * thumbSize.Width; + float thumbTop = rowIdx * thumbSize.Height; + // The useful return value is the scale at which the page was rendered. + float scale = mDocument.RenderToSize(pageIndex, e.Graphics, thumbLeft, thumbTop, thumbSize.Width, thumbSize.Height); + + // This draws the page border (the page could be smaller than the thumbnail size). + if (mPrintPageBorder) + { + PageInfo pageInfo = mDocument.GetPageInfo(pageIndex); + // We know how much the page was scaled so we can draw the border around the scaled page now. + e.Graphics.DrawRectangle(Pens.Black, thumbLeft, thumbTop, WidthInHundredthsInch(pageInfo) * scale, HeightInHundredthsInch(pageInfo) * scale); + } + + // This draws a border around the thumbnail. + e.Graphics.DrawRectangle(Pens.Red, thumbLeft, thumbTop, thumbSize.Width, thumbSize.Height); + } + + mCurrentPage = mCurrentPage + mPagesPerSheet; + e.HasMorePages = (mCurrentPage <= mPageTo); + } + + /// + /// Returns the width of the page in hundredths of an inch. + /// + private int WidthInHundredthsInch(PageInfo pageInfo) + { + double widthInInches = pageInfo.WidthInPoints / PointsPerInch; + + return (int)Math.Round(widthInInches * 100); + } + + /// + /// Returns the height of the page in hundredths of an inch. + /// + private int HeightInHundredthsInch(PageInfo pageInfo) + { + double heightInInches = pageInfo.HeightInPoints / PointsPerInch; + + return (int)Math.Round(heightInInches * 100); + } + + public const double PointsPerInch = 72.0; + private readonly Document mDocument; + private readonly int mPagesPerSheet; + private readonly bool mPrintPageBorder; + private Size mPaperSize = Size.Empty; // Initialized for Java to work. + private int mCurrentPage; + private int mPageTo; + } +} \ No newline at end of file diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocumentExample.csproj b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocumentExample.csproj new file mode 100644 index 000000000..89bbc45ff --- /dev/null +++ b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/MultipagePrintDocumentExample.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {D3DA798D-215F-428D-83FF-7D39CEAC046A} + Exe + MultipagePrintDocumentExample + MultipagePrintDocumentExample + v3.5 + 512 + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + ..\packages\Aspose.Words.20.1.0\lib\net35-client\Aspose.Words.dll + + + + + + + + + + + + + Component + + + + + + + + + + False + .NET Framework 3.5 SP1 + true + + + + \ No newline at end of file diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Program.cs b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Program.cs new file mode 100644 index 000000000..9823ada1a --- /dev/null +++ b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Program.cs @@ -0,0 +1,58 @@ +using System; +using System.IO; +using System.Reflection; +using System.Windows.Forms; +using Aspose.Words; + +namespace MultipagePrintDocumentExample +{ + class Program + { + [STAThread] + static void Main(string[] args) + { + // Sample infrastructure. + string exeDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar; + string dataDir = new Uri(new Uri(exeDir), @"../../Data/").LocalPath; + + Document doc = new Document(dataDir + "TestFile.docx"); + + PrintDialog printDlg = new PrintDialog(); + // Initialize the print dialog with the number of pages in the document. + printDlg.AllowSomePages = true; + printDlg.PrinterSettings.MinimumPage = 1; + printDlg.PrinterSettings.MaximumPage = doc.PageCount; + printDlg.PrinterSettings.FromPage = 1; + printDlg.PrinterSettings.ToPage = doc.PageCount; + + // Pass the printer settings from the print dialog to the print document. + MultipagePrintDocument awPrintDoc = new MultipagePrintDocument(doc, 4, true); + awPrintDoc.PrinterSettings = printDlg.PrinterSettings; + + // Initialize the print preview dialog. + PrintPreviewDialog previewDlg = new PrintPreviewDialog(); + + // Pass the Aspose.Words print document to the print preview dialog. + previewDlg.Document = awPrintDoc; + + // Specify additional parameters of the Print Preview dialog. + previewDlg.ShowInTaskbar = true; + previewDlg.MinimizeBox = true; + previewDlg.PrintPreviewControl.Zoom = 1; + previewDlg.Document.DocumentName = doc.OriginalFileName; + previewDlg.WindowState = FormWindowState.Maximized; + + // Occur whenever the print preview dialog is first displayed. + previewDlg.Shown += PreviewDlg_Shown; + + // Show the appropriately configured Print Preview dialog. + previewDlg.ShowDialog(); + } + + private static void PreviewDlg_Shown(object sender, EventArgs e) + { + // Bring the print preview dialog on top when it is initially displayed. + ((PrintPreviewDialog)sender).Activate(); + } + } +} diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Properties/AssemblyInfo.cs b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..0aa1f3628 --- /dev/null +++ b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MultipagePrintDocumentExample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MultipagePrintDocumentExample")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d3da798d-215f-428d-83ff-7d39ceac046a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/packages.config b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/packages.config new file mode 100644 index 000000000..6538f7fe9 --- /dev/null +++ b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/MultipagePrintDocumentExample/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/README.md b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/README.md new file mode 100644 index 000000000..d6118d89d --- /dev/null +++ b/Showcases/Multipage_Print_Document_by_Aspose_Words_for_NET/README.md @@ -0,0 +1,2 @@ +# Multipage Print Document by Aspose.Words for .NET 1.2 +The MultipagePrintDocument class provides the ability to print several pages on one sheet of paper. \ No newline at end of file