InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IOutputPages Class Referenceabstract

#include <IOutputPages.h>

Inheritance diagram for IOutputPages:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IOUTPUTPAGES }
 

Public Member Functions

virtual void Start ()=0
 
virtual void End ()=0
 
virtual IDataBaseGetMasterDataBase (void)=0
 
virtual void SetMasterDataBase (IDataBase *iDataBase)=0
 
virtual bool16 GetIsSpreads (void) const =0
 
virtual void SetIsSpreads (const bool16 bIsSpreads)=0
 
virtual void InitializeFrom (const UIDList &listPages, bool16 bSpreads)=0
 
virtual void InsertOutputPageUIDRef (const UIDRef &uidRef)=0
 
virtual void AppendOutputPageUIDRef (const UIDRef &uidRef)=0
 
virtual void AppendOutputPageUIDRef2 (const UIDRef &uidRef, const IDFile *sysFile, const PMRect &pageBounds)=0
 
virtual void RemoveUIDRef (const int32 index)=0
 
virtual void Clear (void)=0
 
virtual int32 Location (const UIDRef &uidRef) const =0
 
virtual int32 Number (void) const =0
 
virtual UIDRef GetNthUIDRef (const int32 index, bool16 bValidateDataBase=kTrue) const =0
 
virtual IDFileGetNthSysFile (const int32 index)=0
 
virtual void SetNthOutputPageBounds (const int32 index, const PMRect &pageBounds)=0
 
virtual PMRect GetNthOutputPageBounds (const int32 index) const =0
 
virtual bool16 GetContiguousPages (void) const =0
 
virtual void SetContiguousPages (const bool16 bContiguousPages)=0
 
virtual bool16 GetUniformSizePages (void)=0
 
virtual void SetUniformSizePages (const bool16 bUniformSizePages)=0
 
virtual void GetName (PMString &name) const =0
 
virtual void SetName (const PMString &name)=0
 
virtual IPMStreamGetOutputStream (void) const =0
 
virtual void SetOutputStream (IPMStream *outputStream)=0
 
virtual void Copy (IOutputPages *other)=0
 
virtual void InitializeFrom (IOutputPages *pSrc, bool16 bConvertToSpreads)=0
 
virtual void SetOutputFile (IDFile &sysFile, bool16 validFile=kFalse)=0
 
virtual IDFile GetOutputFile (bool16 &isValidOutputFile)=0
 
virtual void ReverseOrder ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IOutputPages is used to enable the export and print of multiple pages that come from potentially different publications. Such is the case when printing/exporting multiple pubs from a Book. This interface will handle the open/close of pubs that require it. If not printing/exporting a Book, things are simple. The database has to be open and valid, and the pages or spreads can be added via the insert or append methods that add a UIDRef. If printing/exporting a Book, the pubs may be open or closed. If the pub is closed, this requires a IDFile to the pub, a page or spread UID, and the page bounds of the page or spread. When the print or export code asks for a UIDRef for the page, this interface will open the pub headless, and return a valid database in the UIDRef. When finished, it will close the pub. IOutputPages is used in Printing, EPS, PDF and SVG export.

Member Function Documentation

virtual void IOutputPages::AppendOutputPageUIDRef (const UIDRefuidRef)
pure virtual

Append a UIDRef, containing the DataBase of the open pub, and the UID of the page to be output, or the spread to be output, onto the end of the list. The page/spread bounds are calculated automatically.

Parameters
uidRefIN UIDRef of the page or spread to append
virtual void IOutputPages::AppendOutputPageUIDRef2 (const UIDRefuidRef,
const IDFilesysFile,
const PMRectpageBounds 
)
pure virtual

Append a UIDRef, containing the UID of the page to be output, or the spread to be output, onto the end of the list. For this method only, the DataBase portion of the UIDRef does not have to be valid (i.e. the pub does not have to be open) since the IDFile of the pub is provided, as well as the bounds of the page/spread.

