InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Facade::IDigitalPublishingFacade Class Referenceabstract
Inheritance diagram for Facade::IDigitalPublishingFacade:
IPMUnknownFacade::IDigitalPublishingFacade2Facade::IDigitalPublishingFacade3

Public Types

enum  { kDefaultIID = IID_IDIGITALPUBLISHINGFACADE }
 
enum  FolioOrientation {
  kOrientationAuto = 0x0, kOrientationPortrait = 0x1, kOrientationLandscape = 0x2, kOrientationBoth = kOrientationPortrait | kOrientationLandscape,
  kInvalidFolioOrientation = 0xffffffff
}
 
enum  FolioBindingDirection { kLeftEdgeBinding = 0x0, kRightEdgeBinding = 0x1 }
 
enum  ObjectFormat { kXMLObjectFormat, kBinaryObjectFormat, kInvalidObjectFormat = 0xffffffff }
 

Public Member Functions

virtual DigitalPublishingMetadata * CreateMetadata () const =0
 
virtual ErrorCode SetMetadataDate (DigitalPublishingMetadata *metadata, DigitalPublishingDateTime const &date) const =0
 
virtual ErrorCode SetMetadataUpdateDate (DigitalPublishingMetadata *metadata, DigitalPublishingDateTime const &date) const =0
 
virtual ErrorCode SetMetadataFolioNumber (DigitalPublishingMetadata *metadata, WideString const &number) const =0
 
virtual ErrorCode SetMetadataMagazineTitle (DigitalPublishingMetadata *metadata, WideString const &title) const =0
 
virtual ErrorCode SetMetadataDescription (DigitalPublishingMetadata *metadata, WideString const &desc) const =0
 
virtual ErrorCode SetMetadataCategory (DigitalPublishingMetadata *metadata, WideString const &category) const =0
 
virtual ErrorCode SetMetadataArticleTitle (DigitalPublishingMetadata *metadata, WideString const &title) const =0
 
virtual ErrorCode SetMetadataArticleAuthor (DigitalPublishingMetadata *metadata, WideString const &author) const =0
 
virtual ErrorCode SetMetadataArticleKicker (DigitalPublishingMetadata *metadata, WideString const &kicker) const =0
 
virtual ErrorCode SetMetadataArticleIsAdvertisement (DigitalPublishingMetadata *metadata, bool16 isAd) const =0
 
virtual ErrorCode SetMetadataArticleTags (DigitalPublishingMetadata *metadata, K2Vector< WideString > const &tags) const =0
 
virtual ErrorCode AddMetadataKeyValue (DigitalPublishingMetadata *metadata, WideString const &key, WideString const &value) const =0
 
virtual bool16 GetMetadataValueForKey (DigitalPublishingMetadata *metadata, WideString const &key, WideString &value) const =0
 
virtual void DisposeMetadata (DigitalPublishingMetadata *metadata) const =0
 
virtual ErrorCode CreateMiniFolio (IDocument const *portrait, IDocument const *landscape, MiniFolioOptions const &options, DigitalPublishingMetadata const *metadata, IDFile const &folioFile) const =0
 
virtual DigitalPublishingFolio * CreateFolio () const =0
 
virtual ErrorCode SetFolioMetadata (DigitalPublishingFolio *folio, DigitalPublishingMetadata const *metadata) const =0
 
virtual ErrorCode SetFolioOrientation (DigitalPublishingFolio *folio, FolioOrientation orientation=kOrientationBoth) const =0
 
virtual ErrorCode SetFolioTargetDimensions (DigitalPublishingFolio *folio, uint32 wideDimension, uint32 narrowDimension) const =0
 
virtual ErrorCode SetContentStackIDMap (DigitalPublishingFolio *folio, id_digpub::ObjectPtr const &contentStackIDMap) const =0
 
virtual ErrorCode AddDirectoryToFolio (DigitalPublishingFolio *folio, IDFile const &directory) const =0
 
virtual ErrorCode SetFolioBindingDirection (DigitalPublishingFolio *folio, FolioBindingDirection direction) const =0
 
virtual ErrorCode AddMiniFolioToFolio (DigitalPublishingFolio *folio, IDFile const &miniFolio) const =0
 
virtual ErrorCode AddDocumentPairToFolio (DigitalPublishingFolio *folio, IDocument const *portrait, IDocument const *landscape, MiniFolioOptions const &options, DigitalPublishingMetadata const *metadata) const =0
 
virtual ErrorCode ExportFolioToPackage (DigitalPublishingFolio *folio, IDFile const &packageFile) const =0
 
virtual ErrorCode ExportFolioToDirectory (DigitalPublishingFolio *folio, IDFile const &manifestFile, IDPath const &articleDirectory) const =0
 
