public class Doc : IHaruObject
PDF Document Class
Functions
this | Creates a new Doc instance | |
this | Creates a new Doc instance with a delegate which is invoked when an error occurred. | |
saveToFile | Saves the document to a file. | |
saveToStream | Saves the document to a temporary stream. | |
getStreamSize | Gets the size of the temporary stream of the document. | |
readFromStream | Copies the data from the temporary stream of the document into a buffer. | |
resetStream | Rewinds the temporary stream of the document | |
statichasDoc | Checks if the document is valid | |
setErrorHandler | Sets a user-defined error delegate. If a function call fails, the error delegate is called. | |
getError | Returns the last error code of specified document object | |
resetError | Once an error code is set, IO processing functions cannot be invoked. | |
setPagesConfiguration | In the default setting, a Doc object has one "Pages" object as root of pages. | |
@propertypageLayout | Returns the current setting for page layout | |
@propertypageLayout | Sets how the page should be displayed. | |
@propertypageMode | Sets how the document should be displayed | |
@propertypageMode | Returns the current setting for page mode | |
setOpenAction | Set the first page to appear when a document is opened. | |
getCurrentPage | Returns the handle of current page object. | |
addPage | Creates a new page and adds it after the last page of a document. | |
insertPage | Creates a new page and inserts it just before the specified page. | |
getFont | Gets a Font instance of the requested font | |
getFont | Gets a Font instance of the requested font | |
loadType1FontFromFile | Loads a Type1 font from an external file and registers it in the document object | |
loadTTFontFromFile | Loads a TrueType font from an external file and register it to a document object | |
loadTTFontFromFile | Loads a TrueType font from an external file (at the selected index) and register it to a document object | |
addPageLabel | Adds a page labeling range for the document | |
useJPFonts | Enables Japanese fonts. After useJPFonts() is involed, an application can use the following Japanese fonts | |
useKRFonts | Enables Korean fonts. After useKRFonts() is involed, an application can use the following Korean fonts | |
useCNSFonts | Enables simplified Chinese fonts. | |
useCNTFonts | Enables traditional Chinese fonts. | |
getEncoder | Gets an instance of a Encoder object by specified encoding name | |
@propertycurrentEncoder | Gets the handle of the current encoder of the document object. The current encoder is set by invoking setCurrentEncoder() and it is used to processing a text when an application invokes setInfoAttr(). The default value of it is null. | |
setCurrentEncoderByName | Sets the current encoder for the document | |
useJPEncodings | Enables Japanese encodings. | |
useKREncodings | Enables Korean encodings. | |
useCNSEncodings | Enables simplified Chinese encodings. | |
useCNTEncodings | Enables traditional Chinese encodings. | |
createOutline | Creates an instance of HaruOutline object. | |
loadPngImageFromFile | Loads an external PNG image file. If deferred is true. then does not load all the data immediately (only size and color properties are loaded). The main data are loaded just before the image object is written to PDF, and the loaded data are deleted immediately. | |
loadRawImageFromFile | Loads an image which has "raw" image format. | |
loadRawImageFromMem | Loads an image which has "raw" image format from buffer. This function loads the data without any conversion. So it is usually faster than the other functions. The formats that loadRawImageFromMem() can load is the same as loadRawImageFromFile() | |
loadJpegImageFromFile | Loads an external JPEG image file | |
setInfoAttr | Sets the text of an info dictionary attribute, using current encoding of the document | |
getInfoAttr | Gets an attribute value from info dictionary. | |
setInfoDateAttr | Sets a datetime attribute in the info dictionary. pdf = the handle of a document object. type = one of the following attributes: | |
setPassword | Sets a password for the document. If the password is set, document contents are encrypted | |
@propertypermission | Set the permission flags for the document | |
setEncryptionMode | Set the encryption mode. As the side effect, ups the version of PDF to 1.4 when the mode is set to HaruEncryptMode.R3 | |
@propertycompressionMode | Set the mode of compression. |