diff --git a/How-to/Silent-print-PDF-in-dotnet-framework/App.config b/How-to/Silent-print-PDF-in-dotnet-framework/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/How-to/Silent-print-PDF-in-dotnet-framework/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/How-to/Silent-print-PDF-in-dotnet-framework/Data/F# Succinctly.pdf b/How-to/Silent-print-PDF-in-dotnet-framework/Data/F# Succinctly.pdf new file mode 100644 index 0000000..8773442 Binary files /dev/null and b/How-to/Silent-print-PDF-in-dotnet-framework/Data/F# Succinctly.pdf differ diff --git a/How-to/Silent-print-PDF-in-dotnet-framework/Program.cs b/How-to/Silent-print-PDF-in-dotnet-framework/Program.cs new file mode 100644 index 0000000..129a401 --- /dev/null +++ b/How-to/Silent-print-PDF-in-dotnet-framework/Program.cs @@ -0,0 +1,22 @@ +using System; +using Syncfusion.Pdf.Parsing; +using Syncfusion.Windows.Forms.PdfViewer; + +namespace SilentPrintPDF +{ + internal class Program + { + static void Main(string[] args) + { + //Load the PDF document + PdfLoadedDocument ldoc = new PdfLoadedDocument(@"../../Data/F# Succinctly.pdf"); + PdfViewerControl viewer = new PdfViewerControl(); + //Load the PDFLoadedDocument in PDF viewer control + viewer.Load(ldoc); + Console.WriteLine("Printing started..."); + //Silent printing the PDF document using the PDF viewer control + viewer.Print(false); + Console.WriteLine("Printing is done…"); + } + } +} diff --git a/How-to/Silent-print-PDF-in-dotnet-framework/Properties/AssemblyInfo.cs b/How-to/Silent-print-PDF-in-dotnet-framework/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ce49d0a --- /dev/null +++ b/How-to/Silent-print-PDF-in-dotnet-framework/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +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: AssemblyDescription("")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[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("e5c818ce-47ab-45ec-855e-ab8966b3d963")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// diff --git a/How-to/Silent-print-PDF-in-dotnet-framework/SilentPrintPDF.csproj b/How-to/Silent-print-PDF-in-dotnet-framework/SilentPrintPDF.csproj new file mode 100644 index 0000000..8c4c678 --- /dev/null +++ b/How-to/Silent-print-PDF-in-dotnet-framework/SilentPrintPDF.csproj @@ -0,0 +1,58 @@ + + + + + Debug + AnyCPU + {E5C818CE-47AB-45EC-855E-AB8966B3D963} + Exe + SilentPrintPDF + SilentPrintPDF + v4.8 + 512 + true + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/How-to/Silent-print-PDF-in-dotnet-framework/SilentPrintPDF.sln b/How-to/Silent-print-PDF-in-dotnet-framework/SilentPrintPDF.sln new file mode 100644 index 0000000..9384c3e --- /dev/null +++ b/How-to/Silent-print-PDF-in-dotnet-framework/SilentPrintPDF.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35707.178 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilentPrintPDF", "SilentPrintPDF.csproj", "{E5C818CE-47AB-45EC-855E-AB8966B3D963}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E5C818CE-47AB-45EC-855E-AB8966B3D963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5C818CE-47AB-45EC-855E-AB8966B3D963}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5C818CE-47AB-45EC-855E-AB8966B3D963}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5C818CE-47AB-45EC-855E-AB8966B3D963}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal