extract_scene method
Contents
[
Hide
]extract_scene(self, file_name)
Extract 3D scenes from PDF file.
Returns
List of decoded 3D scenes that supported by Aspose.3D
def extract_scene(self, file_name):
    ...
| Parameter | Type | Description | 
|---|---|---|
| file_name | str | File name of input PDF file | 
Example
The following code shows how to extract all supported 3D scenes from a 3D PDF file, and write them to obj format.
from aspose.threed import FileFormat
scenes = FileFormat.PDF.extract_scene("input.pdf")
for i in range(len(scenes)):
    scenes[i].save(f"output-{i}.obj")
extract_scene(self, file_name, password)
Extract 3D scenes from PDF file.
Returns
List of decoded 3D scenes that supported by Aspose.3D
def extract_scene(self, file_name, password):
    ...
| Parameter | Type | Description | 
|---|---|---|
| file_name | str | File name of input PDF file | 
| password | bytes | Password of the PDF file | 
Example
The following code shows how to extract all supported 3D scenes from a 3D PDF file, and write them to obj format.
from aspose.threed import FileFormat
scenes = FileFormat.PDF.extract_scene("input.pdf")
for i in range(len(scenes)):
    scenes[i].save(f"output-{i}.obj")
extract_scene(self, stream, password)
Extract raw 3D content from PDF stream.
Returns
List of decoded 3D scenes that supported by Aspose.3D
def extract_scene(self, stream, password):
    ...
| Parameter | Type | Description | 
|---|---|---|
| stream | io.RawIOBase | Stream of input PDF file | 
| password | bytes | Password of the PDF file | 
Example
The following code shows how to extract all supported 3D scenes from a 3D PDF file, and write them to obj format.
from aspose.threed import FileFormat
scenes = FileFormat.PDF.extract_scene("input.pdf")
for i in range(len(scenes)):
    scenes[i].save(f"output-{i}.obj")
See Also
- module 
aspose.threed.formats - class 
PdfFormat