Download the PHP package arajcany/pre-press-tricks without Composer

On this page you can find all versions of the php package arajcany/pre-press-tricks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pre-press-tricks

PrePress Tricks Library

Box of Tricks for common PrePress related tasks.

Table of Contents

Purpose

If you have ever asked any of the following question, this collection of Classes might be for you.

Pages Class

Boxes Class

Ticketing Classes

Installation

The recommended method of installation is via Composer.

Version compatibility

Basic Usage - XPIF Ticket Maker

Example 1 - Base Ticket

$string contains the following XML

Example 2 - Base Ticket Supported Properties

The XPIF Specification supports almost 650 properties inside the ticket. You can control standard properties such as ' copies' to exotic properties such as 'rgb-monochrome-grayline-mapping'. I have selected a handful of the most commonly used properties and created concrete methods around setting those properties. For settings rarely used properties, see Example 3.

Example 3 - Setting Additional Properties

For setting properties that do not have a concrete methods, you can use the generic set setProperty() method.

Example 4 - Issues With Setting Additional Properties

The setProperty() may or may not work for a given property. This is because the code uses some smarts to try and figure out the attributes of the property in question. This is done via the published xpif.dtd files (which I auto convert to JSON format for easy reading).

Consider the following XPIF ticket

Issue 1 - Ambiguous Properties
If you try to set a 'lower-bound' property as follows, $ticket->setProperty('lower-bound', 1) are you setting it for:
/xpif/job-template-attributes/finishings-col/finishings-media-sheets-min-max/lower-bound or
/xpif/job-template-attributes/page-ranges/value/lower-bound?

Solution
Use dot-notation to explicitly define the path. Notice the dot-notation in the first argument:
$ticket->setProperty('finishings-media-sheets-min-max.lower-bound', 1)
This clearly defines which 'lower-bound' to use in the xpif.dtd file.

You could go all out and use the full xPath in dot-notation format
$ticket->setProperty('xpif.job-template-attributes.finishings-col.finishings-media-sheets-min-max.lower-bound', 1)
but it is rarely more than necessary to define the parent and grand-parent.

Issue 2 - Undefined Children of 'Value'
For whatever reason, the Xerox xpif.dtd files do not publish what the valid child nodes of 'value' are. Looking at the example XPIF above :
/xpif/job-template-attributes/finishings/value contains text values 28, 93 and 92.
/xpif/job-template-attributes/page-ranges/value contains child nodes of 'lower-bound' and 'upper-bound'.
This is super confusing as literally 'value' can contain anything, it is not defined in the xpif.dtd.

Solution
Unfortunately, you just have to know the XPIF structure post 'value' of the following properties:

I have coded in some tricks that you can use:

Example 5 - Handling Media and Media Collection

Depending on the RIP you use, you can either use Media or Media Collection:

Media Use this when your RIP has a defined media catalogue and you know the name of that media in the catalogue.

Media Collection Use this when your RIP does not have a defined media catalogue and you need to set the properties of the stock.

Media Collections are awesome because you can clone/modify/reuse them:

To see how to reuse Media Collections refer to Example 6.

Example 6 - Other Collections

In addition to the Media Collection the following collections are also available:

Example 7 - Using Collections In Your XPIF Tickets (the kitchen sink)

In case you got lost in Example 6 about Media Collections, here is a visual on where Media Collections can sit inside an XPIF Ticket:

From the representation above, you can probably see why I said Collections are awesome:

So here is a Collections kitchen sink example, I imagine that this will cover about 90% of what you need to do with xpif ticketing. This kitchen sink example is based on the historical fiction "For The Term of His Natural Life" by Marcus Clarke (public domain). You can download a copy of this classic novel here https://adc.library.usyd.edu.au/data-2/p00023.pdf

The PDF has the following properties:

I want the xpif to print the PDF as follows:


All versions of pre-press-tricks with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-json Version *
ext-dom Version *
ext-soap Version *
ext-gd Version *
ext-exif Version *
cakephp/core Version >=5.0
cakephp/i18n Version >=5.0
intervention/image Version ^2.7
league/mime-type-detection Version ^1.11
tecnickcom/tc-lib-pdf Version ^8.0
arajcany/tool-box Version ^2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arajcany/pre-press-tricks contains the following files

Loading the files please wait ....