locked
pring pdf copies RRS feed

  • Question

  • User-146731933 posted

    Hello,

    i am looking for a way to print several copies of an existing pdf file in perferct quality.
    Now i use a loop an start a simple process, but thats not so nice.

    How do i set a copies Argument?

    Thanks a lot
    best regards
    Rene

    Wednesday, April 21, 2021 12:47 PM

Answers

  • User1535942433 posted

    Hi ReneMauritz76,

    System.Drawing.dll is a Windows DLL file and  belongs to software Microsoft .NET Framework.So you could use PrinterSettings.Copies Property.

    Do you have solve your problems?If you still have problems,you could post to us more details.And if you have solved,you could mark these answers which help you.

    https://www.file.net/process/system.drawing.dll.html

    Best regards

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 23, 2021 6:03 AM

All replies

  • User1535942433 posted

    Hi ReneMauritz76,

    How many pages of your pdf files? If only have one page,it's a good way to print multiple copies.

    pd.PrinterSettings.Copies = [numberofpages]

    More detail,you could refer to below articles:

    https://stackoverflow.com/questions/48686339/how-to-print-multiple-copies-in-c-sharp

    https://stackoverflow.com/questions/27109035/printersettings-does-not-take-the-number-of-copies

    Best regards,

    Yijing Sun

    Thursday, April 22, 2021 2:18 AM
  • User-146731933 posted

    Hi,

    thanks a lot, but i will Not use the printDialog Box. I send the Printer into the Programm.

    So i Need a Version Without the printdialog.

    Thanks a lot

    rm

    Thursday, April 22, 2021 5:06 AM
  • User1535942433 posted

    Hi ReneMauritz76,

    What's type of your project? ASP.Net C#?

    My solution means you only need System.Drawing.dll assembly. The package have the PrintDocument.PrinterSettings Property. And you could set the argument of the copies.

    More details,you could refer to below article:

    https://docs.microsoft.com/en-us/dotnet/api/system.drawing.printing.printdocument.printersettings?view=netframework-4.7.2

    Best regards,

    Yijing Sun

    Thursday, April 22, 2021 7:27 AM
  • User-146731933 posted

    Hi,

    i use c# for my project. Thanks will try it.

    best regards

    RM

    Thursday, April 22, 2021 9:05 AM
  • User1535942433 posted

    Hi ReneMauritz76,

    System.Drawing.dll is a Windows DLL file and  belongs to software Microsoft .NET Framework.So you could use PrinterSettings.Copies Property.

    Do you have solve your problems?If you still have problems,you could post to us more details.And if you have solved,you could mark these answers which help you.

    https://www.file.net/process/system.drawing.dll.html

    Best regards

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 23, 2021 6:03 AM
  • User-1599850035 posted

    Hi, you could add Spire.Pdf.dll as a reference in your program and specify the print copies using the following code snippet.

    using Spire.Pdf;
    
    namespace PrintPDF
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument document = new PdfDocument();
                //Load pdf file
                document.LoadFromFile("Sample.pdf");
                //Specify printer name
                document.PrintSettings.PrinterName = "NPI7FE2DF (HP Color LaserJet MFP M281fdw)";
                //Specify print range
                document.PrintSettings.SelectPageRange(1, 15);
                //Specify copies of every printed page
                document.PrintSettings.Copies = 2;
                //Execute print
                document.Print();
            }
        }
    }
    Monday, May 24, 2021 8:00 AM