Export (0) Print
Expand All

Automating Commercial Printing Prepress Tasks in Publisher 2003, Part 1

Office 2003
 

Andrew May
Microsoft Corporation

February 2004

Applies to:
    Microsoft® Office Publisher 2003

Summary: Define the color mode and inks used in a publications, and control print output using the Publisher 2003 object model. Programmatically print publications as separations, including customizing the print output of each plate. This is part one of a three part series.(18 printed pages)

Contents

Introduction
Inks and Plates
Printing Plates
Setting Additional Advanced Printing Options
Where to Find It in the User Interface
Advanced Print Options Object Model
Conclusion

Introduction

This is the first of three articles meant to supplement the Publisher 2003 Prepress Reference Guide, and discuss how to use the Microsoft® Office Publisher 2003 object model to accomplish prepress tasks. This article discusses setting a publication's color mode, and printing separations. For more information about these tasks, including how to accomplish them using the user interface in Microsoft Office Publisher 2003, see Chapter 5: Changing Color Models, and Chapter 9: Printing of the Publisher 2003 Prepress Reference.

Note   For more information about the Publisher commercial printing functionality, including technical issues, troubleshooting, and workarounds, see the Publisher 2003 Prepress Reference. For more information about Publisher in general, see Publisher on Office Online.

Publisher gives you more flexibility and control over the print output of your Publisher files than ever before. In Publisher 2003, the print output you choose is independent of the color mode you specify for the publication. This enables you to choose any of the following print output options, without any changes being made to the file you're printing:

  • Composite grayscale
  • Composite CMYK
  • Composite RGB
  • Separations

For example, even if you create a file as an RGB publication, you can print it as a composite grayscale publication, and you are not required to make any changes to the file's color information. When you specify a print output different from the publication color mode, Publisher does the following when printing the publication:

  • Makes a copy of the publication, and converts that copy to the color mode you specified for print output
  • Prints based on the copied, converted publication
  • Destroys the copied, converted publication without saving it

Publication Color Modes

Color mode refers to the system used to define all colors in a publication. Publisher has five color modes:

  • Desktop: Three colors (red, green, and blue). This color mode is used to display images on a computer monitor.
  • BW (single color): One user-defined spot color ink, usually black. Sometimes referred to as grayscale.
  • Spot color: Up to 12 user-defined spot color inks.
  • Process color: Four process color inks (cyan, magenta, yellow, and black) comprise this model.
  • Spot and process color: Four process color inks (cyan, magenta, yellow, and black), plus up to 12 user-defined spot color inks.

By default, Publisher creates publications using the desktop color mode, in which all colors are defined in the RGB color mode. You can change the color mode to any of the four other color models, either through the Publisher user interface, or through using the EnterColorMode method of the Document object.

You can print the last four color modes (single color, spot color, process color, and spot and process color) as separations. In these color modes, each defined color is printed using a separate ink on a separate printing plate.

Separations

The print output you choose does not affect the original color information in your publication. However, if you choose to print separations, the plates available for you to print are based on color information in the publication, specifically:

  • The color mode you defined for the publication
  • The inks you defined for the publication

This article discusses how to use the Publisher object model to control the print output of a publication programmatically, focusing on how to print separations for a publication. In the article, we review:

  • How the color mode you specify for a publication determines the inks you can define in that publication.
  • How to define inks in your publication.
  • How to print your publication as separations (regardless of the color mode you define), including how to choose which plates to print.
  • How to set additional advanced print options, such as printer's marks and graphics resolution.

Inks and Plates

In Publisher you can programmatically print separations regardless of the color mode specified for a publication. This is possible because in the object model, the defined inks in your publication are represented by one collection, while the plates to be printed are represented by a separate collection. The plates to be printed are based on, but independent of, the inks you define in the publication.

The two separate collections allows you to alter the plates you print without having those changes effect the colors and inks in your publication. You can even print process color plates from spot color publications without having to alter the inks you define in the publication.

To define inks for your publication, use the Plates collection. Each Plate object represents a single defined ink for your publication.

Once you define your inks, use the PrintablePlates collection to print plates. Each PrintablePlate object represents a plate that you can print.