virtual ErrorCode ExportFolioToDirectoryPackage (DigitalPublishingFolio *folio, IDFile const &packageFile) const =0
 
virtual void DisposeFolio (DigitalPublishingFolio *folio) const =0
 
virtual id_digpub::ObjectPtr CreateEmptyDictionary () const =0
 
virtual bool WriteDigPubObjectToStream (id_digpub::ObjectPtr const &obj, IPMStream *s, ObjectFormat format=kBinaryObjectFormat) const =0
 
virtual bool ReadDigPubObjectFromStream (id_digpub::ObjectPtr &obj, IPMStream *s, ObjectFormat format=kInvalidObjectFormat) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Static Public Member Functions

static ErrorCode SetMetadataArticleHideFromTOC (DigitalPublishingMetadata *metadata, bool16 hideFromTOC)
 
static ErrorCode SetMetadataArticleIntent (DigitalPublishingMetadata *metadata, WideString const &intent)
 
static ErrorCode SetMetadataArticleSection (DigitalPublishingMetadata *metadata, WideString const &section)
 
static ErrorCode SetMetadataArticleIsTrustedContent (DigitalPublishingMetadata *metadata, bool16 isTrustedContent)
 

Member Enumeration Documentation

FolioBindingDirection – Right-Edge Binding

Member Function Documentation

virtual ErrorCode Facade::IDigitalPublishingFacade::AddDirectoryToFolio (DigitalPublishingFolio * folio,
IDFile const & directory 
) const
pure virtual

Adds a directory to a folio to be packaged along with the mini-folios.

Parameters
folioThe folio being created
directoryThe location of the directory to add
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::AddDocumentPairToFolio (DigitalPublishingFolio * folio,
IDocument const * portrait,
IDocument const * landscape,
MiniFolioOptions const & options,
DigitalPublishingMetadata const * metadata 
) const
pure virtual

Adds a pair of document, assumed to represent a single article in its two orientations, to a folio.

Parameters
folioThe folio being created
portraitThe document representing the folio's portrait orientation
landscapeThe document representing the folio's landscape orientation
optionsThe options to use while creating the folio file
metadataThe metadata to associate with the article
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::AddMetadataKeyValue (DigitalPublishingMetadata * metadata,
WideString const & key,
WideString const & value 
) const
pure virtual

Sets an arbitrary metadata item. All values must be encoded as strings.

All attributes set through this API are considered optional and are ignored by the viewer application.

Parameters
metadataThe target metadata
keyThe key for the metadata item
valueThe key's value
virtual ErrorCode Facade::IDigitalPublishingFacade::AddMiniFolioToFolio (DigitalPublishingFolio * folio,
IDFile const & miniFolio 
) const
pure virtual

Adds a mini-folio to a folio.

Parameters
folioThe folio being created
miniFolioThe location of the mini folio to add
Returns
an ErrorCode indicating whether the call succeeded
virtual id_digpub::ObjectPtr Facade::IDigitalPublishingFacade::CreateEmptyDictionary () const
pure virtual

Factory method for creating an instance of an empty dictionary.

Returns
a new instance of an empty dictionary object
virtual DigitalPublishingFolio* Facade::IDigitalPublishingFacade::CreateFolio () const
pure virtual

Creates a new folio instance. The returned instance is owned by the caller and must be deleted by a call to DisposeFolio

Returns
a new DigitalPublishingFolio instance, or nil if an error occurs
virtual DigitalPublishingMetadata* Facade::IDigitalPublishingFacade::CreateMetadata () const
pure virtual

Creates an instance of a metadata object

virtual ErrorCode Facade::IDigitalPublishingFacade::CreateMiniFolio (IDocument const * portrait,
IDocument const * landscape,
MiniFolioOptions const & options,
DigitalPublishingMetadata const * metadata,
IDFile const & folioFile 
) const
pure virtual

Creates a 'mini' folio for a pair of InDesign documents, using the specified options

Parameters
portraitThe document representing the folio's portrait orientation
landscapeThe document representing the folio's landscape orientation
optionsThe options to use while creating the folio file
folioFileThe location in which to create the folio file
returnan ErrorCode describing the status of the call
virtual void Facade::IDigitalPublishingFacade::DisposeFolio (DigitalPublishingFolio * folio) const
pure virtual

Disposes an instance of a DigitalPublishingFolio created by a call to CreateFolio

Parameters
folioThe folio to dispose
virtual void Facade::IDigitalPublishingFacade::DisposeMetadata (DigitalPublishingMetadata * metadata) const
pure virtual

Disposes of a metadata instance.

Parameters
metadataThe metadata to be disposed of
virtual ErrorCode Facade::IDigitalPublishingFacade::ExportFolioToDirectory (DigitalPublishingFolio * folio,
IDFile const & manifestFile,
IDPath const & articleDirectory 
) const
pure virtual

