Applying shapes

The "Create and apply shapes" Fixup consists of two configuration sections. First, one or more shapes need to be defined under "Create shapes", next an action has to be defined under "Apply shapes" that determines how to make use of these shapes.

This article describes the configuration of the "Apply shapes" section.

"Apply shapes" parameters

  1. The popup menu under "Shape usage" determines what action to apply to to the shapes created in the "Create shapes" section.
  2. Depending on the selected "Shape usage", different sets of parameters become available under "Parameter"
  3. The "+" (plus) button to the right makes it possible to define more than one action on the defined shapes. The "-" (minus) button makes it possible to remove such an action. It is only enabled if there are at least two actions in the list of "Apply shapes" actions. Since pdfToolbox 14 it is also possible to duplicate the respective set of configured parameters with the “Duplicate setting” button.

The following steps describe both the "Shape usage" options and the parameters that come with each these options.

"Apply shape": List of settings

"Apply shape": List of settings

This screenshot lists the currently available"Shape usage" options.

Filling shapes in front or behind existing page content

Filling shapes in front or behind existing page content

Important note:
The description below applies in the exact same fashion to filled shapes created behind current page content. The option to create a filled shape behind current page content will only work as expected in very few cases, as any current page content that is opaque will hide the filled shape created behind it. If for example the whole page has an opaque white background object, or any other opaque object that fills the whole page or most of it, the created filled shape will most probably not be visible at all.

 

The creation of a "Filled shape in front of current page content" means that the defined shape(s) will be inserted into each page as a path object. If the shape consists of severals part, it will be created as a path object with as many closed sub-paths. For this path object a fill will be applied as configured under "Parameters".

Filling shapes in front or behind existing page content – Fill parameters

Filling shapes in front or behind existing page content – Fill parameters
  1. Color model to be used for filling the path object; available models are CMYK, RGB, gray, and Lab. For CMYK, RGB and gray, values can be set to be provided in percent (0...100%) or as a number (0.0...1.0). Lab values must  always be provided as 0...100 for the L value, and -127...128 for the a and b values.
  2. Depending on the chosen color space, one, three or four values have to be provided
  3. If this check box is activated, the color used for the fill be create as a spot color, the color model will then be used as the alternate color space for the spot color, and the color values will determine the appearance of a 100% tint value of the spot color
  4. Name of the spot color (only enabled if checkbox "Create as spot color" is activated)
  5. Tint value to use for filling the path with the spot color (only enabled if checkbox "Create as spot color" is activated)
  6. If this checkbox is activated, the fill color will be set to overprint.
  7. Sets the opacity for the filled path object, i.e. the degree to which the path object will be transparent or not. A value of 100% means that the object is opaque (not transparent at all), and a value of 0% means the object is fully transparent (which implies that it will not be visible at all).
  8. Determines the rendering intent. This will only become relevant when a color conversion is applied at a later stage.
  9. Set the transparency blend mode. All 16 blend modes defined in the PDF imaging model are available.
  10. If not empty, determines that path object is created on a separate layer, named according to the value in this entry.

For shapes behind existing page content there is an additional option:

This allows for avoiding transparency interactions between the existing page content and the new shape behind.

Stroking shapes in front or behind existing page content

Stroking shapes in front or behind existing page content

Important note:
The description below applies in the exact same fashion to stroked shapes created behind current page content. The option to create a stroked shape behind current page content will only work as expected in very few cases, as any current page content that is opaque will hide the stroked shape created behind it. If for example the whole page has an opaque white background object, or any other opaque object that fills the whole page or most of it, the created stroked shape will most probably not be visible at all.

 

The creation of a "Stroked shape in front of current page content" means that the defined shape(s) will be inserted into each page as a path object. If the shape consists of severals part, it will be created as a path object with as many closed sub-paths. For this path object a stroke (also called contour or outline) will be applied as configured under "Parameters".

Stroking shapes in front or behind existing page content - Stroke parameters

