Print PDF file Silently - c#

What I Want : A folder where every time thousands of PDF comes. I want to print that file using C#.
What will be the best option for me
Create a service
Create a windows application
I want that my service or windows application print the file silently means no popup to select the user to select the printer default it will print every page only once and I want to make this application, which will not be dependent on AcroRd32.exe because several users are not using Acrobat reader on their system.
I have already look these posts:
print pdf silently in c#,
Send multiple pdf files from one folder to printer. ASPOSE.PDF. C#
How can I complete this?

Related

How do I display a PDF Named Destination in Windows Server 2012 or 2016 in default Edge Browser from a .net C# app?

Language: C# .net
I have tried the Adobe method which requires Adobe Reader. Even it does not work well - I want to open the file to a destination, then change the destination as the user clicks on a Context Help icon. I do NOT want multiple new windows to clutter the screen.
I am trying to open a PDF to a named destination using the default PDF reader in Windows 2012 Server. (and same in windows server 2016). I don't want to force users to install Adobe PDF Reader. I want to use the default browser-based reader on a standard install.
WHen I use the Adobe method, if I use the n flag, I get a new window every time - annoying. If I don't use the n flag, I can open ONE window; all subsequent calls to change the topic are ignored.
Open the Windows Setting, click the Apps, select the Default Apps option and choose the "Choose default apps by file type", then find the .pdf file name and choose the Microsoft Edge as default apps to view the file. like this.
Then, using the following code to open the pdf file using Edge browser:
Process.Start("file path. such as: 'file:///C:/Users/XXX/Downloads/pdf.pdf'");
From your description, it seems that the pdf file is located on the remote server, I think you could download to local folder first, then using the above code to display the PDF file.

Print PDF file without opening print dialog in asp.net

I want to print my PDF file without opening Print dialog in ASP.NET Web forms.
My requirement is I have some PDF files on my server and I want to print that file on button click but without opening the Print window.
How can I achieve this?
The best you can do is concatenate the PDF files into one file and then print it, showing the printer dialog once at the beginning of the process. .NET PDF libraries that have this functionality.
PdfDocument.Combine("Output.pdf", "doc1.pdf", "doc2.pdf", "doc3.pdf");
Please refer this documentation may help you Print without Dialog

Printing pdfs including AcroJS in C#

I searched houres about, how I can print a pdf silently from C# including AcroJs.
I know there are solutions for it, like starting AdobeReader as Process by CommandLine and Print the document. (http://www.codeproject.com/Tips/598424/How-to-Silently-Print-PDFs-using-Adobe-Reader-and)
But this solutions always open the Reader. Even if you can hide the window,depending on the speed of your computer, you can see the adobe reader window a few seconds. I need a workaround which doesn't open the reader but process the AcroJS forms in pdf jut like the normal reader.
Do you konw any alternatives oder libs, that I can use?
How do I print PDFs silently with procesing AcroJS and wthout open the Adobe Reader process in c#?
Thanks :)
Your application need to be built using the Adobe Reader OCX or some PDF library. Then, the application needs to be configured to use a default printer. It can then be issued commands to print documents without showing a window.

Emulate a printer in pc

I have made an desktop application using C# to make ID card .And i am required to add functionality of printing an ID card .Basically i just make an image in a win form which will be eventually printed using.
But as i have no printer,i can't test my code to see if it prints something.
Is there any emulator or software that emulates a printer in windows,so that i cant test my application?
This is a sample what i need to print.It wiil be in a win form.
And another thing. How can i maintain size of the id card while printing. Say id card size should be in 2inch * 3.5inch. How can i make sure it will print same size?
You can use the Microsoft XPS printer driver that ships with Windows (since Vista, but available for Windows XP)
The XPS Document Writer allows you to create .xps files using any
program that you can print from in Windows. Print to the XPS Document
Writer when you want to create, send, and share or publish documents
that you do not want other people to modify, or when you want to print
a document or display it online exactly as it appears on your screen.
It's also a good idea to create an XPS document for files that contain
graphics or illustrations that might otherwise display differently in
print than online or on computers with different monitors.
Once you click OK, you're prompted for the file path to save it to.
Try print to PDF file to check that Your application works. For example You can use "PDF Creator" under Windows OS's. It is the easiest way.

Send directly to printer with reporting services

I have this Reporting Services repository with some reports that accept Parameters via URL.
I want my application to send these reports directly to printer (User's Default Printer), without even opening them. Is it Possible? How?
We use a bit of software called batch print pro, it will monitor a folder for a pdf dropping in, then print it out. We just schedule the reports to save to a pdf, monitor the folder with batch print pro and then this prints them out. Seems to work well

Categories