Parameters
uidRefIN UIDRef containing the UID of the page/spread to append (the DB doesn't matter)
sysFileIN IDFile pointer of the pub that contains the UID of the page/spread
pageBoundsIN PMRect of the page/spread bounds
virtual void IOutputPages::Clear (void )
pure virtual

Remove all of the UIDRefs from the list

virtual void IOutputPages::Copy (IOutputPagesother)
pure virtual

Copy the given IOutputPages to this one

Parameters
otherIN the IOutputPages to copy from
virtual void IOutputPages::End ()
pure virtual

End - MUST be paired with Start()!

  • should be called at the end of the outermost context of the IOutputPages. End does not have to be called again for nested IOutputPages uses, only the outmost context. It is used to close any pubs that IOutputPages had to open when printing books.
virtual bool16 IOutputPages::GetContiguousPages (void ) const
pure virtual

Determine if the output pages/spreads contiguous. Defaults to kFalse

Returns
kTrue if the pages/spreads in the list are contiguous, kFalse otherwise
virtual bool16 IOutputPages::GetIsSpreads (void ) const
pure virtual

Tell whether we are dealing with pages or spreads. Are the output UIDRefs used below page UIDRefs or spread UIDRefs? Defaults to kFalse (page UIDRefs) NOTE: this should be set up prior to calling AppendUIDRef!

Returns
kTrue if UIDRefs refer to spreads instead of pages, kFalse otherwise
virtual IDataBase* IOutputPages::GetMasterDataBase (void )
pure virtual

If outputting a book, this is the database of the master pub, otherwise, if this has not been initialized, it is the database of the first pub in the list, zero if no pubs in the list. This is used for document settings that need to be used for all documents being output.

Returns
IDataBase pointer to the master database
See Also
IDataBase
virtual void IOutputPages::GetName (PMStringname) const
pure virtual

Get the name associated with the book or document. This is used in export information, such as DSC comments for EPSs.

Parameters
nameOUT PMString reference containing the name to use
virtual PMRect IOutputPages::GetNthOutputPageBounds (const int32 index) const
pure virtual

Get a PMRect of the page/spread bounds (in InD coordinates) for the given index. The rect is calculated in the AppendUIDRef methods, as the pages/spreads are added to the list. SetNthBounds can be used to overwrite the bounds.

Parameters
indexIN index of the bounds to retrieve
Returns
PMRect containing the bounds of the given index
virtual IDFile* IOutputPages::GetNthSysFile (const int32 index)
pure virtual

Get a pointer to a IDFile of the selected index into the list, the pointer will be nil if the pub has never been saved!

Parameters
indexIN index of the IDFile to retrieve
Returns
IDFile pointer of the given index into the list, may be nil
virtual UIDRef IOutputPages::GetNthUIDRef (const int32 index,
bool16 bValidateDataBase = kTrue 
) const
pure virtual

Get the UIDRef of the selected index into the list

Parameters
indexIN index of the UIDRef to retrieve
bValidateDataBaseIN if kTrue, the IDataBase portion of the UIDRef is guaranteed to be good, at least until then next call to GetNthUIDRef. If kFalse, the IDataBase portion of the UIDRef may or may not be valid - so only count on the UID portion.
Returns
UIDRef of the given index into the list
virtual IDFile IOutputPages::GetOutputFile (bool16 & isValidOutputFile)
pure virtual

Get the export destination file. If the file is not valid, the export manager will put up a save file dialog.

Parameters
isValidOutputFileOUT kTrue if the file is valid, kFalse otherwise
Returns
IDFile of the output file
virtual IPMStream* IOutputPages::GetOutputStream (void ) const
pure virtual

Get a stream to output to - if this is nil, code should ask the user for file

Returns
an IPMStream to output to, or may be nil
See Also
IPMStream
virtual bool16 IOutputPages::GetUniformSizePages (void )
pure virtual

Determine if the output pages/spreads are the same size. NOTE: if the SetUniformSizePages method has not been used, it will figure this out from the bounds. If the SetUniformSizePages method has been used, it will return that value.

Returns
kTrue if all of the output pages/spreads are the same size, kFalse otherwise
virtual void IOutputPages::InitializeFrom (const UIDListlistPages,
bool16 bSpreads 
)
pure virtual

Initialize from a UIDList of pages (or spreads if bSpreads is kTrue) to output

Parameters
listPagesIN UIDList reference to initialize from
bSpreadsIN kTrue if UIDList contains spread references, kFalse otherwise
virtual void IOutputPages::InitializeFrom (IOutputPagespSrc,
bool16 bConvertToSpreads 
)
pure virtual

Convert from a IOutputPages without spreads to one with or without spreads. Will not convert from one that has spreads to one that does not however.

Parameters
pSrcIN the IOutputPages to initialize
bConvertToSpreadsIN kTrue if converting to spreads, kFalse otherwise
virtual void IOutputPages::InsertOutputPageUIDRef (const UIDRefuidRef)
pure virtual

Insert a UIDRef, containing the DataBase of the open pub, and the UID of either the page to be output, or the spread to be output, onto the front of the list. The page/spread bounds are calculated automatically.

Parameters
uidRefIN UIDRef of the page or spread to insert
virtual int32 IOutputPages::Location (const UIDRefuidRef) const
pure virtual

Return the index of the given UIDRef

Parameters
uidRefIN UIDRef to find
virtual int32 IOutputPages::Number (void ) const
pure virtual

Get the number of pages/spreads in the list

Returns
the number of pages/spreads in the list
virtual void IOutputPages::RemoveUIDRef (const int32 index)
pure virtual

Removes the selected index from the list

Parameters
indexIN index of the UIDRef to remove
virtual void IOutputPages::ReverseOrder ()
pure virtual

Reverse the output page UID list.

Parameters
none
virtual void IOutputPages::SetContiguousPages (const bool16 bContiguousPages)
pure virtual

Set the boolean for contiguous pages/spreads.

Parameters
bContiguousPagesIN kTrue if the pages/spreads are contiguous, kFalse otherwise
virtual void IOutputPages::SetIsSpreads (const bool16 bIsSpreads)
pure virtual

Set the boolean for outputting spreads.

Parameters
bIsSpreadsIN kTrue if outputting spreads, kFalse otherwise
virtual void IOutputPages::SetMasterDataBase (IDataBaseiDataBase)
pure virtual

Set the master data base pointer.

Parameters
iDataBaseIN IDataBase pointer of the master database to use
virtual void IOutputPages::SetName (const PMStringname)
pure virtual

Set the document name. See GetName above for more info.

Parameters
nameIN PMString reference containing the name to use
virtual void IOutputPages::SetNthOutputPageBounds (const int32 index,
const PMRectpageBounds 
)
pure virtual

Overwrite the setting for the page/spread bounds (in InD coordinates)

Parameters
indexIN index of the bounds to change
pageBoundsIN PMRect containing the new page bounds
virtual void IOutputPages::SetOutputFile (IDFilesysFile,
bool16 validFile = kFalse 
)
pure virtual

Set the export destination file

Parameters
sysFileIN IDFile reference that is the destination file
validFileIN kTrue if the file is valid, kFalse otherwise
virtual void IOutputPages::SetOutputStream (IPMStreamoutputStream)
pure virtual

Set a stream to output to

Parameters
outputStreamIN the stream to write the output to
virtual void IOutputPages::SetUniformSizePages (const bool16 bUniformSizePages)
pure virtual

Set if the output pages/spreads are the same size. It is not necessary to use this method, because the GetUniformSizePages method will figure out if the pages are the same size. If this method is used, the GetUniformSizePages will return whatever this has been set to.

Parameters
bUniformSizePagesIN kTrue if all the pages are the same size, kFalse otherwise
virtual void IOutputPages::Start ()
pure virtual

Start - MUST be paired with End()!

  • should be called at the start of the outermost context of the IOutputPages. Start does not have to be called again for nested IOutputPages uses, only the outmost context. Start/End are used for cleaning up pubs that IOutputPages had to open, when printing books. If not printing/exporting books, Start/End are unnecessary.