Stroking shapes in front or behind existing page content - Stroke parameters
  1. Color model to be used for stroking the path object; available models are CMYK, RGB, gray, and Lab. For CMYK, RGB and gray, values can be set to be provided in percent (0...100%) or as a number (0.0...1.0). Lab values must  always be provided as 0...100 for the L value, and -127...128 for the a and b values.
  2. Depending on the chosen color space, one, three or four values have to be provided
  3. If this check box is activated, the color used for the stroke be create as a spot color, the color model will then be used as the alternate color space for the spot color, and the color values will determine the appearance of a 100% tint value of the spot color
  4. Name of the spot color (only enabled if checkbox "Create as spot color" is activated)
  5. Tint value to use for stroking the path with the spot color (only enabled if checkbox "Create as spot color" is activated)
  6. If this checkbox is activated, the stroke color will be set to overprint.
  7. Sets the opacity for the stroked path object, i.e. the degree to which the path object will be transparent or not. A value of 100% means that the object is opaque (not transparent at all), and a value of 0% means the object is fully transparent (which implies that it will not be visible at all).
  8. Sets the line width of the stroke in pt.
  9. Sets the line cap style for the stroke. This will only have an effect if the stroke is created as a dashed line (see parameter 11). In order to create a dotted line, a suitable line dash pattern needs to be defined, where the part of the dash being painted must have the same length as the line is wide, and the line style must be defined as "Round cap".
  10. Sets the line join style This will determine the shape of the line in the corners. Miter joins are ideal for orthogonal corners (e.g. in a rectangle), but can lead to very long pointed corners for corners that are of a sharp angle (this will often be perceived as strange artifacts). For sharp angles it is better to use Bevel join or Round join.
  11. Using PDF syntax for dashed lines, this makes it possible to create dashed or dotted lines in many variations. The syntax consists of a sequence of numbers inside one pair of square brackets. Each number determines the length of a line segment that is painted or that is a gap. The first number inside the pair of brackets always defines the length of a painted segment, the second number defines the length of a gap. The third number, defines the length of a painted segment, and so on. Once the sequence of numbers inside the square brackets have been used up the sequence will start again at the beginning. A simple example would be [3 2] which would lead to a line of painted segments three units long, and gaps between painetd segments of a length of two units. In order to create an evenly dotted line of 2pt width, use 2 pt for the width of the line, a painted segment length of 0 [sic!] and a gap of 4 units (i.e. a line dash parameter of "[0 4]"), and line cap style of "Round caps", The he line join style is irrelevant in this scenario
  12. Determines the rendering intent. This will only become relevant when a color conversion is applied at a later stage.
  13. Set the transparency blend mode. All 16 blend modes defined in the PDF imaging model are available.
  14. If not empty, determines that path object is created on a separate layer, named according to the value in this entry.

For shapes behind existing page content there is an additional option:

This allows for avoiding transparency interactions between the existing page content and the new shape behind.

Stroking and filling shapes at the same time in front or behind existing page content

Stroking and filling shapes at the same time in front or behind existing page content

Important note:
The description below applies in the exact same fashion to stroked and filled shapes created behind current page content. The option to create a stroked and filled shape behind current page content will only work as expected in very few cases, as any current page content that is opaque will hide the stroked and filled shape created behind it. If for example the whole page has an opaque white background object, or any other opaque object that fills the whole page or most of it, the created stroked and filled shape will most probably not be visible at all.

 

The creation of a "Stroked and filled shape in front of current page content" means that the defined shape(s) will be inserted into each page as a path object. If the shape consists of severals part, it will be created as a path object with as many closed sub-paths. For this path object a stroke (also called contour or outline) and a fill will be applied as configured under "Parameters". The color for the stroke and the fill can be configured to be different.

According to the PDF imaging model, the fill will always be painted first, followed by the stroke. This implies that the line is guaranteed to always be shown with its indicated line width, half of which will be rendered towards the inside of the path segments, overlaying the fill, with the other half of it being rendered outside of the path segments.

A specific use of this is to define both fill and stroke using the same color definition (preferably a spot color for this to work well), and to use a tint value of 100% for the fill and of 0% for the stroke. If both are set to overprint, hey will not affect any content underneath, and the resulting rendered path object will appear to be half of the line width smaller. This can be very useful for example for creating a white background that is slightly smaller than the shape from which it is generated.

Stroking and filling shapes at the same time in front or behind existing page content - Stroke and fill parameters