Publisher creates the Plates collection when you specify a color mode for you publication. The color mode chosen determines which inks to include as Plate objects by default, and what spot inks (if any) you can add.

Publisher creates the PrintablePlates collection when you set the publication to print as separations. By default, the PrintablePlates collection begins with a PrintablePlate object for each Plate object in the Plates collection. However, you can select printing options that change the number and type of PrintablePlates, and whether they all actually print. None of these changes effect the Plates collection.

Creating a Plates Collection

To define inks for your publication, you must first specify the publication's color mode. Color mode determines which types of ink you can define for the publication.

Use the EnterColorMode method of the Document object to specify the publication's color mode. When you execute this method, Publisher automatically creates a Plates collection for the publication, if one does not already exist.

Changing Color Mode in a New Publication

For blank publications, Publisher also creates default plates that must be present in the collection according to the color mode specified.

For example, if you specify process color as a blank publication's color mode, Publisher creates the Plates collection, and four Plate objects that represent the C, M, Y, and K inks. If you specify BW, Publisher creates the Plates collection and a single Plate object that represents the single spot color ink available in that color mode. (By default, this Plate object represents Black spot ink; you can change this ink color programmatically.)

The following code example creates a publication. It then sets the publication color mode to spot and process, which automatically creates the Plates collection and Plate objects for the four process inks. The code then adds two spot inks to the publication.

Sub CreateSpotAndProcessPublication()
Dim AppPub As Application
Dim DocPub As Document

Set AppPub = New Publisher.Application
Set DocPub = AppPub.NewDocument
AppPub.ActiveWindow.Visible = True

With DocPub
'specify spot and process as the publication color mode
'creates the Plates collection
'creates default process plates (C, M, Y and K)
.EnterColorMode (pbColorModeSpotAndProcess)
    'creates 2 spot color plates, and sets ink color for each
    With .Plates
        .Add
        .FindPlateByInkName(pbInkNameSpot1).Color.RGB = RGB(167, 156, 87)
        .Add
        .FindPlateByInkName(pbInkNameSpot2).Color.RGB = RGB(235, 19, 117)
    End With
End With
    
End Sub

Changing Color Mode for an Existing Publication

When you change the color mode of a publication that contains content, Publisher converts the colors and inks present in the publication so they correspond to the new color mode, if necessary. Publisher automatically creates any Plate objects that must be in the collection according to the new color mode, if those plates are not already present. Plate objects representing inks not permitted with the new color mode are deleted. Any Plate objects representing inks permitted with the new color mode remain unchanged.

The following table lists the possible values for a publication's color mode, and the Plate objects automatically created or destroyed when each is specified for a publication with content.

Table 1. ColorMode and default Plate objects created or destroyed

ColorMode
property value
Description Plates automatically created or destroyed Plates allowed
pbColorModeDesktop RGB No plates created; all destroyed none
pbColorModeSpot Spot inks 1 spot ink plate created*or retained; CMYK ink plates destroyed 1 to 12 spot inks
pbColorModeBW 1 spot ink, usually black 1 spot ink plate created* or retained;
all other plates destroyed
1 spot ink
pbColorModeProcess CMYK inks 4 process ink plates created or retained;
any spot ink plates destroyed
4 process
(C, Y, M, and K)
pbColorModeSpotAndProcess CMYK and spot inks 4 process ink plates created or retained;
no plates destroyed
4 process
(C, Y, M, and K), and 0 to 12 spot inks
Note   If you create a spot color plate, its color is the same as the color of the darkest object (that is, the object color with the lowest luminosity) in the publication. If there are no objects in the publication, the color of the created plate is black.

For example, if a publication's current color mode is desktop (RGB) and you change it to BW (single-color) color mode for a publication, Publisher does the following:

  • Creates the Plates collection, if not already present.
  • Creates a Plate object representing the single spot ink.
  • Deletes any other Plate objects.
  • Converts all colors present in the publication to tints of that single ink.

If a publication's current color mode is spot color, and you change it to the process color mode, Publisher does the following:

  • Creates the four process color Plates objects (C, M, Y and K).
  • Deletes all the spot ink Plate objects.
  • Converts the spot colors present in the publication to equivalent CMYK values.

