Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
jawsmako.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef JAWSMAKO_H
6#define JAWSMAKO_H
7
8#include <map>
9#include <edl/platform.h>
10#include <edl/iabort.h>
11#include <edl/idomsecurity.h>
13#include <jawsmako/pagelabels.h>
14
34
51
64
132
162
181
200
208
215
216
259
269
270
271#include <jawsmako/types.h>
272#include <jawsmako/interactive.h>
273#include <edl/idompage.h>
274
275namespace JawsMako
276{
277 using namespace EDL;
278
295
305 class IJawsMako : virtual public ISession, virtual public IEDLClassFactory
306 {
307 public:
308 virtual ~IJawsMako() = default;
309
331 static JAWSMAKO_API IJawsMakoPtr create(const U8String &tempDir = U8String(""),
332 const U8String &cacheDir = U8String(""),
333 const CTemporaryStoreParameters &tempStoreParams = CTemporaryStoreParameters(),
334 const std::map<std::string, std::string> &initialParams = std::map<std::string, std::string> ());
335
340 static JAWSMAKO_API void enablePDFInput(const IJawsMakoPtr &jawsMako);
341
346 static JAWSMAKO_API void enablePDFOutput(const IJawsMakoPtr &jawsMako);
347
354 static JAWSMAKO_API void enablePSInput(const IJawsMakoPtr &jawsMako);
355
360 static JAWSMAKO_API void enablePSOutput(const IJawsMakoPtr &jawsMako);
361
366 static JAWSMAKO_API void enableAllFeatures(const IJawsMakoPtr &jawsMako)
367 {
368 enablePDFInput(jawsMako);
369 enablePDFOutput(jawsMako);
370 enablePSInput(jawsMako);
371 enablePSOutput(jawsMako);
372 }
373
374#ifdef __APPLE__
388 virtual void lockOpenFiles(bool lock) = 0;
389#endif
390
396 virtual void freeMemory() = 0;
397
398 #ifdef SWIG
399 %apply uint32_t &OUTPUT { uint32_t &fontIndex };
400 #endif
420 virtual IDOMFontPtr findFont(const U8String &fontName, uint32_t &fontIndex) = 0;
421 #ifdef SWIG
422 %clear uint32_t &fontIndex;
423 #endif
424
442 virtual bool findFont(const U8String &fontName) = 0;
443
456 virtual void setImageDecompressorCacheSize(uint32 decompressorCacheSizeMB) = 0;
457 };
458
465 class IInput : public IRCObject
466 {
467 public:
468 virtual ~IInput() = default;
469
489 static JAWSMAKO_API IInputPtr create(const IJawsMakoPtr &jawsMako, eFileFormat format, const IProgressMonitorPtr &progressMonitor = IProgressMonitorPtr());
490
497 virtual IDocumentAssemblyPtr open(const U8String &pathToFile) = 0;
498
505 virtual IDocumentAssemblyPtr open(const String &pathToFile) = 0;
506
513 virtual IDocumentAssemblyPtr open(const IInputStreamPtr &inputStream) = 0;
514
578 virtual void setSequentialMode(bool sequential) = 0;
579
588 virtual void setParameter(const U8String &param, const U8String &value) = 0;
589 };
590
591
592
599 class IOutput : public IRCObject
600 {
601 public:
602 virtual ~IOutput() = default;
603
620 static JAWSMAKO_API IOutputPtr create(const IJawsMakoPtr &jawsMako, eFileFormat format, const IProgressMonitorPtr &progressMonitor = IProgressMonitorPtr ());
621
622 /*
623 * Configuration
624 */
625
636 virtual void setPreset(const U8String &preset) = 0;
637
647 virtual void setParameter(const U8String &param, const U8String &value) = 0;
648
691 virtual void setAllowedPermissionsFlags(uint32 allowedPermissions) = 0;
692
693
699 virtual void writeAssembly(const IDocumentAssemblyPtr &assembly,
700 const U8String &pathToFile) = 0;
701
708 virtual void writeAssembly(const IDocumentAssemblyPtr &assembly,
709 const String &pathToFile) = 0;
710
716 virtual void writeAssembly(const IDocumentAssemblyPtr &assembly,
717 const IOutputStreamPtr &stream) = 0;
718
728 virtual IOutputWriterPtr openWriter(const IDocumentAssemblyPtr &assembly, const U8String &pathToFile) = 0;
729
737 virtual IOutputWriterPtr openWriter(const IDocumentAssemblyPtr &assembly, const String &pathToFile) = 0;
738
745 virtual IOutputWriterPtr openWriter(const IDocumentAssemblyPtr &assembly, const IOutputStreamPtr &stream) = 0;
746 };
747
748
749
756 {
757 public:
758 virtual ~IOutputWriter() = default;
759
766 virtual void beginDocument(const IDocumentPtr &document) = 0;
767
771 virtual void endDocument() = 0;
772
780 virtual void writePage(const IPagePtr &page) = 0;
781
785 virtual void finish() = 0;
786 };
787
793 {
794 public:
795 virtual ~IDocumentAssembly() = default;
796
804 static JAWSMAKO_API IDocumentAssemblyPtr create(const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor = IProgressMonitorPtr ());
805
813 virtual uint32 getNumDocuments() = 0;
814
821 virtual IDocumentPtr getDocument(uint32 index = 0) = 0;
822
830 virtual bool documentExists(uint32 index) = 0;
831
838 virtual void insertDocument(const IDocumentPtr &document, uint32 index = 0) = 0;
839
845 virtual void removeDocument(uint32 index) = 0;
846
852 virtual void removeDocument(const IDocumentPtr &document) = 0;
853
858 virtual void appendDocument(const IDocumentPtr &document) = 0;
859
864 virtual IDOMJobTkPtr getJobTicket() const = 0;
865
870 virtual void setJobTicket(const IDOMJobTkPtr &jobTicket) = 0;
871
872 #ifdef SWIG
873 %apply uint32_t &OUTPUT { uint32 &docNum };
874 %apply uint32_t &OUTPUT { uint32 &pageNum };
875 #endif
885 virtual void findTarget(DOMid targetId, uint32 &docNum, uint32 &pageNum) = 0;
886 #ifdef SWIG
887 %clear uint32 &docNum;
888 %clear uint32 &pageNum;
889 #endif
890
899 virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference) = 0;
900
901 #ifdef SWIG
902 %apply uint32_t &OUTPUT { uint32 &docNum };
903 %apply uint32_t &OUTPUT { uint32 &pageNum };
904 #endif
915 virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference, uint32 &docNum, uint32 &pageNum) = 0;
916 #ifdef SWIG
917 %clear uint32 &docNum;
918 %clear uint32 &pageNum;
919 #endif
920
926 virtual IDocumentAssemblyPtr clone() = 0;
927
933 virtual IDOMMetadataPtr getJobMetadata() const = 0;
934
939 virtual void setJobMetadata(const IDOMMetadataPtr &metadata) = 0;
940
945 virtual IInputStreamPtr getXmpPacket() const = 0;
946
954 virtual void setXmpPacket(const IInputStreamPtr &xmpPacket) = 0;
955
962 virtual IDOMSecurityInfoPtr getSecurityInfo() const = 0;
963
968 virtual IDOMImagePtr getThumbnail() const = 0;
969
975 virtual void setThumbnail(const IDOMImagePtr &thumbnail) = 0;
976 };
977
978
985 class IDocument : public IRCObject
986 {
987 public:
988 virtual ~IDocument() = default;
989
996 static JAWSMAKO_API IDocumentPtr create(const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor = IProgressMonitorPtr ());
997
1005 virtual uint32 getNumPages() = 0;
1006
1012 virtual IPagePtr getPage(uint32 index = 0) = 0;
1013
1020 virtual bool pageExists(uint32 index) = 0;
1021
1039 virtual void insertPage(const IPagePtr &page, uint32 index = 0, const IDocumentPtr &sourceDocument = IDocumentPtr()) = 0;
1040
1056 virtual void appendPage(const IPagePtr &page, const IDocumentPtr &sourceDocument = IDocumentPtr()) = 0;
1057
1063 virtual void removePage(uint32 index) = 0;
1064
1070 virtual void removePage(const IPagePtr &page) = 0;
1071
1072 #ifdef SWIG
1073 %apply uint32_t &OUTPUT { uint32 &pageNum };
1074 #endif
1082 virtual void findTarget(DOMid targetId, uint32 &pageNum) = 0;
1083 #ifdef SWIG
1084 %clear uint32 &pageNum;
1085 #endif
1086
1094 virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference) = 0;
1095
1096 #ifdef SWIG
1097 %apply uint32_t &OUTPUT { uint32 &pageNum };
1098 #endif
1107 virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference, uint32 &pageNum) = 0;
1108 #ifdef SWIG
1109 %clear uint32 &pageNum;
1110 #endif
1111
1116 virtual IDOMJobTkPtr getJobTicket() const = 0;
1117
1122 virtual void setJobTicket(const IDOMJobTkPtr &jobTicket) = 0;
1123
1131
1136 virtual IOptionalContentPtr getOptionalContent() const = 0;
1137
1142 virtual void setOptionalContent(const IOptionalContentPtr &optionalContent) = 0;
1143
1148 virtual IStructurePtr getStructure() const = 0;
1149
1154 virtual void setStructure(const IStructurePtr &structure) = 0;
1155
1160 virtual IDOMOutlinePtr getOutline() const = 0;
1161
1166 virtual void setOutline(const IDOMOutlinePtr &outline) = 0;
1167
1172 virtual IFormPtr getForm() const = 0;
1173
1178 virtual void setForm(const IFormPtr &form) = 0;
1179
1186
1192 virtual void addEmbeddedStream(const IFileSpecAsEmbeddedDataPtr &embeddedData) = 0;
1193
1199
1206 virtual void addNamedDestination(const INamedDestinationPtr &namedDestination) = 0;
1207
1214 virtual void setNamedDestinations(const CNamedDestinationVect &namedDestinations) = 0;
1215
1220 virtual IThreadsPtr getThreads() const = 0;
1221
1227 virtual IDocumentPtr clone() = 0;
1228
1229 //
1230 // PDF-specific object editing and interrogation
1231 //
1232
1243 virtual IPDFObjectPtr lookupFarReference(const IPDFFarReferencePtr &farReference, IPDFObjectStorePtr &store) = 0;
1244
1251 virtual IPDFObjectStorePtr getObjectStore() = 0;
1252
1261 virtual IPDFObjectPtr readPdfObject(const IPDFReferencePtr &reference) = 0;
1262
1270 virtual IPDFDictionaryPtr readPdfTrailerDictionary() = 0;
1271
1272 };
1273
1279 class IPageRaster : public IRCObject, public IHashable
1280 {
1281 public:
1282
1287 virtual uint32 getWidth () const = 0;
1288
1293 virtual uint32 getHeight () const = 0;
1294
1300 virtual uint32 getResX () const = 0;
1301
1307 virtual uint32 getResY () const = 0;
1308
1313 virtual uint32 getBPC () const = 0;
1314
1319 virtual uint32 getNumComponents () const = 0;
1320
1325 virtual uint32 getRawBytesPerRow () const = 0;
1326
1331 virtual bool isBlank () const = 0;
1332
1337 virtual uint8 *getFrameBuffer () const = 0;
1338
1344 virtual IDOMImagePtr getAsDOMImage () const = 0;
1345
1349 virtual void releaseFrameBuffer () = 0;
1350
1351 };
1353
1361 class IPage : public IRCObject
1362 {
1363 public:
1364 virtual ~IPage() = default;
1365
1371 static JAWSMAKO_API IPagePtr create(const IJawsMakoPtr &jawsMako);
1372
1379 virtual double getWidth() = 0;
1380
1385 virtual double getHeight() = 0;
1386
1394 virtual FRect getCropBox() = 0;
1395
1404 virtual FRect getBleedBox() = 0;
1405
1414 virtual FRect getTrimBox() = 0;
1415
1424 virtual FRect getContentBox() = 0;
1425
1430 virtual int32 getRotate() = 0;
1431
1437 virtual void setRotate(int32 rotate) = 0;
1438
1444 virtual IDOMFixedPagePtr getContent() = 0;
1445
1455 virtual IPageRasterPtr getPageRaster () = 0;
1456
1474 virtual IDOMFixedPagePtr edit() = 0;
1475
1484 virtual void revert() = 0;
1485
1490 virtual bool isLoaded() = 0;
1491
1496 virtual bool isEdited() = 0;
1497
1503 virtual void setMetadataChanged() const = 0;
1504
1509 virtual void setContent(const IDOMFixedPagePtr &content) = 0;
1510
1521 virtual void release() = 0;
1522
1528
1533 virtual void addAnnotation(const IAnnotationPtr &annotation) = 0;
1534
1542 virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference) = 0;
1543
1549 virtual void removeAnnotation(uint32 index) = 0;
1550
1556 virtual void removeAnnotation(const IAnnotationPtr &annotation) = 0;
1557
1561 virtual void removeAnnotations() = 0;
1562
1568 virtual void getTextRuns(CTextRunVect &runs) = 0;
1569
1574 virtual IDOMCatalogPtr getCatalog() const = 0;
1575
1580 virtual DOMid getPageId() = 0;
1581
1587
1592 virtual IDOMJobTkPtr getJobTicket() const = 0;
1593
1598 virtual void setJobTicket(const IDOMJobTkPtr &jobTicket) = 0;
1599
1605 virtual IPagePtr clone() = 0;
1606
1607 //
1608 // PDF-specific object editing and interrogation
1609 //
1610
1622 virtual IPDFObjectPtr lookupFarReference(const IPDFFarReferencePtr &farReference, IPDFObjectStorePtr &store,
1623 const IDocumentPtr &document = IDocumentPtr()) = 0;
1624
1631 virtual IPDFObjectStorePtr getObjectStore() = 0;
1632
1633 //
1634 // PDF-specific Media Box handling
1635 //
1636
1654 virtual FBox getMediaBox() const = 0;
1655
1679 virtual void setMediaBox(const FBox &mediaBox) = 0;
1680
1686 virtual IPageLabelPtr getPageLabel() = 0;
1687
1696 virtual void setPageLabel(const IPageLabelPtr &pageLabel) = 0;
1697
1716 virtual float getUserUnit(bool fixed = false) = 0;
1717 };
1718
1719
1726 {
1727 public:
1728 virtual ~IJawsRenderer() = default;
1729
1736 static JAWSMAKO_API IJawsRendererPtr create(const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor = IProgressMonitorPtr ());
1737
1771 virtual IDOMImagePtr render(const IDOMNodePtr &node, uint32 dpi = 72, uint8 depth = 8,
1772 const IDOMColorSpacePtr &colorSpace = IDOMColorSpacePtr(),
1773 const FRect &bounds = FRect(),
1774 bool maskToInterestingNodes = false,
1775 const CSpotColorNames &retainedSpotColors = CSpotColorNames(),
1776 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
1777 eOptionalContentEvent optionalContentUsage = eOCEView) = 0;
1778
1826 virtual CEDLVector<IDOMImagePtr> renderSeparations(const IDOMNodePtr &node,
1827 const uint8 depth = 8,
1828 const IDOMColorSpacePtr &colorSpace = IDOMColorSpacePtr(),
1829 uint8 antiAliased = 0,
1830 const FRect &bounds = FRect(),
1831 uint32 destWidth = 0,
1832 uint32 destHeight = 0,
1833 const CSpotColorNames &retainedSpotColors = CSpotColorNames(),
1834 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
1835 eOptionalContentEvent optionalContentUsage = eOCEView,
1836 const CU8StringVect &processColorNames = CU8StringVect(),
1837 bool alphaGeneration = false,
1838 uint64 bandMemorySize = 0,
1839 const CSpotColorNames &ignoreSpotColors = CSpotColorNames()) = 0;
1840
1869 {
1870 public:
1871 void *buffer;
1888
1890 {
1891 buffer = nullptr;
1892 bufferOfs = 0;
1893 bufferOfsBits = 0;
1894 rowStride = 0;
1895 pixelStride = 0;
1896 pixelStrideBits = 0;
1897 }
1898
1899 bool operator== (const CFrameBufferInfo &other) const
1900 {
1901 return (other.buffer == buffer)
1902 && (other.bufferOfs == bufferOfs)
1903 && (other.bufferOfsBits == bufferOfsBits)
1904 && (other.rowStride == rowStride)
1905 && (other.pixelStride == pixelStride)
1906 && (other.pixelStrideBits == pixelStrideBits)
1907 ;
1908 }
1909
1910 bool operator!= (const CFrameBufferInfo &other) const
1911 {
1912 return ! (*this == other);
1913 }
1914 };
1915
1917
1971 virtual void renderSeparationsToFrameBuffers(const IDOMNodePtr &node,
1972 uint8 depth,
1973 bool hostEndian,
1974 uint32 destWidth,
1975 uint32 destHeight,
1976 const IDOMColorSpacePtr &colorSpace,
1977 CFrameBufferInfoVect &frameBuffers,
1978 uint8 antiAliased = 0,
1979 const FRect &bounds = FRect(),
1980 const CSpotColorNames &retainedSpotColors = CSpotColorNames(),
1981 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
1982 eOptionalContentEvent optionalContentUsage = eOCEView,
1983 const CU8StringVect &processColorNames = CU8StringVect(),
1984 bool alphaGeneration = false,
1985 uint64 bandMemorySize = 0,
1986 const CSpotColorNames &ignoreSpotColors = CSpotColorNames()) = 0;
1987
1988#ifdef SWIG
1989#if SWIGJAVA
1990 %apply unsigned char *NIOBUFFER { void * buffer };
1991#endif
1992#if SWIGCSHARP
1993 %apply unsigned char INPUT[] { void * buffer };
1994#endif
1995#if SWIGPYTHON
1996 %apply unsigned char INOUT[] { void * buffer };
1997#endif
1998#endif
1999
2028 virtual void renderToFrameBuffer(const IDOMNodePtr &node,
2029 void *buffer,
2030 uint32 stride,
2031 uint32 destWidth,
2032 uint32 destHeight,
2033 const IDOMColorSpacePtr &colorSpace = IDOMColorSpacePtr(),
2034 const FRect &bounds = FRect(),
2035 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
2036 eOptionalContentEvent optionalContentUsage = eOCEView) = 0;
2037#ifdef SWIG
2038 %clear void * buffer;
2039#endif
2040
2041#ifdef SWIG
2042#if SWIGJAVA
2043 %apply unsigned char *NIOBUFFER { void * buffer };
2044#endif
2045#if SWIGCSHARP
2046 %apply unsigned char INPUT[] { void * buffer };
2047#endif
2048#if SWIGPYTHON
2049 %apply unsigned char INOUT[] { void * buffer };
2050#endif
2051#endif
2052
2099 virtual void renderToFrameBufferPadAndReverse(const IDOMNodePtr &node,
2100 void *buffer,
2101 uint32 stride,
2102 uint32 pixelStride,
2103 bool reverseComponents,
2104 uint32 destWidth,
2105 uint32 destHeight,
2106 const IDOMColorSpacePtr &colorSpace = IDOMColorSpacePtr(),
2107 const FRect &bounds = FRect(),
2108 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
2109 eOptionalContentEvent optionalContentUsage = eOCEView) = 0;
2110
2111 #ifdef SWIG
2112 %clear void * buffer;
2113 #endif
2114
2124 virtual IDOMImagePtr renderAntiAliased(const IDOMNodePtr &node,
2125 uint32 dpi = 72,
2126 uint8 quality = 3,
2127 const FRect &bounds = FRect()) = 0;
2128
2137 {
2138 public:
2139 virtual ~IHalftone() {}
2140 };
2141
2149 {
2150 public:
2151 // The frequency must be greater than 0.
2152 CSpotHalftone(float freq, bool useFullResForFlattening = false)
2153 {
2154 frequency = freq;
2155 useFullResolutionForFlattening = useFullResForFlattening;
2156 }
2159 // images occurs is capped at twice the frequency. For some
2160 // content, this may not be appropriate. Set this to true to
2161 // use the full device resolution.
2162 };
2163
2181 {
2182 public:
2183 // Default is CMYK. Resize and set angles to suit
2184 CColorSpotHalftone(float freq, bool useFullResForFlattening = false,
2185 float cyanAngle = 15.0, float magentaAngle = 75.0f, float yellowAngle = 0.0f, float blackAngle = 45.0f)
2186 {
2187 frequency = freq;
2188 useFullResolutionForFlattening = useFullResForFlattening;
2189 angles.resize(4);
2190 angles[0] = cyanAngle;
2191 angles[1] = magentaAngle;
2192 angles[2] = yellowAngle;
2193 angles[3] = blackAngle;
2194 }
2197 // images occurs is capped at twice the frequency. For some
2198 // content, this may not be appropriate. Set this to true to
2199 // use the full device resolution.
2201 };
2202
2211 {
2212 public:
2214 {
2215 width = 0;
2216 height = 0;
2217 }
2218
2222 };
2223
2248
2255 {
2256 public:
2258 {
2259 threshold = thresh;
2260 }
2261
2263 };
2264
2292 {
2293 public:
2295 {
2296 // Default is a simple Atkinson monochrome error diffusion screen
2297 dropSizes = 1;
2298 rows = 3;
2299 columns = 4;
2300 pixelColumn = 1;
2301 denominator = 6;
2302 weights[ 0] = 0; weights[ 1] = 0; weights[ 2] = 1; weights[ 3] = 1; weights[ 4] = 0;
2303 weights[ 5] = 1; weights[ 6] = 1; weights[ 7] = 1; weights[ 8] = 0; weights[ 9] = 0;
2304 weights[10] = 0; weights[11] = 1; weights[12] = 0; weights[13] = 0; weights[14] = 0;
2305 weights[15] = 0; weights[16] = 0; weights[17] = 0; weights[18] = 0; weights[19] = 0;
2306 useSerpentine = false;
2307 perturbation = 0.0f;
2308 }
2309
2318 };
2319
2343 virtual CEDLVector<IDOMImagePtr> renderScreened (const IDOMNodePtr &node, uint32 dpi,
2344 const IHalftone *halftone,
2345 const IDOMColorSpacePtr &colorSpace = IDOMColorSpacePtr(),
2346 const FRect &bounds = FRect(),
2347 const bool useCC = true,
2348 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
2349 eOptionalContentEvent optionalContentUsage = eOCEView) = 0;
2364 virtual IDOMImagePtr renderMonochrome(const IDOMNodePtr &node,
2365 uint32 dpi = 72, const IHalftone *halftone = nullptr,
2366 const IDOMColorSpacePtr &colorSpace = IDOMColorSpacePtr(),
2367 const FRect &bounds = FRect(),
2368 const bool useCC = false
2369 )
2370 {
2371 // Use renderScreened
2372 CSpotHalftone defaultHalftone(60);
2373 const IHalftone *useHalftone = halftone ? halftone : &defaultHalftone;
2374 return renderScreened(node, dpi, useHalftone, colorSpace, bounds, useCC)[0];
2375 }
2376
2377#ifdef SWIG
2378#if SWIGJAVA
2379 %apply char DOUBLEDIM_FIXED[][] { void **buffers };
2380 %apply uint32_t[] { uint32 *strides };
2381#endif
2382#if SWIGCSHARP
2383 %csmethodmodifiers renderScreenedToFrameBuffers "public unsafe";
2384 %apply unsigned char DOUBLEDIM_FIXED[][] { void **buffers };
2385 %apply unsigned int FIXED[] { uint32 *strides };
2386#endif
2387#if SWIGPYTHON
2388 %apply unsigned char DOUBLEDIM_FIXED[][] { void **buffers };
2389 %apply int ARRAY[] { uint32 *strides };
2390#endif
2391#endif
2427 virtual void renderScreenedToFrameBuffers (const IDOMNodePtr &node,
2428 void **buffers, uint32 *strides,
2429 uint32 destWidth,
2430 uint32 destHeight,
2431 const IHalftone *halftone,
2432 const IDOMColorSpacePtr &colorSpace = IDOMColorSpacePtr(),
2433 const FRect &bounds = FRect(),
2434 const bool useCC = true,
2435 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
2436 eOptionalContentEvent optionalContentUsage = eOCEView) = 0;
2437
2438#ifdef SWIG
2439 %clear void **buffers;
2440 %clear uint32 *strides;
2441#endif
2442
2443#ifdef SWIG
2444#if SWIGJAVA
2445 %apply char *BYTE { void *buffer };
2446#endif
2447#if SWIGCSHARP
2448 %apply unsigned char INPUT[] { void * buffer };
2449#endif
2450#if SWIGPYTHON
2451 %apply unsigned char INOUT[] { void * buffer };
2452#endif
2453#endif
2479 void renderMonochromeToFrameBuffer(const IDOMNodePtr &node,
2480 void *buffer, uint32 stride,
2481 uint32 destWidth, uint32 destHeight,
2482 const IHalftone *halftone,
2483 const IDOMColorSpacePtr& colorSpace = IDOMColorSpacePtr(),
2484 const FRect &bounds = FRect(),
2485 const bool useCC = false,
2486 const IOptionalContentPtr &optionalContent = IOptionalContentPtr(),
2487 eOptionalContentEvent optionalContentUsage = eOCEView)
2488 {
2489 // Use renderScreenedToFrameBuffers
2490 renderScreenedToFrameBuffers(node, &buffer, &stride, destWidth, destHeight, halftone, colorSpace,
2491 bounds, useCC, optionalContent, optionalContentUsage);
2492 }
2493 #ifdef SWIG
2494 %clear void * buffer;
2495 #endif
2496
2512 virtual void setEnableTrueTypeNotDef(bool enable) = 0;
2513
2531 virtual void setEnableRasterCompression(bool enable) = 0;
2532
2577 virtual void setBlackPreservation(bool preserveForText, bool preserveForOther) = 0;
2578
2623 virtual void setIgnoreMatchingDeviceIntercept(bool ignoreDeviceIntercept) = 0;
2624
2625 };
2626
2627
2635 {
2636 public:
2637 virtual ~IMediaHandler() = default;
2638
2648 virtual void sizeRequest(const PValue &size, double &pageWidth, double &pageHeight) = 0;
2649 };
2650}
2651
2653#endif
2654
Definition edlvector.h:30
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
Base class Interface for all Reference Counted objects.
Definition ircobject.h:35
EDL session class.
Definition isession.h:21
Allows the temporary storage parameters to be optionally overridden.
Definition types.h:388
A self-contained collection of IDocuments.
Definition jawsmako.h:793
virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference, uint32 &docNum, uint32 &pageNum)=0
Find the annotation with the given annotation reference within the document assembly,...
virtual uint32 getNumDocuments()=0
Return the number of documents in the assembly, if known. Note: For streaming inputs such as PCL/5,...
virtual IDOMSecurityInfoPtr getSecurityInfo() const =0
Get the security information that applied to the source file/stream. Currently only relevant for PDF.
virtual void removeDocument(const IDocumentPtr &document)=0
Remove the given document from the document. If the document is not present, an exception will be rai...
virtual bool documentExists(uint32 index)=0
Determine if a document with the given index exists in the assembly.
virtual IInputStreamPtr getXmpPacket() const =0
Get the PDF XMP packet, if present.
virtual void setXmpPacket(const IInputStreamPtr &xmpPacket)=0
Set the PDF XMP packet, if present. Note that the XMP packet in any PDF output will be modified to ma...
virtual IDOMMetadataPtr getJobMetadata() const =0
Get the job metadata, if present (ie the document properties).
virtual IDocumentPtr getDocument(uint32 index=0)=0
Get the IDocument from the assembly at the given index.
virtual void setJobTicket(const IDOMJobTkPtr &jobTicket)=0
Set the document job ticket.
virtual void findTarget(DOMid targetId, uint32 &docNum, uint32 &pageNum)=0
Find the page containing the target with the given DOMid in the assembly, providing the index of the ...
virtual void removeDocument(uint32 index)=0
Remove the document at the given index.
virtual IDocumentAssemblyPtr clone()=0
Clone an IDocumentAssembly. Will also clone all the documents and pages in the assembly.
static JAWSMAKO_API IDocumentAssemblyPtr create(const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
Create a new, empty document assembly.
virtual IDOMImagePtr getThumbnail() const =0
Get the thumbnail image for the assembly.
virtual IDOMJobTkPtr getJobTicket() const =0
Get the overall job ticket for the entire assembly, if present.
virtual void insertDocument(const IDocumentPtr &document, uint32 index=0)=0
Insert a document into the assembly at the given index.
virtual void setJobMetadata(const IDOMMetadataPtr &metadata)=0
Set the job metadata.
virtual void appendDocument(const IDocumentPtr &document)=0
Append a document to the assembly.
virtual void setThumbnail(const IDOMImagePtr &thumbnail)=0
Sets a new thumbnail image for the document assembly. The image must be in either JPEG or PNG format....
virtual ~IDocumentAssembly()=default
virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference)=0
Find the annotation with the given annotation reference within the document assembly....
A document from an IDocumentAssembly, allowing for high level document and page management,...
Definition jawsmako.h:986
virtual IThreadsPtr getThreads() const =0
Get the document threads, if present.
virtual IPDFObjectStorePtr getObjectStore()=0
Obtain access to the document level object store. Objects which are controlled by formal Mako APIs ma...
virtual void insertPage(const IPagePtr &page, uint32 index=0, const IDocumentPtr &sourceDocument=IDocumentPtr())=0
Insert a page into the document at the given index.
virtual void appendPage(const IPagePtr &page, const IDocumentPtr &sourceDocument=IDocumentPtr())=0
Append a page to the document. If the source document that the page came from is provided:
virtual uint32 getNumPages()=0
Return the number of pages in the document, if known.
virtual IFormPtr getForm() const =0
Get the document interactive form, if present.
virtual IDOMOutlinePtr getOutline() const =0
Get the document outline, if present.
virtual void setOutline(const IDOMOutlinePtr &outline)=0
Set the document outline, if present.
virtual ~IDocument()=default
virtual void removePage(const IPagePtr &page)=0
Remove the given page from the document. If the page is not present, an exception will result.
virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference)=0
Find the annotation with the given annotation reference within the document. Throws an IError if the ...
virtual bool pageExists(uint32 index)=0
Determine if a page with the given index exists in the document.
virtual IPDFObjectPtr lookupFarReference(const IPDFFarReferencePtr &farReference, IPDFObjectStorePtr &store)=0
Attempt to find and resolve an indirect far reference to a PDF object. If found, the object store tha...
virtual void setForm(const IFormPtr &form)=0
Set the document interactive form.
virtual void addNamedDestination(const INamedDestinationPtr &namedDestination)=0
Add a named destination to the document.
virtual void findTarget(DOMid targetId, uint32 &pageNum)=0
Find the page containing the target with the given DOMid in the document, providing the index of the ...
virtual void setJobTicket(const IDOMJobTkPtr &jobTicket)=0
Set the document job ticket.
virtual IDocumentPtr clone()=0
Clone an IDocument. Will also clone all the pages in the document.
virtual void setStructure(const IStructurePtr &structure)=0
Set the structure content for the document.
virtual void removePage(uint32 index)=0
Remove the page at the given index.
virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference, uint32 &pageNum)=0
Find the annotation with the given annotation reference within the document, providing the index of t...
virtual IPagePtr getPage(uint32 index=0)=0
Get the IPage from the document at the given index.
virtual IDOMJobTkPtr getJobTicket() const =0
Get the document job ticket, if present.
virtual IPDFObjectPtr readPdfObject(const IPDFReferencePtr &reference)=0
Raw access to the PDF object database from an original PDF file. For informational purposes only; the...
virtual CNamedDestinationVect getNamedDestinations()=0
Get any named destinations present in the document.
virtual void setOptionalContent(const IOptionalContentPtr &optionalContent)=0
Set the optional content for the document.
virtual void setNamedDestinations(const CNamedDestinationVect &namedDestinations)=0
Replace the named destinations in the document with the given vector.
static JAWSMAKO_API IDocumentPtr create(const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
Create an empty document.
virtual IStructurePtr getStructure() const =0
Get the structure information if present.
virtual CFileSpecAsEmbeddedDataVect getEmbeddedStreams()=0
Get any embedded streams or attachments attached to the document. This is currently a PDF-specific fe...
virtual IPDFDictionaryPtr readPdfTrailerDictionary()=0
Raw access to the PDF trailer dictionary. For informational purposes only; the object returned from t...
virtual IOptionalContentPtr getOptionalContent() const =0
Get the optional content if present.
virtual COutputIntentVect getOutputIntents() const =0
Get the output intents, if present. A PDF may have more than one output intent; for standards such as...
virtual void addEmbeddedStream(const IFileSpecAsEmbeddedDataPtr &embeddedData)=0
Add an embedded file stream to the document. This is currently a PDF-specific feature.
Simple interface to provide a consistent hashing method for Mako objects.
Definition hashable.h:25
Abstract input source that can open files from disk or a stream and create an IDocumentAssembly for t...
Definition jawsmako.h:466
virtual IDocumentAssemblyPtr open(const IInputStreamPtr &inputStream)=0
Open a stream, returning the IDocumentAssembly representing the contents.
virtual ~IInput()=default
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....
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...
virtual IDocumentAssemblyPtr open(const U8String &pathToFile)=0
Open a file on disk, returning the IDocumentAssembly representing the contents.
virtual void setSequentialMode(bool sequential)=0
Set/unset sequential mode on this input.
virtual IDocumentAssemblyPtr open(const String &pathToFile)=0
Open a file on disk, returning the IDocumentAssembly representing the contents. Takes a wide characte...
An instance of the IJawsMako library. Only one instance of this object is currently allowed....
Definition jawsmako.h:306
static JAWSMAKO_API void enablePDFOutput(const IJawsMakoPtr &jawsMako)
Enable PDF Output for JawsMako.
static JAWSMAKO_API void enablePSInput(const IJawsMakoPtr &jawsMako)
Enable PostScript Input for JawsMako.
static JAWSMAKO_API void enablePSOutput(const IJawsMakoPtr &jawsMako)
Enable PostScript Output for JawsMako.
virtual void freeMemory()=0
Inform JawsMako that system memory is being exhausted. This will cause JawsMako to free up cached inf...
virtual ~IJawsMako()=default
virtual IDOMFontPtr findFont(const U8String &fontName, uint32_t &fontIndex)=0
Find a font from the system fonts, and the font index if applicable.
static JAWSMAKO_API void enablePDFInput(const IJawsMakoPtr &jawsMako)
Enable PDF Input for JawsMako.
virtual void setImageDecompressorCacheSize(uint32 decompressorCacheSizeMB)=0
Set the maximum size of the image decompressor cache in megabytes.
static JAWSMAKO_API void enableAllFeatures(const IJawsMakoPtr &jawsMako)
Enable all JawsMako features.
Definition jawsmako.h:366
virtual bool findFont(const U8String &fontName)=0
Check to see if a system font with the given name is available.
CEDLVector< float > angles
The vector of angles to use.
Definition jawsmako.h:2200
float frequency
The halftone frequency in LPI to be used.
Definition jawsmako.h:2195
bool useFullResolutionForFlattening
Normally, the resolution at which flattening for transparent.
Definition jawsmako.h:2196
CColorSpotHalftone(float freq, bool useFullResForFlattening=false, float cyanAngle=15.0, float magentaAngle=75.0f, float yellowAngle=0.0f, float blackAngle=45.0f)
Definition jawsmako.h:2184
CEDLVector< CEDLVector< uint8 > > thresholdArrays
The threshold arrays. Must be width x height bytes in size, and no larger than 65535 bytes.
Definition jawsmako.h:2246
uint32 height
the height of the halftone cell in pixels
Definition jawsmako.h:2245
uint32 width
The width of the halftone cell in pixels.
Definition jawsmako.h:2244
CColorThresholdArrayHalftone()
Definition jawsmako.h:2238
uint8 columns
The number of columns in the error weighting matrix - 4 maximum.
Definition jawsmako.h:2312
uint8 pixelColumn
The pixel column.
Definition jawsmako.h:2313
CEDSHalftone()
Definition jawsmako.h:2294
uint8 weights[20]
The weight matrix; maximum of 20 entries (5 x 4)
Definition jawsmako.h:2315
uint32 denominator
The denominator parameter, set to the sum of the weights.
Definition jawsmako.h:2314
uint8 rows
The number of rows in the error weighting matrix - 5 maximum.
Definition jawsmako.h:2311
bool useSerpentine
If true, the algorithm reverses scanning direction with each alternate scanline to reduce pattern art...
Definition jawsmako.h:2316
float perturbation
The weight of random perturbation to appy to each pre-screened pixel which may reduce pattern artifac...
Definition jawsmako.h:2317
uint8 dropSizes
The number of distinct drop sizes to produce (not including white). Please refer to the class descrip...
Definition jawsmako.h:2310
int32 pixelStride
Definition jawsmako.h:1879
int8 pixelStrideBits
Definition jawsmako.h:1884
bool operator==(const CFrameBufferInfo &other) const
Definition jawsmako.h:1899
uint8 bufferOfsBits
Definition jawsmako.h:1873
void * buffer
Pointer to the frame buffer.
Definition jawsmako.h:1871
CFrameBufferInfo()
Definition jawsmako.h:1889
uint32 bufferOfs
Offset to the byte containing the first first pixel to be written to.
Definition jawsmako.h:1872
bool operator!=(const CFrameBufferInfo &other) const
Definition jawsmako.h:1910
int32 rowStride
Definition jawsmako.h:1877
Description of a simple spot halftone, at 45 degrees, using Jaws's default spot function....
Definition jawsmako.h:2149
bool useFullResolutionForFlattening
Normally, the resolution at which flattening for transparent.
Definition jawsmako.h:2158
CSpotHalftone(float freq, bool useFullResForFlattening=false)
Definition jawsmako.h:2152
float frequency
The frequency of the spot function, in lines per inch.
Definition jawsmako.h:2157
uint32 width
The width of the halftone cell in pixels.
Definition jawsmako.h:2219
CThresholdArrayHalftone()
Definition jawsmako.h:2213
CEDLVector< uint8 > thresholdArray
The threshold array. Must be width x height bytes in size, and no larger than 65535 bytes.
Definition jawsmako.h:2221
uint32 height
the height of the halftone cell in pixels
Definition jawsmako.h:2220
uint8 threshold
Range is 8 bits, 1 to 254 inclusive.
Definition jawsmako.h:2262
CThresholdHalftone(uint8 thresh=127)
Definition jawsmako.h:2257
An abstract base class for communicating halftone information to the Jaws renderer,...
Definition jawsmako.h:2137
virtual ~IHalftone()
Definition jawsmako.h:2139
A renderer that uses the Jaws RIP to create images from arbitrary DOM.
Definition jawsmako.h:1726
virtual IDOMImagePtr renderAntiAliased(const IDOMNodePtr &node, uint32 dpi=72, uint8 quality=3, const FRect &bounds=FRect())=0
Render a node to an antialiased, DeviceRGB image suitable for display, using supersampling.
virtual void setEnableTrueTypeNotDef(bool enable)=0
Enable the use of a True Type font's /.notdef glyph in the output.
virtual void setBlackPreservation(bool preserveForText, bool preserveForOther)=0
Enable/control 100% black preservation.
CEDLVector< CFrameBufferInfo > CFrameBufferInfoVect
Definition jawsmako.h:1916
virtual void setIgnoreMatchingDeviceIntercept(bool ignoreDeviceIntercept)=0
Allow intercept color spaces for a matching Device space to be ignored.
void renderMonochromeToFrameBuffer(const IDOMNodePtr &node, void *buffer, uint32 stride, uint32 destWidth, uint32 destHeight, const IHalftone *halftone, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), const FRect &bounds=FRect(), const bool useCC=false, const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView)
Convenience Render a node to a 1-bit monochrome frame buffer.
Definition jawsmako.h:2479
virtual void setEnableRasterCompression(bool enable)=0
Enable the use of compression for compressed output.
virtual void renderToFrameBuffer(const IDOMNodePtr &node, void *buffer, uint32 stride, uint32 destWidth, uint32 destHeight, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), const FRect &bounds=FRect(), const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView)=0
Render a node to a supplied frame buffer, at 8 bits per component.
virtual CEDLVector< IDOMImagePtr > renderSeparations(const IDOMNodePtr &node, const uint8 depth=8, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), uint8 antiAliased=0, const FRect &bounds=FRect(), uint32 destWidth=0, uint32 destHeight=0, const CSpotColorNames &retainedSpotColors=CSpotColorNames(), const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView, const CU8StringVect &processColorNames=CU8StringVect(), bool alphaGeneration=false, uint64 bandMemorySize=0, const CSpotColorNames &ignoreSpotColors=CSpotColorNames())=0
Render a node to a set of separated images, with optional antialiasing. For ease of use,...
virtual IDOMImagePtr render(const IDOMNodePtr &node, uint32 dpi=72, uint8 depth=8, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), const FRect &bounds=FRect(), bool maskToInterestingNodes=false, const CSpotColorNames &retainedSpotColors=CSpotColorNames(), const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView)=0
Render a node to an image.
virtual CEDLVector< IDOMImagePtr > renderScreened(const IDOMNodePtr &node, uint32 dpi, const IHalftone *halftone, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), const FRect &bounds=FRect(), const bool useCC=true, const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView)=0
Render a node to a screened result, in monochrome or CMYK returning one image per colorant.
virtual void renderToFrameBufferPadAndReverse(const IDOMNodePtr &node, void *buffer, uint32 stride, uint32 pixelStride, bool reverseComponents, uint32 destWidth, uint32 destHeight, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), const FRect &bounds=FRect(), const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView)=0
As per renderToFrameBuffer, but allowing for pixel byte order and padding control.
static JAWSMAKO_API IJawsRendererPtr create(const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
Create a Jaws renderer instance.
virtual void renderScreenedToFrameBuffers(const IDOMNodePtr &node, void **buffers, uint32 *strides, uint32 destWidth, uint32 destHeight, const IHalftone *halftone, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), const FRect &bounds=FRect(), const bool useCC=true, const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView)=0
Render a node to a 1-bit monochrome frame buffer, a series of three 1-bit frame buffers for RGB,...
virtual ~IJawsRenderer()=default
virtual void renderSeparationsToFrameBuffers(const IDOMNodePtr &node, uint8 depth, bool hostEndian, uint32 destWidth, uint32 destHeight, const IDOMColorSpacePtr &colorSpace, CFrameBufferInfoVect &frameBuffers, uint8 antiAliased=0, const FRect &bounds=FRect(), const CSpotColorNames &retainedSpotColors=CSpotColorNames(), const IOptionalContentPtr &optionalContent=IOptionalContentPtr(), eOptionalContentEvent optionalContentUsage=eOCEView, const CU8StringVect &processColorNames=CU8StringVect(), bool alphaGeneration=false, uint64 bandMemorySize=0, const CSpotColorNames &ignoreSpotColors=CSpotColorNames())=0
As per renderSeparations(), but targeting a set of frame buffers, described by a vector CFrameBufferI...
virtual IDOMImagePtr renderMonochrome(const IDOMNodePtr &node, uint32 dpi=72, const IHalftone *halftone=nullptr, const IDOMColorSpacePtr &colorSpace=IDOMColorSpacePtr(), const FRect &bounds=FRect(), const bool useCC=false)
Convenience - Render a node to a 1-bit monochrome image.
Definition jawsmako.h:2364
Interface allowing users of supported input types to monitor/handle unsatisfied media requests....
Definition jawsmako.h:2635
virtual void sizeRequest(const PValue &size, double &pageWidth, double &pageHeight)=0
Invoked by the input when the media size is unknown.
virtual ~IMediaHandler()=default
Abstract output sink that can output DOM to a file or stream in a given output format.
Definition jawsmako.h:600
virtual IOutputWriterPtr openWriter(const IDocumentAssemblyPtr &assembly, const String &pathToFile)=0
Create an output writer for the given assembly, targeting a file on disk. As above,...
virtual void writeAssembly(const IDocumentAssemblyPtr &assembly, const U8String &pathToFile)=0
Write the given document assembly to a file on disk.
virtual ~IOutput()=default
virtual void setPreset(const U8String &preset)=0
Configure the output according to a general preset. Please see the supplied documentation for details...
virtual IOutputWriterPtr openWriter(const IDocumentAssemblyPtr &assembly, const U8String &pathToFile)=0
Create an output writer for the given assembly, targeting a file on disk. This is designed to allow s...
virtual void writeAssembly(const IDocumentAssemblyPtr &assembly, const String &pathToFile)=0
Write the given document assembly to a file on disk, specified by a wide character string.
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....
virtual void setAllowedPermissionsFlags(uint32 allowedPermissions)=0
Control whether assemblies with certain security permission flags are allowed to be written by this o...
static JAWSMAKO_API IOutputPtr create(const IJawsMakoPtr &jawsMako, eFileFormat format, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
Create an output for writing source in the given format.
virtual IOutputWriterPtr openWriter(const IDocumentAssemblyPtr &assembly, const IOutputStreamPtr &stream)=0
Create an output writer for the given assembly, targeting a stream.
virtual void writeAssembly(const IDocumentAssemblyPtr &assembly, const IOutputStreamPtr &stream)=0
Write the given document assembly to a stream.
A writer for writing individual pages and documents to an output in piecemeal fashion.
Definition jawsmako.h:756
virtual void endDocument()=0
Finish a document.
virtual void beginDocument(const IDocumentPtr &document)=0
Begin a document. This document need not be completely populated with pages.
virtual void finish()=0
Finish output and flush the results.
virtual void writePage(const IPagePtr &page)=0
Write a page to the output.
virtual ~IOutputWriter()=default
A page from an IDocument, allowing high level page management, and providing on-demand access to page...
Definition jawsmako.h:1362
virtual COutputIntentVect getOutputIntents()=0
Get the output intents, if present.
virtual IDOMFixedPagePtr edit()=0
Mark the page as edited, returning the editable IDOMFixedPage. Do this before attempting to edit the ...
virtual DOMid getPageId()=0
Get the Id of the page.
virtual void release()=0
Release the reference to the page content, if possible. If a page is not edited, and the original sou...
virtual double getWidth()=0
Get the page (media) width of the page. This does not require the page contents to be loaded.
virtual void setMetadataChanged() const =0
Let the page know that the content metadata has changed. For example if either of the MediaBox,...
virtual IDOMFixedPagePtr getContent()=0
Return a smart pointer to the IDOMFixedPage, loading it from the source document if necessary.
virtual IDOMJobTkPtr getJobTicket() const =0
Get the page job ticket, if present.
virtual float getUserUnit(bool fixed=false)=0
Get the PDF UserUnit.
virtual IPDFObjectStorePtr getObjectStore()=0
Obtain access to the page level object store. Objects which are controlled by formal Mako APIs may no...
virtual IAnnotationPtr findAnnotation(const IAnnotationReferencePtr &reference)=0
Find the annotation with the given annotation reference within the page. Throws an IError if the targ...
virtual ~IPage()=default
virtual IPagePtr clone()=0
Clone an IPage. For edited pages, this will clone the DOM tree.
virtual FRect getTrimBox()=0
Get the TrimBox for this page. The TrimBox is a rectangle defining the intended dimensions of the fin...
virtual IPDFObjectPtr lookupFarReference(const IPDFFarReferencePtr &farReference, IPDFObjectStorePtr &store, const IDocumentPtr &document=IDocumentPtr())=0
Attempt to find and resolve an indirect far reference to a PDF object. If found, the object store tha...
virtual FBox getMediaBox() const =0
Obtain the PDF media box for this page.
virtual void removeAnnotation(const IAnnotationPtr &annotation)=0
Remove the given annotation from the page. If the page is not present, an exception will be thrown.
virtual bool isEdited()=0
Has the page been edited? That is, has the DOM been fetched?
virtual void setContent(const IDOMFixedPagePtr &content)=0
Replace the content with the given fixed page.
virtual IPageLabelPtr getPageLabel()=0
Get the page label.
virtual IDOMCatalogPtr getCatalog() const =0
Get the IDOMCatalog associated with this page.
virtual void setPageLabel(const IPageLabelPtr &pageLabel)=0
Set the page label.
virtual IPageRasterPtr getPageRaster()=0
Return a smart pointer to the IPageRaster, loading it from the source document if necessary....
static JAWSMAKO_API IPagePtr create(const IJawsMakoPtr &jawsMako)
Create an empty page.
virtual FRect getContentBox()=0
Get the ContentBox for this page. The ContentBox (also known as an ArtBox) is a rectangle defining th...
virtual void getTextRuns(CTextRunVect &runs)=0
Get the page's text runs. Text present in Tiling brushes will not be returned.
virtual int32 getRotate()=0
Get the view rotation for the page, in degrees clockwise.
virtual void removeAnnotation(uint32 index)=0
Remove the annotation at the given index.
virtual void removeAnnotations()=0
Remove all the annotations from the page.
virtual void setRotate(int32 rotate)=0
Set the view rotation for the page, in degrees clockwise. Must be a multiple of 90 degrees.
virtual FRect getCropBox()=0
Get the CropBox for this page. The CropBox is a rectangle defining the visible region of the page.
virtual void setJobTicket(const IDOMJobTkPtr &jobTicket)=0
Set the page job ticket.
virtual void revert()=0
Revert any edits to a page and mark the page as non-edited if possible.
virtual CAnnotationVect getAnnotations()=0
Get the annotations for the page, as a vector.
virtual void setMediaBox(const FBox &mediaBox)=0
Set the PDF media box for this page.
virtual FRect getBleedBox()=0
Get the BleedBox for this page. The BleedBox is a rectangle defining the region to which the contents...
virtual void addAnnotation(const IAnnotationPtr &annotation)=0
Add the given annotation.
virtual double getHeight()=0
Get the page (media) height of the page.
virtual bool isLoaded()=0
Has the page been loaded? That is, has the DOM been fetched?
A rasterized equivalent of a page from an IDocument.
Definition jawsmako.h:1280
virtual uint32 getNumComponents() const =0
Get the number of component per pixel.
virtual uint8 * getFrameBuffer() const =0
Get the address the raw frame buffer.
virtual bool isBlank() const =0
Return true if the page is unmarked.
virtual uint32 getRawBytesPerRow() const =0
Get the number of bytes per row.
virtual IDOMImagePtr getAsDOMImage() const =0
Return an IDOMImage equivalent of the raster image.
virtual uint32 getResY() const =0
Get the resolution of the raster image along the Y-axis.
virtual uint32 getResX() const =0
Get the resolution of the raster image along the X-axis.
virtual uint32 getWidth() const =0
Get the width of the raster image.
virtual void releaseFrameBuffer()=0
Release the frame buffer for this raster.
virtual uint32 getBPC() const =0
Get the number of bits per component.
virtual uint32 getHeight() const =0
Get the height of the raster image.
Stores a "property" value that is tagged with an enumeration value that indicates the underlying type...
Definition edlproperty.h:31
BoxTmpl< double > FBox
Definition edlgeom.h:441
RectTmpl< double > FRect
Definition edlgeom.h:338
unsigned int uint32
Definition edltypes.h:34
_BEGIN_HQN_NAMESPACE typedef signed char int8
Definition edltypes.h:27
unsigned long long uint64
Definition edltypes.h:35
signed int int32
Definition edltypes.h:29
unsigned char uint8
Definition edltypes.h:32
EDL::uint64 DOMid
Type used to uniquely idenitify a DOM node.
Definition idomid.h:17
static JAWSMAKO_API IJawsMakoPtr create(const U8String &tempDir=U8String(""), const U8String &cacheDir=U8String(""), const CTemporaryStoreParameters &tempStoreParams=CTemporaryStoreParameters(), const std::map< std::string, std::string > &initialParams=std::map< std::string, std::string >())
Create an IJawsMako instance. Only one may be created at any one time.
EDLSysString U8String
A UTF-8 String.
Definition types.h:144
EDLString String
A wide character string (UTF-16 on Windows, UTF-32 on all other platforms)
Definition types.h:138
Progress monitoring, event handling and abort signalling.
CEDLVector< IFileSpecAsEmbeddedDataPtr > CFileSpecAsEmbeddedDataVect
Definition ifilespec.h:240
JawsMako interactive features.
Definition apexcustompostprocess.h:17
eFileFormat
Definition jawsmako.h:281
@ eFFPPML
PPML.
Definition jawsmako.h:290
@ eFFEPS
Encapsulated PostScript.
Definition jawsmako.h:285
@ eFFPS
PostScript.
Definition jawsmako.h:284
@ eFFPRN
PRN.
Definition jawsmako.h:292
@ eFFPDF
PDF.
Definition jawsmako.h:282
@ eFFSVG
SVG.
Definition jawsmako.h:286
@ eFFXPS
XPS.
Definition jawsmako.h:283
@ eFFUnknown
None of the above.
Definition jawsmako.h:293
@ eFFIJPDS
IJPDS.
Definition jawsmako.h:289
@ eFFOXPS
OpenXPS.
Definition jawsmako.h:291
@ eFFPCL5
PCL5.
Definition jawsmako.h:287
@ eFFPCLXL
PCL/XL.
Definition jawsmako.h:288
CEDLVector< INamedDestinationPtr > CNamedDestinationVect
Definition types.h:176
EDL::IProgressMonitorPtr IProgressMonitorPtr
Definition types.h:85
CEDLSysStringVect CU8StringVect
Definition types.h:167
eOptionalContentEvent
Optional content Event types.
Definition types.h:193
@ eOCEView
View.
Definition types.h:195
CEDLVector< U8String > CSpotColorNames
Definition types.h:169
CEDLVector< IAnnotationPtr > CAnnotationVect
Definition interactive.h:70
CEDLVector< ITextRunPtr > CTextRunVect
Definition types.h:171
CEDLVector< IOutputIntentPtr > COutputIntentVect
Definition types.h:173
Platform-dependent defines, enumerations, types etc. that are visible through the EDL API.
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211
#define JAWSMAKO_API
Definition types.h:29