Stroking and filling shapes at the same time in front or behind existing page content - Stroke and fill parameters
  1. Color model to be used for filling the path object; available models are CMYK, RGB, gray, and Lab. For CMYK, RGB and gray, values can be set to be provided in percent (0...100%) or as a number (0.0...1.0). Lab values must  always be provided as 0...100 for the L value, and -127...128 for the a and b values.
  2. Depending on the chosen color space, one, three or four values have to be provided
  3. If this check box is activated, the color used for the fill be create as a spot color, the color model will then be used as the alternate color space for the spot color, and the color values will determine the appearance of a 100% tint value of the spot color
  4. Name of the spot color (only enabled if checkbox "Create as spot color" is activated)
  5. Tint value to use for filling the path with the spot color (only enabled if checkbox "Create as spot color" is activated)
  6. If this checkbox is activated, the fill color will be set to overprint.
  7. Sets the opacity for the filled path object, i.e. the degree to which the path object's fill will be transparent or not. A value of 100% means that the object is opaque (not transparent at all), and a value of 0% means the object is fully transparent (which implies that it will not be visible at all).
  8. Color model to be used for stroking the path object; available models are CMYK, RGB, gray, and Lab. For CMYK, RGB and gray, values can be set to be provided in percent (0...100%) or as a number (0.0...1.0). Lab values must  always be provided as 0...100 for the L value, and -127...128 for the a and b values.
  9. Depending on the chosen color space, one, three or four values have to be provided
  10. If this check box is activated, the color used for the stroke be created as a spot color, the color model will then be used as the alternate color space for the spot color, and the color values will determine the appearance of a 100% tint value of the spot color
  11. Name of the spot color (only enabled if checkbox "Create as spot color" is activated)
  12. Tint value to use for stroking the path with the spot color (only enabled if checkbox "Create as spot color" is activated)
  13. If this checkbox is activated, the stroke color will be set to overprint.
  14. Sets the opacity for the stroked path object, i.e. the degree to which the path object's stroke will be transparent or not. A value of 100% means that the object's stroke is opaque (not transparent at all), and a value of 0% means the object's stroke is fully transparent (which implies that it will not be visible at all).
  15. Sets the line width of the stroke in pt.
  16. Sets the line cap style for the stroke. This will only have an effect if the stroke is created as a dashed line (see parameter 11). In order to create a dotted line, a suitable line dash pattern needs to be defined, where the part of the dash being painted must have the same length as the line is wide, and the line style must be defined as "Round cap".
  17. Sets the line join style This will determine the shape of the line in the corners. Miter joins are ideal for orthogonal corners (e.g. in a rectangle), but can lead to very long pointed corners for corners that are of a sharp angle (this will often be perceived as strange artifacts). For sharp angles it is better to use Bevel join or Round join.
  18. Using PDF syntax for dashed lines, this makes it possible to create dashed or dotted lines in many variations. The syntax consists of a sequence of numbers inside one pair of square brackets. Each number determines the length of a line segment that is painted or that is a gap. The first number inside the pair of brackets always defines the length of a painted segment, the second number defines the length of a gap. The third number, defines the length of a painted segment, and so on. Once the sequence of numbers inside the square brackets have been used up the sequence will start again at the beginning. A simple example would be [3 2] which would lead to a line of painted segments two units long, and gaps between painetd segments of a length of 2 units. In order to create an evenly dotted line of 2pt width, use 2 pt for the width of the line, a painted segment length of 0 [sic!] and a gap of 4 units (i.e. a line dash parameter of "[0 4]"), and line cap style of "Round caps", The he line join style is irrelevant in this scenario
  19. Determines the rendering intent. This will only become relevant when a color conversion is applied at a later stage.
  20. Set the transparency blend mode. All 16 blend modes defined in the PDF imaging model are available.
  21. If not empty, determines that path object is created on a separate layer, named according to the value in this entry.

For shapes behind existing page content there is an additional option:

This allows for avoiding transparency interactions between the existing page content and the new shape behind.

Use shape as clipping path for existing page content

Use shape as clipping path for existing page content

This "Shape usage' is a special one that simply uses the defined shape as a clipping path. Depending on whether the shape intent has defined as being "Render only inside shape" or "Render only outside shape" the clipping path will clip the page content inside the path object or the page content outside the path object.

There are no configurable parameters for this shape usage.