If a publication's current color mode is spot color, and you change it to spot and process color mode, Publisher does the following:

  • Creates the four process color Plates objects (C, M, Y and K).
  • Retains all the spot ink Plate objects unchanged.
  • Converts no spot colors present in the publication.
Note   Once you change a publication's color mode, changing it back later to the original color mode does not restore the original Plates collection.

For example, suppose you have a publication with a spot color mode, and five spot inks defined in its Plates collection. If you change the color mode to process, the publication now has the four process inks defined in the Plates collection (all spot colors convert to equivalent CMYK values). If you later change the color mode back to spot color, the resulting Plates collection probably does not regain the original five spot inks with which the publication started.

Deleting Excess Inks

You can print a maximum of 12 spot inks for a publication. When you change a publication's color mode from process to spot color, Publisher defines each process color as a spot ink, that is, a Plate object. Because of this, changing the color mode of your publication could result in more than 12 spot inks defined for your publication.

Use the DeleteExcessInks parameter of the EnterColorMode method to ensure the publication has 12 or fewer Plate objects. If you set DeleteExcessInks as True, when you execute the EnterColorMode method Publisher performs the following functions:

  • Converts process colors to spot inks, up to a maximum of twelve spot inks for a publication.
  • Converts any additional process colors in the publication to tints of the first spot ink.

Process Inks

Some additional points about process inks and Plate objects to remember:

  • You cannot change the color properties of the Plate objects that represent process (CMYK) inks.
  • For spot and process color mode, the process plates are always the first four Plate objects in the Plates collection.

Defining Additional Spot Ink Plates for Your Publication

For the spot, and spot and process color modes, you can define additional spot inks. You define an ink by adding a Plate object to the Plates collection and setting its properties. Use the Add method of the Plates collection to add Plates that represent spot inks. You can use the PlateColor parameter of that method to specify the properties of the ink.

You cannot add Plate objects to publications whose color mode is desktop, bw, or process. Desktop color mode is an RGB-based color mode that does not have inks. BW is a single spot ink color mode, and Publisher creates the single Plate object automatically for you when you specify that color mode. Process is a CMYK color mode, and Publisher creates those four Plate objects automatically for you when you specify that color mode.

The following code example changes a publication's color mode to spot and process colors. Any spot and process plates already defined remain in the collection. The code then adds two additional spot inks to the publication.

Sub ChangePublicationToSpotAndProcess()

With ActiveDocument
'specify spot and process as the publication color mode
'creates the Plates collection (if it doesn't exist)
'creates default process plates (if not already present)
'existing spot plates remain in collection
.EnterColorMode (pbColorModeSpotAndProcess)
    'creates 2 spot color plates, and sets ink color for each
    With .Plates
        .Add
        .Item(.Count).Color.RGB = RGB(167, 156, 87)
        .Add
        .Item(.Count).Color.RGB = RGB(235, 19, 117)

    End With
End With
    
End Sub

Printing Plates

When you want to print plates as separations, use the AdvancedPrintOptions object and its members to specify exactly which plates you want to print. You can choose to:

  • Print plates for all inks defined
  • Print plates for just the inks you use in the publication
  • Print plates for specific inks only
  • Print plates for Spot inks converted to CMYK inks

Creating a PrintablePlates Collection

First, you must specify that you want to print the publication as separations. Set the PrintMode property of the AdvancedPrintOptions object to pbPrintModeSeparations. When you do this, Publisher creates the PrintablePlates collection.

The PrintablePlates collection contains PrintablePlate objects. Each PrintablePlate object represents a plate in your publication. Initially, there is a PrintablePlate object for each Plate object (that is, defined ink) in your publication. However, setting other properties of the AdvancedPrintOptions object can change the number of PrintablePlate objects in the collection, and whether all of them print, as discussed later in this article.

You cannot programmatically create a PrintablePlates collection, or add or delete a PrintablePlate object in the collection. You change the plates in the PrintablePlates collection by:

  • Changing the Plate objects you define for a publication.
  • Changing certain properties of the AdvancedPrintOptions object.

