extract_scene method

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):
    ...
ParameterTypeDescription
file_namestrFile 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):
    ...
ParameterTypeDescription
file_namestrFile name of input PDF file
passwordbytesPassword 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):
    ...
ParameterTypeDescription
streamio.RawIOBaseStream of input PDF file
passwordbytesPassword 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