Exports a flattened folio to a manifest file and a series of mini-folios.

Parameters
folioThe folio to export
manifestFileThe location for the package being exported
articleDirectoryThe location, relative to manifestFile's parent directory, in which the mini-folios are saved
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::ExportFolioToDirectoryPackage (DigitalPublishingFolio * folio,
IDFile const & packageFile 
) const
pure virtual

Exports a folio to a manifest file and a directory structure (i.e. June folio format) package.

Parameters
folioThe folio to export
packageFileThe location for the package being exported
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::ExportFolioToPackage (DigitalPublishingFolio * folio,
IDFile const & packageFile 
) const
pure virtual

Exports a folio to a single package.

Parameters
folioThe folio to export
packageFileThe location for the package being exported
Returns
an ErrorCode indicating whether the call succeeded
virtual bool16 Facade::IDigitalPublishingFacade::GetMetadataValueForKey (DigitalPublishingMetadata * metadata,
WideString const & key,
WideStringvalue 
) const
pure virtual

Gets an arbitrary metadata item. All returned values are encoded as strings.

Parameters
metadataThe target metadata
keyThe key to retreive
valueOut parameter: will contain the value for the key if successful
Returns
kTrue if the specified key's value was successfully retrieved, else kFalse
virtual bool Facade::IDigitalPublishingFacade::ReadDigPubObjectFromStream (id_digpub::ObjectPtr & obj,
IPMStreams,
ObjectFormat format = kInvalidObjectFormat 
) const
pure virtual

Reads an object to a stream, assumed to be opened for reading, using the specified format as a hint. If you know the format used to write the stream originally, you may specify it. If not, use the default value to cause this routine to examine the bytes in the stream to determine what format was used.

Parameters
objThe root object to write
sThe stream to write to
formatThe format to use
Returns
true if successful
virtual ErrorCode Facade::IDigitalPublishingFacade::SetContentStackIDMap (DigitalPublishingFolio * folio,
id_digpub::ObjectPtr const & contentStackIDMap 
) const
pure virtual

Sets the content stack ID map for a folio

Parameters
folioThe folio to which the content stack ID map should be set
contentStackIDMapAn ObjectPtr created from CreateEmptyDictionary() filled with key/value pairs mapping document names to content stack IDs. This is used when fixing up navTo hyperlinks.
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::SetFolioBindingDirection (DigitalPublishingFolio * folio,
FolioBindingDirection direction 
) const
pure virtual

FMR Right Edge Binding Sets the binding direction for a folio

Parameters
folioThe folio to which the binding direciton should be set
directionThe binding direction to set for the folio
virtual ErrorCode Facade::IDigitalPublishingFacade::SetFolioMetadata (DigitalPublishingFolio * folio,
DigitalPublishingMetadata const * metadata 
) const
pure virtual

Sets the metadata for a folio

Parameters
folioThe folio to which the metadata should be added
metadataThe metadata to add to the folio
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::SetFolioOrientation (DigitalPublishingFolio * folio,
FolioOrientation orientation = kOrientationBoth 
) const
pure virtual

Sets the orientation for a folio

Parameters
folioThe folio to which the orientation should be set
orientationThe orientation to set for the folio (defaults to kOrientationBoth)
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::SetFolioTargetDimensions (DigitalPublishingFolio * folio,
uint32 wideDimension,
uint32 narrowDimension 
) const
pure virtual

Sets the target dimensions for a folio. May be called more than once for multiple target sizes, although all mini-folios must support all requested output dimensions.

Parameters
folioThe folio to which the target dimensions should be set
wideDimensionThe wide dimension to set for the folio (larger of the numbers)
narrowDimensionThe narrow dimension to set for the folio (smaller of the numbers)
Returns
an ErrorCode indicating whether the call succeeded
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleAuthor (DigitalPublishingMetadata * metadata,
WideString const & author 
) const
pure virtual

Sets the author for an article

This attribute is required. It is used by the viewer in the scrubber and browser views.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
authorThe article's author
Returns
kSuccess if successful, otherwise an error code
static ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleHideFromTOC (DigitalPublishingMetadata * metadata,
bool16 hideFromTOC 
)
inlinestatic

Sets whether an article should be hidden from the Table of Contents (TOC)

This attribute is optional. It is used by the viewer to determine whether an article should be shown in the table of contents or not. The default is false. If the attribute is not provided, but the IsAdvertisement attribute is provided and is true, the article will not be shown in the TOC.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
hideFromTOCBoolean value indicating whether article should be hidden from the TOC
Returns
kSuccess if successful, otherwise an error code
static ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleIntent (DigitalPublishingMetadata * metadata,
WideString const & intent 
)
inlinestatic

