Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoToPDFAction.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2021 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24
25#ifndef SO_TO_PDF_ACTION_H
26#define SO_TO_PDF_ACTION_H
27
28#include <HardCopy/SoToU3DAction.h>
29
30#include <Inventor/SbColor.h>
31#include <Inventor/actions/SoSubAction.h>
32#include <HardCopy/SoHardCopy.h>
33
34class SoToPDFActionPrivate;
35
131{
132 SO_ACTION_HEADER(SoToPDFAction);
133
134public:
135
136 /*
137 * Constructor
138 */
140
141 /*
142 * Destructor
143 */
144 virtual ~SoToPDFAction();
145
151 SoNONUNICODE virtual bool openFile(const char* filename);
152
156 virtual bool openFile( const SbString& filename );
157
161 virtual bool closeFile();
162
172 SoNONUNICODE void setPassword(const char* writePass, const char* readPass = NULL);
173
181 void setPassword( const SbString& writePass, const SbString& readPass = "" );
182
189 SoNONUNICODE void setTitle(const char* title);
190
195 void setTitle(const SbString& title);
196
203 SoNONUNICODE void setText(const char* text);
204
209 void setText(const SbString& text);
210
215 void setLandscape( const SbBool enable );
216
217private:
221 static void initClass();
222 static void exitClass();
223
224 static bool writeFile(
225 const SbString& pdfOutput,
226 const SbString& writePass,
227 const SbString& readPass,
228 const SbString& title,
229 const SbString& text,
230 const SbString& u3dInput,
231 const SbString& u3dView,
232 bool hasPerspective,
233 float fov,
234 float focalDistance,
235 bool hasLights,
236 const SbColor& background,
237 bool landscape = false);
238
239private:
240
241 SoToPDFActionPrivate* m_private;
242};
243
244#endif // SO_TO_PDF_ACTION_H
245
246
Color vector class.
Definition SbColor.h:82
Class for smart character strings.
Definition SbString.h:202
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Class for exporting a ...
void setTitle(const SbString &title)
[Optional] Set a title into the output PDF file.
void setPassword(const SbString &writePass, const SbString &readPass="")
[Optional] Set passwords to lock write & read access to the PDF file contents.
SoNONUNICODE void setText(const char *text)
[Optional] Add a text block into the output PDF file.
SoNONUNICODE void setTitle(const char *title)
[Optional] Set a title into the output PDF file.
SoNONUNICODE void setPassword(const char *writePass, const char *readPass=NULL)
[Optional] Set passwords to lock write & read access to the PDF file contents.
void setText(const SbString &text)
[Optional] Add a text block into the output PDF file.
virtual bool closeFile()
finalize export to the U3D output file.
virtual bool openFile(const SbString &filename)
Set the PDF output file.
void setLandscape(const SbBool enable)
[Optional] Changes the page orientation from portrait to landscape.
virtual SoNONUNICODE bool openFile(const char *filename)
Set the PDF output file.
virtual ~SoToPDFAction()
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Export a scene graph t...
int SbBool
Boolean type.
Definition SbBase.h:87