Aurelon Open API 8.1.1
|
PDF Document. More...
Public Member Functions | |
AOI_Document (AOI_Instance *) | |
void | Open (const aur::ACPL::FileSpec &path, const char *ownerPassword=NULL, const char *userPassword=NULL) |
void | CloseFile (bool keepVM, bool createDefaults) |
ExceptionCode | SaveAsPDF (const aur::ACPL::FileSpec &path) |
uint32_t | GetPageCount () const |
AOI_Page * | GetPage (uint32_t) const |
bool | TraverseNext (AOI_Object *&) const |
AOI_ColorSpacePtr | GetDocumentColorSpace () const |
AOI_ColorSpacePtr | GetLabColorSpace () const |
AOI_ColorSpacePtr | GetDeviceGrayColorSpace () const |
AOI_ColorSpacePtr | GetDeviceRGBColorSpace () const |
AOI_ColorSpacePtr | GetDeviceCMYKColorSpace () const |
bool | BlackAndWhiteDoc () const |
bool | FontExists (bool onlyUsed) const |
SpotColorName * | GetSpotColorList () |
AOI_Object * | HitTest (AOI_Point p, int16_t snapDistance, bool &stroke, AOI_Color *outColor=NULL) |
PDF Document.
Definition at line 34 of file AOI_Document.h.
AOI_Document::AOI_Document | ( | AOI_Instance * | instance | ) |
Constructs a new empty AOI_Document document. This document can be used to open a file using the Open method or for the method ConvertPStoPDF.
instance | AOI_Instance object used by this thread. |
Definition at line 142 of file AOI_Document.cpp.
bool AOI_Document::BlackAndWhiteDoc | ( | ) | const |
Checks if the document contains only black & white, gray or DeviceN( black ) colorspaces and thus no color.
Definition at line 464 of file AOI_Document.cpp.
void AOI_Document::CloseFile | ( | bool | keepVM, |
bool | createDefaults ) |
Closes the document.
Definition at line 663 of file AOI_Document.cpp.
bool AOI_Document::FontExists | ( | bool | onlyUsed | ) | const |
Checks if the document contains fonts.
Definition at line 508 of file AOI_Document.cpp.
AOI_ColorSpacePtr AOI_Document::GetDeviceCMYKColorSpace | ( | ) | const |
Returns the only instance of the DeviceCMYK colorspace. This colorspace can exist only once in the scope of a document and must be retrieved using this method.
Definition at line 389 of file AOI_Document.cpp.
AOI_ColorSpacePtr AOI_Document::GetDeviceGrayColorSpace | ( | ) | const |
Returns the only instance of the DeviceGray colorspace. This colorspace can exist only once in the scope of a document and must be retrieved using this method.
Definition at line 363 of file AOI_Document.cpp.
AOI_ColorSpacePtr AOI_Document::GetDeviceRGBColorSpace | ( | ) | const |
Returns the only instance of the DeviceRGB colorspace. This colorspace can exist only once in the scope of a document and must be retrieved using this method.
Definition at line 376 of file AOI_Document.cpp.
AOI_ColorSpacePtr AOI_Document::GetDocumentColorSpace | ( | ) | const |
Returns the colorspace of the document. This call may result in a NULL pointer when no document colorspace is defined. Document colorspaces are commonly defined when a PDF/X output intent is set, in such document this call returns the document ICC profile colorspace.
Definition at line 337 of file AOI_Document.cpp.
AOI_ColorSpacePtr AOI_Document::GetLabColorSpace | ( | ) | const |
Returns the only instance of the CIELab colorspace. This colorspace can exist only once in the scope of a document and must be retrieved using this method.
Definition at line 350 of file AOI_Document.cpp.
AOI_PagePtr AOI_Document::GetPage | ( | uint32_t | pageNr | ) | const |
Returns a page object that holds the page with the given page number. A call to this method might cause some delay because the first time the page is accessed is the first time the page is parsed from PDF. The second time access is much faster.
pageNr | Page number to access. 0 based. |
Definition at line 304 of file AOI_Document.cpp.
uint32_t AOI_Document::GetPageCount | ( | ) | const |
Returns the number of pages in the document.
Definition at line 289 of file AOI_Document.cpp.
SpotColorName * AOI_Document::GetSpotColorList | ( | ) |
Builds the list of spot colors with the last entry pointing to NULL. The pointers in the list are valid until the next operation in this document.
The spot colors listed are only the ones available in the pages that where visited.
Definition at line 577 of file AOI_Document.cpp.
AOI_Object * AOI_Document::HitTest | ( | AOI_Point | p, |
int16_t | snapDistance, | ||
bool & | stroke, | ||
AOI_Color * | outHitColor = NULL ) |
Determines the top object that is at the given location. From the object the color is returned. If the object is an image a pixel is sampled and if the object contains a shading the shading is sampled.
The resulting color is without transparency and blending effects applied.
This method relies on an AOI_Renderer to be setup and connected to the document. As this routine is used for hit testing mouse clicks for example the screen view renderer should be used.
p | AOI_Point defining the location to check relative to the page coordinates. |
snapDistance | Amount of pixels that will snap to an object. The pixels are related to the current renderer setup. |
stroke | Returns if the objects its stroke or fill is hit. True when the stroke is hit. |
outHitColor | Pointer to the color structure to receive the color of the object at the hit location. If NULL is provided then no color is returned. |
Definition at line 631 of file AOI_Document.cpp.
void AOI_Document::Open | ( | const aur::ACPL::FileSpec & | path, |
const char * | ownerPassword = NULL, | ||
const char * | userPassword = NULL ) |
Opens a document. The document can be any of the file types the license allows. PDF is always allowed.
path | Unicode encoded path to the document to open. |
ownerPassword | Optional owner password to decrypt and modify the PDF file. |
userPassword | Optional user password to decrypt and view the PDF file. |
Definition at line 196 of file AOI_Document.cpp.
ExceptionCode AOI_Document::SaveAsPDF | ( | const aur::ACPL::FileSpec & | path | ) |
Save the document in PDF 1.4 format to the given location. The file will be created. An existing file will be overwritten.
Requires PDF option in the license.
path | Path to the output PDF to be created. If not existing it will be created. The underlying directory must exist. |
Definition at line 553 of file AOI_Document.cpp.
bool AOI_Document::TraverseNext | ( | AOI_Object *& | object | ) | const |
Retrieves the next object in the current page. The current page is set using GetPage. The first call must supply a object pointer that point to NULL. This will make the method return the first object in the tree. For subsequent calls pass the object pointer retrieved from the previous call.
object | At input pointer to the previous object and NULL for the first call. At ouput the next object in the tree and NULL if the end is reached. |
Definition at line 321 of file AOI_Document.cpp.