Mako 7.3.0 API
JawsMako::IXPSInput Class Referenceabstract

An instance of the JawsMako XPS input class. More...

#include <xpsinput.h>

Inheritance diagram for JawsMako::IXPSInput:

Public Member Functions

virtual IDocumentAssemblyPtr openStreaming (const IInputStreamPtr &inputStream)=0
 Open a stream, returning the IDocumentAssembly representing the contents, in streaming mode. More...
 
- Public Member Functions inherited from JawsMako::IInput
virtual IDocumentAssemblyPtr open (const U8String &pathToFile)=0
 Open a file on disk, returning the IDocumentAssembly representing the contents. More...
 
virtual IDocumentAssemblyPtr open (const String &pathToFile)=0
 Open a file on disk, returning the IDocumentAssembly representing the contents. Takes a wide character string. More...
 
virtual IDocumentAssemblyPtr open (const IInputStreamPtr &inputStream)=0
 Open a stream, returning the IDocumentAssembly representing the contents. More...
 
virtual void setSequentialMode (bool sequential)=0
 Set/unset sequential mode on this input. More...
 
virtual void setParameter (const U8String &param, const U8String &value)=0
 Apply a key value pair output parameter with a string value. The parameter name is case insensitive. Please refer to the supplied documentation for the details of the available parameters and their ranges. More...
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. More...
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to. More...
 

Static Public Member Functions

static JAWSMAKO_API IXPSInputPtr create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create an input for reading source documents in XPS format. More...
 
- Static Public Member Functions inherited from JawsMako::IInput
static JAWSMAKO_API IInputPtr create (const IJawsMakoPtr &jawsMako, eFileFormat format, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create an input for reading source documents in the given format. The following formats are currently supported: More...
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

An instance of the JawsMako XPS input class.

Member Function Documentation

◆ create()

static JAWSMAKO_API IXPSInputPtr JawsMako::IXPSInput::create ( const IJawsMakoPtr &  jawsMako,
const IProgressMonitorPtr &  progressMonitor = IProgressMonitorPtr() 
)
static

Create an input for reading source documents in XPS format.

Parameters
jawsMakoThe IJawsMako object
progressMonitorA smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in.
Returns
IXPSInputPtr the XPS input

◆ openStreaming()

virtual IDocumentAssemblyPtr JawsMako::IXPSInput::openStreaming ( const IInputStreamPtr &  inputStream)
pure virtual

Open a stream, returning the IDocumentAssembly representing the contents, in streaming mode.

This is designed to support cases where we wish to begin working with the XPS before the entire stream has been received, such as within a Windows XPS print driver or if the XPS is being downloaded from a remote server.

The assembly returned by this function is opened once the most basic parts of the XPS stream have become available; for a properly interleaved XPS stream this should not required much data to be received.

Access to the assembly can still be in a random fashion, but a request for a document or page will block until that document becomes available in the incoming stream.

Note that there are several operations that will cause the a wait until the entire XPS input has been received. These include:

  • Document manipulation (any attempt to insert or remove a document)
  • Page manipulation (any attempt to insert or remove a page)
  • Requesting the number of pages or documents.
  • Searching for a target in a document or assembly.

Instead of requesting the number of pages or documents, it is reccommended that the documents and pages are requested sequentially, and if a page or document is not available an IError exception with error code JM_ERR_PAGE_NOT_FOUND or JM_ERR_DOCUMENT_NOT_FOUND will be thrown. These can be caught and appropriately handled.

Returns
IDocumentAssemblyPtr the document assembly.

The documentation for this class was generated from the following file: