How to configure remote printer with azure BLOB to save the documents.

Sharma Kamal Kumar 6 Reputation points
2024-07-11T16:43:20.5666667+00:00

Hi,

I want to configure a remote printer to save the .pdf to store in Azure Blob Storage.

I am not able to understand how to perform this task.

Best Regards

Kamal

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2024-07-11T17:09:50.54+00:00

    You can't. The only thing that "generates PDFs" is the PDF writer which is a print driver. That driver can only talk to the file system. Azure Blobs are not a file system nor do they integrate with Explorer such that this would work.

    Personally I would say you may want to look into Azure File Share instead. It is designed to expose a file share that you can treat like a normal file system and yet the files are stored in Azure. This scenario was sort of what it was designed for.

    If that isn't an option then you have to create a custom solution. The first option would be to save the files to a local cache directory. Then have a separate process (perhaps scheduled) that copies files from the local cache to Azure. What that process looks like would be up to you and your skillset. You could use Powershell if you want a scripting approach or a more traditional program written in Java, C#, etc. The process would need to run periodically but that could be handled by using Task Scheduler.

    The other, more complex, option is to create your own virtual print driver that prints the PDF and then uploads it to blob storage. This is a lot more work but makes it easier to use this solution on multiple machines. Note that the driver would need to be signed in newer OS versions and that is an extra layer of complexity.

    All this predicates that you are wanting to store the PDFs in some well-defined location, the user printing the PDF isn't relevant and that security isn't a problem. If any of those are concerns then that is going to add more work to your solution.

    0 comments No comments

  2. Nehruji R 8,181 Reputation points Microsoft External Staff Moderator
    2024-07-15T06:15:00.1533333+00:00

    Hello Sharma Kamal Kumar,

    Greetings! Welcome to Microsoft Q&A Platform.

    I understand that you would like to configure a remote printer to save PDFs directly to Azure Blob Storage.

    • In your storage account, create a container to store all the files.
    • Install a PDF Printer Driver and ensure your remote printer can save documents as PDFs. You might need to install a PDF printer driver like PDFCreator or similar.
    • Set the Output Directory and configure the PDF printer to save files to a specific directory on your local machine or server.

    As suggested above, I would recommend using Azure file share here which will sync your files directly to your cloud storage. Azure Files offers fully managed file shares in the cloud that are accessible via the industry-standard Server Message Block (SMB) protocol and the Network File System (NFS) protocol. You can mount Azure file shares concurrently on cloud or on-premises deployments of Windows, Linux, and macOS. You also can cache Azure file shares on Windows Server machines by using Azure File Sync for fast access close to where the data is used.

    And if you still like to use Blob storage then, create a Script (e.g., in PowerShell or Python) to upload files from the output directory to Azure Blob Storage.

    Use Task Scheduler (Windows) or Cron Jobs (Linux) to run the script at regular intervals, ensuring new PDFs are uploaded automatically.

    Printers have several configurable properties, each of which are described in detail on the following article.

    refer - https://learn.microsoft.com/en-us/troubleshoot/windows-server/printing/printing-overview, https://help.syncfusion.com/file-formats/pdf/save-pdf-files/to-azure-blob-storage

    Hope this answer helps! please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    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.