How can I get the path of a document that has been printed in Windows Server

Ricardo Mancebo Olivares 1 Reputation point
2022-03-23T10:56:30.197+00:00

Good morning,

I need to obtain information about the documents that are printed on my server, specifically, the path where the file is located.

Through event 307 of the PrintService/Operational, I can capture when a document is printed and know its name, but I would also need to know its path.

I don't know if this is possible in any way.

Thank you.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,216 questions
Windows Server Printing
Windows Server Printing
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Printing: Printer centralized deployment and management, scan and fax resources management, and document services
688 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,671 Reputation points
    2022-03-23T17:38:13+00:00

    Hello @Ricardo Mancebo Olivares

    if you have the enabled the Logging for Recently Printed Documents you should be able to just check the path for the document you are searching for. By default, your printed document history will be wiped after each document has finished printing. You can change this setting to enable you to see a list of your recently printed documents from the print queue for your printer. Just to remind you that you will need to change this setting for each printer you have installed.
    How to do so is to access your print queue, right-click the Windows Start menu button and select the “Settings” option. From here, click Devices > Printers & Scanners. Find your printer in the “Printers & Scanners” list, click on it, and then click “Open Queue” to open the print queue. Your printer queue with current and queued printed items will be listed. Documents you’ve previously printed will not be shown, which is why you’ll need to enable logging.

    So for one time check you can enable Printer History In the print queue window for your printer, click Printer > Properties. Alternatively, select your printer and click “Manage” in the “Printers & Scanners” settings menu. In your printer properties, click on the “Advanced” tab and then select the “Keep Printed Documents” checkbox. Click “OK” to save your settings. Once your document history is enabled, your documents will no longer disappear from your print queue after the printing process has completed.

    As the print queue will provide a short-term overview of your previously printed documents you might want to view a long-term list, you’ll need to use the Windows Event Viewer.

    To start, right-click your Windows Start menu button and click the “Event Viewer” option. The Event Viewer will allow you to view a list of previously printed files, but you’ll need to set Windows to begin logging your long-term printer history first.

    Enable Print History in Event Viewer
    In the Windows Event Viewer, click Applications and Services Logs > Microsoft > Windows in the “Event Viewer (Local)” menu on the left. This will reveal a significant number of Windows services. Scroll down to find the “PrintService” category.

    From here, right-click the “Operational” log and then click the “Properties” button. Click to enable the “Enable Logging” checkbox and then set a maximum size for the log. The larger the size, the longer Windows will record your printed document history. Click the “OK” button to save the setting. Windows will now automatically save the printer history for all of your installed printers to a log file that you can access within Event Viewer.

    Once your printer history is enabled, you can access it at any time from the Event Viewer. To do so, find and open the “PrintService” category and then click on the “Operational” log. A history of all Windows printer events will be listed, from initial printer spooling to completed or failed prints.

    Under the “Task Category” section, items listed as “Printing a Document” are documents that have been successfully printed. Failed prints will also appear in this category. To make it easier to sort, you can group your print log by categories, making it easy to separate the “Printing a Document” events into their own section. To do so, right-click the “Task Category” heading and then click the “Group Events by This Column” button.

    Hope this helps with your query!

    ---------
    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.

  2. Alan Morris 1,161 Reputation points
    2022-03-28T16:08:23.893+00:00

    @Ricardo Mancebo Olivares

    If the job is from the local disk of the client machine, Windows will only have a document name.

    When the job is printed from a shared folder, I have seen the full path but this is rather rare.

    What you are seeing is what Windows has for the doc name, this is by design.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.