Loading...
Searching...
No Matches
Print.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFPrint
6#define PDFTRON_H_CPPPDFPrint
7
8#include <PDF/PDFDoc.h>
9#include <C/PDF/TRN_Print.h>
10#include <SDF/Obj.h>
11#include <SDF/ObjSet.h>
12#include <PDF/PageSet.h>
13
14namespace pdftron{
15 namespace PDF {
16
21class PrinterMode; // forward declaration
22
23class Print {
24public:
25
26
48 static void StartPrintJob(
49 PDFDoc & in_pdfdoc,
50 const UString & in_printerName,
51 const UString & in_jobName,
52 const UString & in_outputFileName,
53 PageSet * in_pagesToPrint = NULL,
54 PrinterMode * in_printerMode = NULL,
55 volatile bool * in_cancel = NULL,
56 OCG::Context * in_context = NULL);
57
81 static void StartPrintJob(
82 PDFDoc & in_pdfdoc,
83 const char * in_printerName,
84 const char * in_jobName,
85 const char * in_outputFileName,
86 PageSet * in_pagesToPrint = NULL,
87 PrinterMode * in_printerMode = NULL,
88 volatile bool * in_cancel = NULL,
89 OCG::Context * in_context = NULL);
90
91
92};
93
94
95
101{
102public:
226 };
227
235
243
250
257
264
275
284
291
292
295
302 void SetAutoCenter(bool autoCenter);
303
310 void SetAutoRotate(bool autoRotate);
311
319 void SetCollation( bool collation );
320
327 void SetCopyCount( int copyCount );
328
336 void SetDPI( int dpi );
337
345
357
370 void SetNUp(unsigned int x, unsigned int y, NUpPageOrder pageOrder = e_PageOrder_LeftToRightThenTopToBottom);
371
378 void SetOrientation(Orientation orientation);
379
388
400
409
417 void SetOutputPageBorder(bool printBorder);
418
425 void SetPaperSize(const Rect & size = Rect(0, 0, 612, 791) );
426
432
441 void SetScale(double scale);
442
449 void SetScaleType(ScaleType scaleType);
450
458 void SetUseRleImageCompression( bool useRleImageCompression );
459
460
461 // @cond PRIVATE_DOC
462
463 #ifndef SWIGHIDDEN
464 SDF::Obj m_printerMode;
465 #endif
466 // @endcond PRIVATE_DOC
467
468private:
469 SDF::ObjSet m_printerModeSet;
470};
471
472 }; // namespace PDF
473}; // namespace pdftron
474
475#include <Impl/Print.inl>
476
477#endif // PDFTRON_H_CPPPDFPrint
static void StartPrintJob(PDFDoc &in_pdfdoc, const char *in_printerName, const char *in_jobName, const char *in_outputFileName, PageSet *in_pagesToPrint=NULL, PrinterMode *in_printerMode=NULL, volatile bool *in_cancel=NULL, OCG::Context *in_context=NULL)
static void StartPrintJob(PDFDoc &in_pdfdoc, const UString &in_printerName, const UString &in_jobName, const UString &in_outputFileName, PageSet *in_pagesToPrint=NULL, PrinterMode *in_printerMode=NULL, volatile bool *in_cancel=NULL, OCG::Context *in_context=NULL)
void SetPaperSize(pdftron::PDF::PrinterMode::PaperSize paperSize)
ScaleType
Enumerated values for specifying the scaling of document pages.
Definition Print.h:259
@ e_ScaleType_ReduceToOutputPage
shrink to fit the output page
Definition Print.h:262
@ e_ScaleType_FitToOutputPage
fit to the output page
Definition Print.h:261
@ e_ScaleType_None
no scaling
Definition Print.h:260
void SetPaperSize(const Rect &size=Rect(0, 0, 612, 791))
void SetUseRleImageCompression(bool useRleImageCompression)
void SetOutputAnnot(PrintContentTypes printContent)
Orientation
Enumerated values for specifying the orientation of output pages.
Definition Print.h:253
@ e_Orientation_Portrait
taller than wide
Definition Print.h:254
@ e_Orientation_Landscape
wider than tall
Definition Print.h:255
void SetScale(double scale)
void SetScaleType(ScaleType scaleType)
void SetDuplexing(DuplexMode mode)
DuplexMode
Enumerated values for specifying how the printed pages are flipped when duplexing.
Definition Print.h:229
@ e_Duplex_ShortSide
flip the paper along the short side
Definition Print.h:233
@ e_Duplex_None
single-sided printing
Definition Print.h:231
@ e_Duplex_LongSide
flip the paper along the long side
Definition Print.h:232
@ e_Duplex_Auto
use the current printer setting
Definition Print.h:230
void SetOutputColor(OutputColor color)
void SetCopyCount(int copyCount)
void SetAutoRotate(bool autoRotate)
OutputQuality
Enumerated values for specifying the quality of the printing.
Definition Print.h:237
@ e_OutputQuality_Medium
printer medium quality mode
Definition Print.h:240
@ e_OutputQuality_High
printer high quality mode
Definition Print.h:241
@ e_OutputQuality_Low
printer low quality mode
Definition Print.h:239
@ e_OutputQuality_Draft
printer draft mode
Definition Print.h:238
void SetCollation(bool collation)
@ e_NUp_3_2
3 by 2 document pages to 1 output page
Definition Print.h:271
@ e_NUp_2_1
2 document pages to 1 output page
Definition Print.h:269
@ e_NUp_3_3
3 by 3 document pages to 1 output page
Definition Print.h:272
@ e_NUp_2_2
2 by 2 document pages to 1 output page
Definition Print.h:270
@ e_NUp_4_4
4 by 4 document pages to 1 output page
Definition Print.h:273
@ e_NUp_1_1
1 document page to 1 output page
Definition Print.h:268
void SetOrientation(Orientation orientation)
void SetOutputQuality(OutputQuality quality)
OutputColor
Enumerated values for specifying the color mode for printing.
Definition Print.h:245
@ e_OutputColor_Monochrome
single color (1bpp)
Definition Print.h:248
void SetAutoCenter(bool autoCenter)
@ e_PageOrder_RightToLeftThenTopToBottom
Definition Print.h:280
@ e_PageOrder_BottomToTopThenLeftToRight
Definition Print.h:282
@ e_PageOrder_TopToBottomThenLeftToRight
Definition Print.h:281
@ e_PageOrder_LeftToRightThenTopToBottom
Definition Print.h:279
void SetNUp(unsigned int x, unsigned int y, NUpPageOrder pageOrder=e_PageOrder_LeftToRightThenTopToBottom)
void SetNUp(NUp nup, NUpPageOrder pageOrder=e_PageOrder_LeftToRightThenTopToBottom)
void SetOutputPageBorder(bool printBorder)
PrintContentTypes
Enumerated values for specifying the document content to print.
Definition Print.h:286
@ e_PrintContent_DocumentAnnotationsAndComments
Definition Print.h:289
@ e_PrintContent_DocumentAndAnnotations
Definition Print.h:288