Set the intent for the article.

This attribute is optional. It is used by the viewer to navigate to a specific article.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
intentWideString string designating the article's intent
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleIsAdvertisement (DigitalPublishingMetadata * metadata,
bool16 isAd 
) const
pure virtual

Sets whether an article is an advertisement

This attribute is optional. It is used by the viewer to determine if the article is an advertisement. The default is false.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
isAdBoolean value indicating whether article is an advertisement
Returns
kSuccess if successful, otherwise an error code
static ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleIsTrustedContent (DigitalPublishingMetadata * metadata,
bool16 isTrustedContent 
)
inlinestatic

Sets whether or not article content is trusted.

This attribute is optional. It is used to allow access to V1 Library JSAPI. This attribute is relevant only for HTML stack type.

Parameters
metadataThe target metadata
isTrustedContentBoolean value indicating whether an HTML article content should be trusted.
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleKicker (DigitalPublishingMetadata * metadata,
WideString const & kicker 
) const
pure virtual

Sets the "kicker" for an article. This is a short descriptive phrase or callout.

This attribute is optional. If included, it is used by the viewer in the scrubber, browser, and table of contents views.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
kickerThe article's kicker
Returns
kSuccess if successful, otherwise an error code
static ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleSection (DigitalPublishingMetadata * metadata,
WideString const & section 
)
inlinestatic

Set the section for the article.

This attribute is optional. It is used to define the section the article belongs to.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
sectionWideString string designating the article's section
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleTags (DigitalPublishingMetadata * metadata,
K2Vector< WideString > const & tags 
) const
pure virtual

Sets the tags for an article. These are short textual items that can be used to informally classify an article.

This attribute is optional. If included, it is used by the viewer in the scrubber and browser views.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
titleThe article's title
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataArticleTitle (DigitalPublishingMetadata * metadata,
WideString const & title 
) const
pure virtual

Sets the title for an article

This attribute is required. It is used by the viewer in the scrubber, browser, and table of contents views.

Note: This attribute is ignored if applied to a folio.

Parameters
metadataThe target metadata
titleThe article's title
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataCategory (DigitalPublishingMetadata * metadata,
WideString const & category 
) const
pure virtual

Sets the category for a folio

This attribute is optional. It is not currently used by the viewer.

Note: This attribute is ignored if applied to an article.

Parameters
metadataThe target metadata
categoryThe folio's category
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataDate (DigitalPublishingMetadata * metadata,
DigitalPublishingDateTime const & date 
) const
pure virtual

Sets the date when the folio was originally created

This attribute is required. It is not currently used by the viewer.

Note: This attribute is ignored if applied to an article.

Parameters
metadataThe target metadata
dateThe date the folio was created
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataDescription (DigitalPublishingMetadata * metadata,
WideString const & desc 
) const
pure virtual

Sets the description for a folio or an article

This attribute is optional. When applied to an article, it is currently used by the viewer in the browser view. It is not currently used when applied to a folio.

Parameters
metadataThe target metadata
descThe folio's description
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataFolioNumber (DigitalPublishingMetadata * metadata,
WideString const & number 
) const
pure virtual

Sets the folio's number. This, along with the folio's magazine title, should uniquely identify this folio.

This attribute is required. It is displayed by the viewer in the header section.

Note: This attribute is ignored if applied to an article.

Parameters
metadataThe target metadata
numberThe folio number for the folio, as a string
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataMagazineTitle (DigitalPublishingMetadata * metadata,
WideString const & title 
) const
pure virtual

Sets the folio's magazine title

This attribute is required. It is displayed by the viewer in the header section.

Note: This attribute is ignored if applied to an article.

Parameters
metadataThe target metadata
titleThe title of the folio's magazine
Returns
kSuccess if successful, otherwise an error code
virtual ErrorCode Facade::IDigitalPublishingFacade::SetMetadataUpdateDate (DigitalPublishingMetadata * metadata,
DigitalPublishingDateTime const & date 
) const
pure virtual

Sets the date when the folio was last updated

This attribute is optional. It is not currently used by the viewer.

Note: This attribute is ignored if applied to an article.

Parameters
metadataThe target metadata
dateThe date the folio was last updated
Returns
kSuccess if successful, otherwise an error code
virtual bool Facade::IDigitalPublishingFacade::WriteDigPubObjectToStream (id_digpub::ObjectPtr const & obj,
IPMStreams,
ObjectFormat format = kBinaryObjectFormat 
) const
pure virtual

Writes an object to a stream, assumed to be opened for writing, using the specified format.

Parameters
objThe root object to write
sThe stream to write to
formatThe format to use
Returns
true if successful