Mako 7.4.0 API
Loading...
Searching...
No Matches
JawsMako::IPDFString Class Referenceabstract

A simple immutable string pdf object containing raw unencoded data or PDF Text information. More...

#include <pdfobjects.h>

Inheritance diagram for JawsMako::IPDFString:

Public Member Functions

virtual bool isUtf8Encoded ()=0
 Determine if the string is UTF-8 encoded. Will only be true for strings from PDF 2.0 or later versions.
 
virtual const RawStringgetValue () const =0
 Get the raw value of the string.
 
virtual U8String getTextValue () const =0
 Get the UTF-8 value of this PDF Text-encoded string.
 
- Public Member Functions inherited from JawsMako::IPDFObject
virtual ePDFObjectType getType () const =0
 Get the type of this PDF object.
 
virtual IPDFObjectPtr clone () const =0
 Create a clone of this PDF object if appropriate. Note that simple immutable objects are not actually cloned and instead the same object is returned.
 
virtual IPDFObjectPtr deepClone () const =0
 Create a deep clone of this PDF object if appropriate. Note that simple immutable objects are not actually cloned and instead the same object is returned. If the object is composite (an IPDFArray, IPDFDictionary or IPDFStream) then the object will be cloned as well as the consituent objects in a recursive fashion.
 
virtual bool getIsExecutable () const =0
 Get whether or not the object is considered executable, such as an executable name, array, or operator.
 
virtual bool containsReferences () const =0
 Get whether or not the object contains indirect references to other objects (that is, does the object or any constituent object contain IPDFReference or IPDFFarReference objects).
 
virtual void emitPostScriptCode (const IOutputStreamPtr &dest) const =0
 Convert the object to PostScript code and write to the given stream. Only allowed for objects that are representable in PostScript.
 
virtual bool getNumber (double &number) const =0
 If the object is a number (a real or integer) obtain that number.
 
virtual bool getNumber (float &number) const =0
 If the object is a number (a real or integer) within the range of a 32-bit float, obtain that number. If the object is an integer, thiw will fail if the integer cannot be represented exactly in a single precision float.
 
virtual bool getNumber (int32 &number) const =0
 If the object is an integer (a integral real or integer) within the range of a 32-bit integer, obtain that number.
 
virtual bool getString (RawString &string) const =0
 If the object is a string or a name, retrieve the raw string data.
 
- 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.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 
- Public Member Functions inherited from JawsMako::IHashable
virtual uint64 hash () const
 Obtain a 64-bit hash of the receiving object.
 
virtual void updateHash (uint64 &hash) const =0
 Update the given hash to include the receiver.
 

Static Public Member Functions

static JAWSMAKO_API IPDFStringPtr create (const RawString &string, bool executable=false, bool pdf2=false)
 Create a string object from a raw unencoded string.
 
static JAWSMAKO_API IPDFStringPtr createText (const U8String &string, bool executable=false, bool pdf2=false)
 Create a string object in PDF encoding from a UTF-8 string.
 
static JAWSMAKO_API IPDFStringPtr create (const IInputStreamPtr &stream, bool executable=false, bool pdf2=false, int64 startOffset=0)
 Create a raw string object using the contents of a string.
 
- Static Public Member Functions inherited from JawsMako::IPDFObject
static JAWSMAKO_API IPDFObjectPtr createNumber (double number)
 If the given number is an integer, create an IPDFInteger, otherwise create an IPDFReal.
 

Additional Inherited Members

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

Detailed Description

A simple immutable string pdf object containing raw unencoded data or PDF Text information.

A simple immutable name pdf object.

Member Function Documentation

◆ create() [1/2]

static JAWSMAKO_API IPDFStringPtr JawsMako::IPDFString::create ( const IInputStreamPtr & stream,
bool executable = false,
bool pdf2 = false,
int64 startOffset = 0 )
static

Create a raw string object using the contents of a string.

Parameters
streamThe stream to use as source data.
executableIf this string should be marked executable.
pdf2True if this string was created from a PDF 2.0 or later document.
startOffsetThe starting offse to copy from the stream.
Returns
IPDFStringPtr The created object.

◆ create() [2/2]

static JAWSMAKO_API IPDFStringPtr JawsMako::IPDFString::create ( const RawString & string,
bool executable = false,
bool pdf2 = false )
static

Create a string object from a raw unencoded string.

Parameters
stringThe raw string value.
executableIf this string should be marked executable.
pdf2True if this string was created from a PDF 2.0 or later document.
Returns
IPDFStringPtr The created object.

◆ createText()

static JAWSMAKO_API IPDFStringPtr JawsMako::IPDFString::createText ( const U8String & string,
bool executable = false,
bool pdf2 = false )
static

Create a string object in PDF encoding from a UTF-8 string.

Parameters
stringThe string value.
executableIf this string should be marked executable.
pdf2True if this string was created from a PDF 2.0 or later document.
Returns
IPDFStringPtr The created object.

◆ getTextValue()

virtual U8String JawsMako::IPDFString::getTextValue ( ) const
pure virtual

Get the UTF-8 value of this PDF Text-encoded string.

Returns
U8String The UTF-8 value of this string.

◆ getValue()

virtual const RawString & JawsMako::IPDFString::getValue ( ) const
pure virtual

Get the raw value of the string.

Returns
RawString The value of the real.

◆ isUtf8Encoded()

virtual bool JawsMako::IPDFString::isUtf8Encoded ( )
pure virtual

Determine if the string is UTF-8 encoded. Will only be true for strings from PDF 2.0 or later versions.

Returns
bool True if UTF-8 encoded.

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