Question


CIBC
CA
Last activity: 13 Aug 2019 12:56 EDT
print pdf document from web browser
Hi,
I have a requirement to print pdf document that is showed via the IE browser without the user interaction (no print pop up required).
the automation steps will be:
(1) bring up the browser with the pdf file url, it will show the document on the browser.
(2) print the document on the default printer without pop up printer window.
I'm planing use the browser.print method to implement this. but i got interrogation issue: the browser can not be matched.
Please show me some advises.
Thanks,
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
US
Focus on the pdf container and try sending control+p


CIBC
CA
Thanks for the reply. I did try this, the print pop-up window is coming up. The requirement is asking no print pop-up window. the document should be printed regardless.


Pegasystems Inc.
US
That level of automation/solution design requires Services oversight.


Morgan Stanley
US
Can you try hiding the pop-up window immediately it's shown and also trigger the print before hide?
-
Sanjoy Sarkar


Virtusa
AU
Hello Grona,
Can you please elaborate by sending control+p. Because in my case I'm able to open the pdf in a new widow but not able to print it.
Cheers


Infosys
IN
Use below C# code and pass print filepath as input
// To print without open print dialog
Process p = new Process( );
p.StartInfo = new ProcessStartInfo( )
{
CreateNoWindow = true,
Verb = "print",
FileName = filepath
};
p.Start( );


CIBC
CA
the Script works.
Two outstanding issues:
1) the pdf is sent to printer directly without the pop up window. but it also opened the adobe application. how to get rid of it?
2) the file path can not be the url format.
thanks very much for the helps.


Pegasystems Inc.
US
I have a requirement where I need to print a document from pega but this process needs to be totally automated. Can I use the printwork activity for this and how could I automate the process so the users doesn't have to actually click print?