Click or drag to resize
SoToPDFAction Class

Class for exporting a scene graph to a PDF file.

Inheritance Hierarchy

Namespace: OIV.HardCopy
Assembly: OIV.HardCopy (in OIV.HardCopy.dll) Version: 2024.1.1.0 (2024.1.1)
Syntax
public class SoToPDFAction : SoToU3DAction

The SoToPDFAction type exposes the following members.

Constructors
  NameDescription
Public methodSoToPDFAction
Initializes a new instance of the SoToPDFAction class
Top
Methods
  NameDescription
Public methodAddLineSegmentCallback

Routine to add callbacks for generated primitives (line segments) for all shapes of the given type.

(Inherited from SoCallbackAction.)
Public methodAddPointCallback

Routine to add callbacks for generated primitives (points) for all shapes of the given type.

(Inherited from SoCallbackAction.)
Public methodAddPostCallback

Adds a callback function to call when a node of the given type is encountered during traversal.

(Inherited from SoCallbackAction.)
Public methodAddPreCallback

Adds a callback function to call when a node of the given type is encountered during traversal.

(Inherited from SoCallbackAction.)
Public methodAddTriangleCallback

Routine to add callbacks for generated primitives (triangles) for all shapes of the given type.

(Inherited from SoCallbackAction.)
Public methodApply(SoNode)

Initiates an action on the graph specified by a node.

(Inherited from SoToU3DAction.)
Public methodApply(SoPath)

Initiates an action on the graph specified by a path.

(Inherited from SoToU3DAction.)
Public methodApply(SoPathList)
Calls Apply(pathList, false).
(Inherited from SoToU3DAction.)
Public methodApply(SoPathList, Boolean)

Initiates an action on the graph specified by list of paths.

(Inherited from SoToU3DAction.)
Public methodAreDraggersExported

Returns true if draggers are exported.

(Inherited from SoToU3DAction.)
Public methodClearApplyResult

