Thus you could run the regular one and the the PDF-based one independently in any order - how's that for the idea? Regards, Ilya.
If I might jump in here I can't contribute anything new on this, except to say that I am dubious about changing the Windows default printer - even if you change it back as soon as you've finished with it.
Your application is not the only one on the computer, and it's not reasonable to expect the user to refrain from doing any other printing while you are creating the PDF.
I feel sure there must be other ways of adding a watermark to a PDF without necessarily adding it to the printed version. This is an intermittent problem in that it will work sometimes and then stop working again. This is one of those last minute items added to a job - you know the ones - that turns out to take as much time as the main job.
Just to add a watermark Oh well - You win some Thank you. ShellExecute does not wait for the executed application to finish, so you might have turned back to the original default printer, before Acrobat reader or whatever is configured for PDFs is printing. You could wait a bit, before resetting the default prinert, or you could also try cPArams indeed.
The way you'd Shellexecute Acrobat. Did it help, and what did? Another though: Instead of waiting "a bit", you could read print jobs for the printer and see, if your pdf document is in the queue before resetting default printer. Document API code. Bye, Olaf. Hi all. Olaf - your RUN command solution is great because it means that I don't have to change default printers at all.
Thank you, Olaf. That is bound to come up sooner or later. Kind regards Karen. I have a problem very similar to this post, and have used Olaf's suggestion for the code to try and solve it. It appears to solve my timing problem was using ShellExecute with one more problem. It opens Acrobat Reader, prints the file, closes the file, but leaves Acrobat Reader open. Can you help me past the goal? Otherwise you need to use soem API to kill the process, eg use SendMessage with the hWnd you use to quit the application.
It seems SendMessage hWnd, 0x10, 0, 0 shoudl do that. Well, I didn't tried. I just remembered Word called with "print" action would really just print and then quit again, as soon as the print job is done and the spooler is fed, but I may also be wrong about that. I am testing as we speak but what I have found to work is I want to: 1. Open a blank document or the first data sheet, doesn't really matter, perhaps even a header page 2.
Save as a new PDF. I could probably do this with SendKeys, but that would be a little inefficient and tedious to program. I am pretty sure that you can't do this from Excel.
Not even sure if you can combine pdfs with Acrobat. I have done it manually plenty of times. The call passes an array of PDF file names to be printed. See the code for the details. None of the examples I found online worked straight up, you can use the libraries that come with Adobe standard install, but there is no documentation on the functions, so there is a bit of trial and error with the parameters.
Learn how to Publish from a Fence Shape. Single Sheet This section shows how to publish a sheet that has a transient shape assigned to the sheet model. Click on the Color pull down menu and select Black and White. On the Create Print Definitions dialog box select Add. Make sure the sheets are in the correct order. To change the order use the sorting tools.
Draw a fence over the area you wish to publish to PDF. In the Print dialog box set the Scale , when you change the scale the PDF size will increase or decrease accordingly.
0コメント