Git Product home page Git Product logo

printmage's Introduction

PrintMage

PrintMage is a print distribution solution. Print jobs can be distributed to several printers depending on the document content. Also the number of copies can be changed.

PrintMage leverages the free to use PDF24 Creator and the pdf to text tool of Xpdf tools. The printer driver of PDF24 is used to create a pdf-document, then the document is analysed and processed and finally printed on configured printers.

The software is licensed under GPL v3. Use the software at your own risk without any warranties. The author is not responsible for any issues, data losses or errors.

Quick installation guide

  • Download and install PDF24 Creator
  • Download PrintMage-Release.zip and extract to a folder, e.g. c:\printmage
  • Change settings in PDF24 (C:\Program Files (x86)\PDF24\pdf24-Settings.exe)
    • Set PDF Printer -> PDF Printer Tool -> "Automatically save documents after printed"
    • Set PDF Printer -> Auto Save -> "Execute the following command after Saving.
      Enter: wscript.exe "C:\printmage\start.vbs" "${file}" "${fileName}"
  • Adjust PrintMage configuration to your needs (c:\printmage\configuration.xml). If you want to print a number of copies unconditionally on certain printers just leave the RegEx fields empty.

Usage

Just use the PDF24 printer driver from your application. Tested with PDF24 Creator 9.0.1 and Xpdf 4.02. Picture Print

PrintMage configuration

Edit the file configuration.xml: Picture Config

ConditionOnlyOnFirstPage

Defines whether the text content analysis is performed only on the first page of the document or if is performed on the whole document. Often the decision can already be made with the content of the first page. Set to 0 to analyse whole document.

DeleteOriginalPdf

Defines whether the original pdf document created by the pdf24 driver is deleted after printing. To keep the pdfs for example for archiving purposes, set the value to 0.

DeleteTemporaryFiles

Defines whether temporary created files are deleted after printing. Usually should be set to 1. Set it to 0 for diagnose and troubleshooting.

PathPDF24

The path to the PDF24 installation directory. Change if PDF24 was not installed to the default directory.

DefaultPrinterName

If no print condition applies, the print job is executed on the printer with the default printer name.

PrintConditions

Define the print conditions. Each conditions including the printer on which to print (PrinterName), the number of printouts (Copies) and a name for the condition (Name). The condition itself is defined with two regular expressions. Both expressions need to evaluate to true to perform the printing. An empty condition, for example IncludeRegEx="", always evaluates to true. So to always print and only define the number of printouts, set IncludeRegEx and ExcludeRegEx to "".

PDF24 configuration

Picture settings

  • Change settings in PDF24 (C:\Program Files (x86)\PDF24\pdf24-Settings.exe)
    • Set PDF Printer -> PDF Printer Tool -> "Automatically save documents after printed"
    • Set PDF Printer -> Auto Save -> "Execute the following command after Saving.
      Enter: wscript.exe "C:\printmage\start.vbs" "${file}" "${fileName}"

Troubleshooting:

  • You need at least Windows 7 SP1
  • Content based print distribution is only possible if the document contains font based text. If the print-document consists only of rendered images, no text extraction is possible.
  • Use at least powershell version 3. Check version: powershell -Command "$PSVersionTable.PSVersion.Major". Download version 5.1.
  • Check log.txt
  • Set DeleteTemporaryFiles to 0 and examine files.

printmage's People

Contributors

koseng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.