Pdf - Pdf3DRenderStyle

18 Nov 20261 minute to read

Defines the rendering styles available for 3D artwork.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access the first page
let page: PdfPage = document.getPage(0) as PdfPage;
// Create a 3D annotation with U3D data
let annotation3D: Pdf3DAnnotation = new Pdf3DAnnotation(
    page,
    { x: 50, y: 350, width: 200, height: 200 }
);
// Set the render style
annotation3D.renderMode.style = Pdf3DRenderStyle.Solid;
// Add the annotation to the page
page.annotations.add(annotation3D);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • BoundingBox - Displays the bounding-box edges of each node.
  • HiddenWireframe - Displays visible edges and removes hidden edges.
  • Illustration - Displays silhouette edges with surfaces.
  • ShadedIllustration - Displays silhouette edges with lit, textured, and emissive surfaces.
  • ShadedVertices - Displays vertices using vertex colors and lighting.
  • ShadedWireframe - Displays edges using interpolated vertex colors and lighting.
  • Solid - Displays textured and lit geometric shapes.
  • SolidOutline - Displays silhouette edges with lit and textured surfaces.
  • SolidWireframe - Displays textured and lit shapes with single-color edges.
  • Transparent - Displays textured and lit shapes with transparency.
  • TransparentBoundingBox - Displays transparent bounding-box faces.
  • TransparentBoundingBoxOutline - Displays transparent bounding-box edges and faces.
  • TransparentWireframe - Displays transparent shapes with opaque edges.
  • Vertices - Displays vertices in a single color.
  • Wireframe - Displays edges in a single color.