Specifying Which Plates To Print

Initially, the PrintablePlates collection, contained in the AdvancedPrintOptions object, contains a PrintablePlate for each defined ink in your publication. However, there are several properties that you can set to specify exactly which plates you want to print. These properties include the InksToPrint and PrintBlankPlates properties of the AdvancedPrintOptions object, and the PrintPlate property of the PrintablePlate object.

Printing Selected Types of Plates

The InksToPrint property enables you to narrow your selection of plates that print to inks that match the following criteria:

  • PbInksToPrintAll. Print a plate for each defined ink, whether or not that ink is used in the publication. Publisher prints output for every plate you define in the Plates collection and does so for every page in the publication.
  • PbInksToPrintUsed. Print a plate for each defined ink that you use on at least one page of the publication. Each ink that you use in a publication is represented by a Plate object whose InUse property is set to True. When you specify pbInksToPrintUsed, then for any Plate object whose InUse property you set to False, the PrintablePlate object based on that Plate object has its PrintPlate property also set to False. The PrintPlate property is discussed later in this article.
  • PbInksToPrintConvertSpotToProcess. Convert any spot colors used in the publication to their equivalent CMYK values, and only print plates for the CMYK inks. This is equivalent to changing the publication ColorMode to pbColorModeProcess, and then setting the InksToPrint property to pbInksToPrintAll.
Note   If you select pbInksToPrintConvertSpotToProcess, the PrintablePlates collection contains only PrintablePlates objects representing the four process inks. Publisher converts spot colors to CMYK values and deletes all PrintablePlates objects representing spot inks. Again, this has no effect on the defined inks represented in the Plates collection.
Selecting pbInksToPrintUsed does not delete the PrintablePlate objects that represent inks you do not use in the publication.

Printing Blank Plates

You can also specify whether to print plates for publication pages where an ink is not used. Set this property to False to prevent printing plates for pages where an ink is not present.

For example, suppose a publication contains red and black spot colors on the first page, but the rest of the publication contains black only. If the PrintBlankPlates property is set to False, Publisher prints a red plate for only the first page. Publisher prints black plates for all pages.

This property applies to the entire PrintablePlates collection. That is, either you print blank plates for all plates, or none.

The following code example sets the publication print mode to separations, which creates the PrintablePlates collection. It then specifies to only print plates for those inks that are actually used in the publication, and to not print plates for any pages on which you do not use the specific ink.

Sub CreatePlatesToPrint()
With ActiveDocument.AdvancedPrintOptions
    'specify the publication to print as separations
    'and create the PrintablePlates collection
    .PrintMode = pbPrintModeSeparations
    'print plates for only those inks used in the publication
    .InksToPrint = pbInksToPrintUsed
    'do not print plates for pages where
    'the ink does not appear
    .PrintBlankPlates = False
    
End With
End Sub

Printing Individual Plates

Finally, you can specify whether to print plates for an individual ink. Set the PrintPlate property of a PrintablePlate object to True to print plates for the ink it represents.

This property is somewhat dependent on the setting of the InksToPrint property. If the InksToPrint property is set to pbInksToPrintUsed, then a plate does not print for an unused ink, even if the PrintPlate property is set to True. If you set the PrintPlate property to False for a PrintablePlate object, then that plate does not print regardless of the value of the InksToPrint property.

The following code example specifies to Publisher not to print the plate for the second spot ink in the publication.

Sub DoNotPrintPlatesForInk()
Dim pltSpot As PrintablePlate
Set pltSpot = ActiveDocument.AdvancedPrintOptions. _
    PrintablePlates.FindPlateByInkName(pbInkNameSpot2)
pltSpot.PrintPlate = False
End Sub

Figure 1 illustrates how the property settings chosen determine which plates to print, based on the color mode specified for the publication. The left side of Figure 1 presents a flow chart, in approximate order of dependency, of the properties that effect what plates to print, and their respective possible values. The right side presents the plates printed for each property value, based on the color mode specified for the publication.

Click here to see larger image

Figure 1. Settings for AdvancedPrintOptions Object Properties, and the resulting plates printed (click picture to see larger image)