When applied, an action may reference nodes or create objects (e.g.

(Inherited from SoAction.)
Public methodCloseFile

finalize export to the U3D output file.

(Overrides SoToU3DActionCloseFile.)
Public methodStatic memberEnableElement
Public methodEnableElements Obsolete.
Returns the list of enabled elements for a given action subclass.
(Inherited from SoAction.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodForcePolygonalText3

Forces OIV.Inventor.Nodes.SoText2 nodes to be exported using OIV.Inventor.Nodes.SoText3 (default is true).

(Inherited from SoToU3DAction.)
Public methodForwardTraversal(SoNode)

Traverse a node that is not part of the current scenegraph.

(Inherited from SoToU3DAction.)
Public methodForwardTraversal(SoPath)

Traverse a node that is not part of the current scenegraph.

(Inherited from SoToU3DAction.)
Public methodGetComplexity

Returns complexity information from the state.

(Inherited from SoCallbackAction.)
Public methodGetComplexityType

Returns complexity information from the state.

(Inherited from SoCallbackAction.)
Public methodGetContinueActionInBranchFlag

This function indicates if the action must stop in the current branch.

(Inherited from SoAction.)
Public methodGetCoordinate3

Returns the current coordinates from the state.

(Inherited from SoCallbackAction.)
Public methodGetCoordinate4

Returns the current coordinates from the state.

(Inherited from SoCallbackAction.)
Public methodGetCreaseAngle

Returns the current shape hints from the state.

(Inherited from SoCallbackAction.)
Public methodGetCurPath

Returns the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed.

(Inherited from SoAction.)
Public methodGetCurrentResponse
(Inherited from SoCallbackAction.)
Public methodGetDecimationPercentage

Returns the current decimation percentage from the state.

(Inherited from SoCallbackAction.)
Public methodGetDecimationType

Returns the current decimation type from the state.

(Inherited from SoCallbackAction.)
Public methodGetDistribMode

Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only).

(Inherited from SoAction.)
Public methodGetDrawStyle

Returns the current drawing style information from the state.

(Inherited from SoCallbackAction.)
Public methodGetFaceType

Returns the current shape hints from the state.

(Inherited from SoCallbackAction.)
Public methodGetFocalDistance

Returns the current camera and viewing information from the state.

(Inherited from SoCallbackAction.)
Public methodGetFontName

Returns the current font information from the state.

(Inherited from SoCallbackAction.)
Public methodGetFontRenderStyle

Returns the current font information from the state.

(Inherited from SoCallbackAction.)
Public methodGetFontSize

Returns the current font information from the state.

(Inherited from SoCallbackAction.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetLightAttenuation

Returns the current lighting model information from the state.

(Inherited from SoCallbackAction.)
Public methodGetLightModel

Returns the current lighting model information from the state.

(Inherited from SoCallbackAction.)
Public methodGetLinePattern

Returns the current drawing style information from the state.

(Inherited from SoCallbackAction.)
Public methodGetLinePatternScaleFactor

Returns the current drawing style information from the state.

(Inherited from SoCallbackAction.)
Public methodGetLineWidth

Returns the current drawing style information from the state.

(Inherited from SoCallbackAction.)
Public methodGetMaterial(SbColor, SbColor, SbColor, SbColor, Single, Single)
Calls GetMaterial(ambient, diffuse, specular, emission, shininess, transparency, System.Int32(0)).
(Inherited from SoCallbackAction.)
Public methodGetMaterial(SbColor, SbColor, SbColor, SbColor, Single, Single, Int32)

Returns the current material information from the state.

(Inherited from SoCallbackAction.)
Public methodGetMaterialBinding

Returns the current material information from the state.

(Inherited from SoCallbackAction.)
Public methodGetModelMatrix

Returns the current modeling transformation from the state.

(Inherited from SoCallbackAction.)
Public methodGetNodeAppliedTo

Returns the node the action is being applied to.

(Inherited from SoAction.)
Public methodGetNormal

Returns the current normal information from the state.

(Inherited from SoCallbackAction.)
Public methodGetNormalBinding

Returns the current normal information from the state.

(Inherited from SoCallbackAction.)
Public methodGetNumCoordinates

Returns the current coordinates from the state.

(Inherited from SoCallbackAction.)
Public methodGetNumNormals

Returns the current normal information from the state.

(Inherited from SoCallbackAction.)
Public methodGetNumProfileCoordinates

Returns the current profiles and their coordinates from the state.

(Inherited from SoCallbackAction.)
Public methodGetNumTextureCoordinates

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetOriginalPathListAppliedTo

Returns the original path list the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathAppliedTo

Returns the path the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathCode

Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathListAppliedTo

Returns the path list the action is being applied to.

(Inherited from SoAction.)
Public methodGetPickStyle

Returns the current picking style.

(Inherited from SoCallbackAction.)
Public methodGetPipeId

Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodGetPointSize

Returns the current drawing style information from the state.

(Inherited from SoCallbackAction.)
Public methodGetProfile

Returns the current profiles and their coordinates from the state.

(Inherited from SoCallbackAction.)
Public methodGetProfileCoordinate2

Returns the current profiles and their coordinates from the state.

(Inherited from SoCallbackAction.)
Public methodGetProfileCoordinate3

Returns the current profiles and their coordinates from the state.

(Inherited from SoCallbackAction.)
Public methodGetProjectionMatrix

Returns the current camera and viewing information from the state.

(Inherited from SoCallbackAction.)
Public methodGetSceneManager

Return the OIV.Inventor.SoSceneManager associated with this action.

(Inherited from SoAction.)
Public methodGetShapeType

Returns the current shape hints from the state.

(Inherited from SoCallbackAction.)
Public methodGetState

Gets the state from the action.

(Inherited from SoAction.)
Public methodGetSwitch

Returns the current switch value.

(Inherited from SoCallbackAction.)
Public methodGetTextureBlendColor

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureCoordinate2

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureCoordinate4

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureCoordinateBinding

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureFileName

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureImage(SbVec2i32, Int32)

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureImage(SbVec2s, Int32) Obsolete.

Returns texture information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureMatrix

Returns the current texture mapping information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureModel

Returns the current texture mapping information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureTransformNode

Returns the current texture mapping information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureWrapS

Returns the current texture mapping information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTextureWrapT

Returns the current texture mapping information from the state.

(Inherited from SoCallbackAction.)
Public methodGetTransparencyType

Returns the current Transparency Type information from the state.

(Inherited from SoCallbackAction.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUnits

Returns the current units from the state.

(Inherited from SoCallbackAction.)
Public methodGetVertexOrdering

Returns the current shape hints from the state.

(Inherited from SoCallbackAction.)
Public methodGetViewingMatrix

Returns the current camera and viewing information from the state.

(Inherited from SoCallbackAction.)
Public methodGetViewVolume

Returns the current camera and viewing information from the state.

(Inherited from SoCallbackAction.)
Public methodGetWhatAppliedTo

Returns code indicating what action is being applied to.

(Inherited from SoAction.)
Public methodHasTerminated

Returns true if the traversal has reached a termination condition.

(Inherited from SoAction.)
Public methodInvalidateState

Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied.

(Inherited from SoAction.)
Public methodInvokePostCallbacks
(Inherited from SoToU3DAction.)
Public methodInvokePreCallbacks
(Inherited from SoToU3DAction.)
Public methodIsBeingApplied

Returns true if this action is currently being applied.

(Inherited from SoAction.)
Public methodIsCallbackAll

Returns whether the callback uses normal traversal (switches, etc.) or whether it traverses every single node.

(Inherited from SoCallbackAction.)
Public methodIsLastPathListAppliedTo

Returns true if the current list is the last one from the original.

(Inherited from SoAction.)
Public methodIsPolygonalText3Forced

Returns true if polygonal text3 is forced (see forcePolygonalText3).

(Inherited from SoToU3DAction.)
Public methodIsUsingAlternateRep

Returns true if current action is using alternate representations.

(Inherited from SoAction.)
Public methodOpenFile

Set the PDF output file.

(Overrides SoToU3DActionOpenFile(String).)
Public methodPostDelayedTraversal

Method called by SoMultiPassManager after delayed pass traversals.

(Inherited from SoAction.)
Public methodPreDelayedTraversal

Method called by SoMultiPassManager before delayed pass traversals.

(Inherited from SoAction.)
Public methodResetContinueActionInBranchFlag

This function resets the continue action flag.

(Inherited from SoAction.)
Public methodSetCallbackAll

Sets whether the callback uses normal traversal (switches, etc.) or whether it traverses every single node.

(Inherited from SoCallbackAction.)
Public methodSetExportDraggers

Allow the export of draggers (default is true).

(Inherited from SoToU3DAction.)
Public methodSetLandscape

[Optional] Changes the page orientation from portrait to landscape.

Public methodSetPassword(String)
Calls SetPassword(writePass, (System.String ^)nullptr).
Public methodSetPassword(String, String)

[Optional] Set passwords to lock write & read access to the PDF file contents.

Public methodSetPipeId

Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodSetSceneManager

Set the scene manager associated with this action (if any ).

(Inherited from SoAction.)
Public methodSetText

[Optional] Add a text block into the output PDF file.

Public methodSetTitle

[Optional] Set a title into the output PDF file.

Public methodSetUpState

Creates state if it is NULL or it is no longer valid because new elements have been enabled since it was created.

(Inherited from SoAction.)
Public methodShouldGeneratePrimitives
(Inherited from SoCallbackAction.)
Public methodStopActionInBranch

This function stops the action in the current Scene Graph branch.

(Inherited from SoAction.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTraverse

Does traversal of a graph rooted by a node.

(Inherited from SoAction.)
Public methodUseAlternateRep

Tell the action to use alternate representations during traversal when available.

(Inherited from SoAction.)
Top
Events
  NameDescription
Public eventPostTailTraversal
(Inherited from SoCallbackAction.)
Public eventPreTailTraversal
(Inherited from SoCallbackAction.)
Top
Remarks

This class can export an Open Inventor scenegraph into a simple PDF file. In addition to 3D scene encapsulation, the exporter can insert a title to the document and an unique block of text. Moreover, PDF encryption can lock access to the file contents. To import a 3D model inside a more complex PDF file, prefer OIV.HardCopy.SoToU3DAction. U3D files can be used to import 3D models inside PDF files by advanced PDF editors.

Limitations

Use case

SoSeparator root = new SoSeparator();
...
SoToPDFAction pdfAction = new SoToPDFAction();
bool result = pdfAction.OpenFile( "output.pdf" );
if ( !result ) 
{
 // error management
}
pdfAction.SetTitle( "Scene Name" );
pdfAction.SetText( "Some text describing the exported scene." );
pdfAction.Apply( root );
result = pdfAction.CloseFile();
if ( !result )
{
 // error management
}

Warning

  • On some platforms, some third parties may encounter problems to load displaying an error message like: "IFXOSFileIterator.ProcessDir: error opening /usr/local/u3d/lib/Plugins/ No such file or directory". In such case, declare the environment variable U3D_LIBDIR (UNIX only) and set it with the path to the Open Inventor libraries ($OIVHOME/lib).

  • Limitations are common to OIV.HardCopy.SoToU3DAction.

See Also