Introduction

Spindle Document Distribution, and Spindle Professional before it, can process documents generated by a number of applications, such as MS Office, Sage 50, Sage 200, MS Dynamics NAV, Crystal Reports etc. However one common format. PDF has always been susceptible to differences in the construction of the PDF, the application printing the PDF and even the version of the application.

Further, as ERP applications increasingly move to web browser user interfaces, documents printed from the web browser's own print function cannot be processed, instead documents can be downloaded in PDF format.

To make the processing of PDF documents more robust, Draycir released the PDF to Spindle module with version 8.4

Applies to

Spindle Document Management v8.4 and above

Spindle Document Distribution v8.4 and above

Method

Following new install of, or upgrade to v8.4 or later, you will find a new utility installed to 

"C:\Program Files (x86)\Draycir\Spindle Document Distribution\PDF to Spindle\PDFtoSpindle.exe" 

(For Spindle Document Distribution Standalone)

or 

"C:\Program Files (x86)\Draycir\Spindle Document Management\Spindle Document Distribution Client\PDF to Spindle\PDFtoSpindle.exe" 

(For Spindle Document Distribution as part of Spindle Document Management)



Launch this utility to configure PDF processing. It can be used in two ways:

1) Manually selecting PDF files to process from its user interface:


2) Monitor a nominated folder and process any PDF files stored in there. You can configure this using the menu item Monitoring>Directory Configuration

Once Enable Monitoring is selected, any PDF files or ZIP files that contain PDFs will be automatically processed, You can close this window and the folder will continue to be monitored. This folder is specific to the user it was configured for. If this is a shared environment such as an RDS/Azure AD this path would need to be different for each user, as in the event multiple users have the same PDF To Spindle monitored folder, Spindle Document Distribution would trigger for every user, processing the document multiple times. Please ensure that each individual user in the shared environment has their own folder for PDF To Spindle.

Underlying process

When configuring PDF to Spindle on a Terminal server of similar multi-user environment, care needs to be taken to avoid issues. Understanding the process that PDF to Spindle uses will help.

The steps that happen in this process are as follows:

  • The Spindle Document Distribution Monitor is launched (either by a key in the Windows Registry or in response to a print being sent to one of the Spindle Document Distribution printers)


  • The Monitor checks to see if it needs to launch PDF to Spindle, by checking the value of: Enable P2S Autostart in the registry under: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Draycir\Spindle Document Distribution\Generic\Configuration - This is a per machine setting. You will see this in the SpindleDocDistributionMonitor_USERNAME.log file:


  • When PDF to Spindle launches, it checks the file C:\Users\[USERNAME]\AppData\Local\Draycir\Spindle Document Distribution\PDF to Spindle\8.0.0.0\user.config to see if it should be monitoring a folder and if so, which one (and how often). This file is updated from the PDF to Spindle tools window. This is a per user setting


  • Any file saved to the monitor folder will be sent to Spindle Document Distribution and processed as if it had been printed to it from eg Adobe Reader.

If the document is missing a matching CFG command, the Spindle Document Distribution window will be displayed, 

otherwise the document will be processed as per the rules set in Document Automation. 

Warning

Be aware that if 

a) your document does not match CFG commands with Spindle Document Distribution Tools, 
AND 
b) you cancel the Spindle Document Distribution window, 

Your source PDF document will be deleted. If it was on a local drive, you will find it in the Recycling Bin, if on a network drive it will have been permanently deleted. The only way to recover it would be to re-create the document from the ERP system. 


To prevent this either choose a method for distribution that will work (if you intended to use Spindle Document Distribution to generate an ad-hoc PDF document, using form backdrops, T&Cs etc, for example), or else have an archiving operation configured in Spindle Document Distribution Tools that does not remove the commands and archives into a safe location (ie not the PDF to Spindle monitored folder) and requires no Spindle Document Distribution commands from the document.

Create the Archive

Specify a destination folder and filename. Below I have used Spindle Document Distribution's internal fields to name the file with a date/time stamp:

Ensure that the commands are not removed so that the document may be processed successfully once any issues of mismatched document types is resolved.

Create the Safe archive operation

No Split variable:

Distribution only via Archive, and disable user warning:

Select the archive created previously:

To use this Operation, if you see the Spindle Document Distribution window:

Select "SafeArchive" from the Document Type Configuration drop-down.


Important Note

Please be aware that the input PDF documents are deleted on processing via PDF to Spindle, if you require these files, please ensure they are saved elsewhere to preserve them.

Knowledge Base Article Details

Related ProductSpindle Professional, Spindle Document Distribution
Ref NumberKBA-01-02-032
Document Date04/06/2019
Original AuthorVince Hodgson
Document Versionv1.5
Last updated 07/09/2022
Update Author Matthew Perry