Customizing Halftones: Setting a Plate's Angle and Frequency

In addition to selecting which plates to print, you can also set the angle and frequency at which each angle prints. To specify these properties, you must first set AdvancedPrintOptions.UseCustomHalftone to True, otherwise Publisher generates a "Permission Denied" error. Then you can set the Angle and Frequency property of each PrintablePlate object. Any PrintablePlate object whose Angle and Frequency properties you do not set print at their default settings.

The default angle for a plate depends on which plate it is. The following table lists the plates (organized by InkName property) and their default print angles:

Table 2. Plates organized by InkName property

Ink Name Default Angle
pbInkNameBlack 45
pbInkNameCyan 105
pbInkNameMagenta 75
pbInkNameYellow 90
pbInkNameSpot1 45
pbInkNameSpot2 105
pbInkNameSpot3 75
pbInkNameSpot4 30
pbInkNameSpot5 60
pbInkNameSpot6 90
pbInkNameSpot7 135
pbInkNameSpot8 15
pbInkNameSpot9 165
pbInkNameSpot10 120
pbInkNameSpot11 150
pbInkNameSpot12 0

The following example sets the spot color plates (plates five and higher) of a process and spot color publication to the same custom angle and frequency. The example assumes that you specify the publication's color mode as process and spot colors, and that you specify the publication's print mode as separations.

Sub SetSpotColorPlatesProperties()

ActiveDocument.AdvancedPrintOptions.UseCustomHalftone = True

Dim intCount As Integer

With ActiveDocument.AdvancedPrintOptions.PrintablePlates
    For intCount = 5 To .Count
        With .Item(intCount)
            .Angle = 45
            .Frequency = 150
        End With
    Next
End With

End Sub

Note   In the Publisher 2002 object model, the Angle and Frequency properties were members of the Plate object. Because Plate objects are no longer directly involved in Publisher print output, Publisher adds these properties to the PrintablePlate object.

Setting Additional Advanced Printing Options

Regardless of whether you select separations or a composite print mode, Publisher offers several sets of options to further customize your print output. Unless otherwise specified, the properties discussed in this section are contained in the AdvancedPrintOptions object of the Document object.

Setting Page Options

If you plan on printing your publication to film on an image setter, the AdvancedPrintOptions object contains three properties that enable you to control the orientation of the page image, and whether to print the page as a positive or negative image. The HorizontalFlip, VerticalFlip, and NegativeImage properties are only accessible if you are printing to a PostScript printer, otherwise, Publisher generates a run-time error. You can use the IsPostScriptPrinter property to determine if the printer you are printing to is a PostScript device.

Note   While the AdvancedPrintOptions object belongs to the Document object, these three properties actually specify application settings that you can save and apply to future instances of Publisher.

The following example determines if the active printer is a PostScript printer. If it is, the active publication is set to print as a horizontally and vertically mirrored, negative image of itself.

Sub PrepToPrintToFilmOnImagesetter()

With ActiveDocument.AdvancedPrintOptions
    If .IsPostscriptPrinter = True Then
        .HorizontalFlip = True
        .VerticalFlip = True
        .NegativeImage = True
    End If
End With

End Sub

Printer's Marks and Bleeds

The AdvancedPrintOptions object also contains properties that enable you to set which (if any) of the following printer's marks you want to appear on your publication print out.

Table 3. Properties for setting printer's marks.

Printer's mark Property Print Mode allowed
Bleed marks PrintBleedMarks All
(if AllowBleeds set to True)
Color bars PrintColorBars Separations only
Crop marks PrintCropMarks All
Density bars PrintDensityBars Separations only
Job information PrintJobInformation All
Registration marks PrintRegistrationMarks Separations only

These printer's marks print outside of the publication and only print if the size of the paper on which the publication prints to is larger than the publication page size. No error is generated if the paper is not large enough to print printer's marks. In an upcoming article in the series, we discuss how to determine programmatically if the paper size you select is large enough to include printer's marks.

Using the Publisher user interface, you can set printer's marks to print for composite CYMK or composite grayscale output as well as separations. Unfortunately, using the object model, you can only set your publication to include color bars, density bars, or registration marks if you set the print mode to separations. To overcome this limitation and programmatically set printer's marks to print for composite print modes, set the print mode to separations, set the printer's mark properties to True, and then select the composite print mode you want, as in the sample below.

Sub SetPrintersMarks()
    With ActiveDocument.AdvancedPrintOptions
        .PrintMode = pbPrintModeSeparations
        .AllowBleeds = True
        .PrintBleedMarks = True
        .PrintColorBars = True
        .PrintCropMarks = True
        .PrintDensityBars = True
        .PrintJobInformation = True
        .PrintRegistrationMarks = True
        .PrintMode = pbPrintModeCompositeCMYK
    End With
End Sub

You can only print bleed marks if your publication is set up to allow bleeds. Set the AllowBleeds property to True to allow bleeds in your publication. The PrintBleedMarks property is inaccessible and returns "Permission Denied" if bleeds are not allowed in the publication.

Selecting the Quality of Graphics Printed

For linked graphics that appear in the publication, you can select the quality of the graphic that prints in your publication. The GraphicsResolution property takes values that represent three levels of graphics resolution: high, low, or none at all. The low resolution and no graphics options are useful when you're more concerned with the placement of the graphic than its actual appearance. The low resolution setting uses the low-resolution placeholder version that is stored in the publication rather than the linked graphic, while the no graphics setting substitutes a wire-frame box.

Preventing Font Substitution

If you are printing to a PostScript device, font substitution may be an issue. PostScript printers may use resident fonts (stored in the printer's ROM, RAM, or hard disk drive) rather than fonts downloaded from your computer. This results in a slightly faster print time. However, if the resident fonts are not exactly identical to your computer fonts (even if they have the same name), this may cause your printed publication to look different than expected.

Set the UseOnlyPublicationFonts property to True to prevent the PostScript printer or image setter to which you are printing from substituting fonts. Publication fonts refers to fonts that the printer downloads from your computer. Setting this property to True ensures that the fonts used to print the publication are the same ones used to create it, and helps ensure the publication prints as you designed it.

Where to Find It in the User Interface

All of the object model elements discussed in this article are also represented by controls in the Publisher 2003 user interface.

On the Tools menu, point to Commercial Printing Tools, and then click Color Printing. In the Color Printing dialog box:

  • The ColorMode property of the Document object corresponds to the Define all colors as: options.
  • Each Plate object corresponds to an ink listed on the Inks tab.

On the File menu, click Print. In the Print dialog box, click Advanced Print Settings.

On the Separations tab:

  • The PrintMode property corresponds to the Output control.
  • The InksToPrint property corresponds to the These plates: control.
  • The PrintBlankPlates property corresponds to the Don't print blank plates checkbox.
    Note   Checking this check box corresponds to setting the PrintPlates property to False.
  • Each PrintablePlate object corresponds to a plate listed under the Halftone Screen section.

On the Page Settings tab:

  • The FlipHorizontal, FlipVertical, and NegativeImage properties correspond to the checkboxes under the Print output section.
  • The various printer's marks properties correspond to the checkboxes in the Printer's marks section.
  • The AllowBleeds and PrintBleedMarks properties correspond to the checkboxes in the Bleeds section.

On the Graphics and Fonts tab:

  • The GraphicsResolution property corresponds to the options under the Graphics.
  • The UseOnlyPublicationFonts property corresponds to the options under Fonts.

Advanced Print Options Object Model

Below is a diagram of the Publisher object model section that involves advanced print options.

Click here to see larger image

Figure 2. Part 1 of the Publisher advanced print options object model hierarchy (Click picture to view larger image)

Click here to see larger image

Figure 3. Part 2 of the Publisher advanced print options object model hierarchy (Click picture to view larger image)

Conclusion

You can use the Publisher object model for more flexibility and control over the print output of your publications than ever before. Choose the color mode you want the print output to be in, regardless of the publication color mode. If you print separations, you can control which plates to print, right down to selecting individual inks to print.

For more in this series, see the following articles:

Show:
© 2014 Microsoft