PdfFormat.Extract

Extract(string, byte[])

Extract raw 3D content from PDF file.

public List<byte[]> Extract(string fileName, byte[] password = null)
ParameterTypeDescription
fileNameStringFile name of input PDF file
passwordByte[]Password of the PDF file

Return Value

A list of all 3D contents in bytes, including the formats that Aspose.3D don’t supported.

Examples

The following code shows how to extract all raw 3D contents from a 3D PDF file, and write them to files.

var raw3DContents = FileFormat.PDF.Extract("input.pdf");
for (int i = 0; i < raw3DContents.Count; i++)
{
    File.WriteAllBytes("raw-3d-" + i, raw3DContents[i]);
}

See Also


Extract(Stream, byte[])

Extract raw 3D content from PDF stream.

public List<byte[]> Extract(Stream stream, byte[] password = null)
ParameterTypeDescription
streamStreamStream of input PDF file
passwordByte[]Password of the PDF file

Return Value

A list of all 3D contents in bytes, including the formats that Aspose.3D don’t supported.

Examples

The following code shows how to extract all raw 3D contents from a 3D PDF file, and write them to files.

var raw3DContents = FileFormat.PDF.Extract("input.pdf");
for (int i = 0; i < raw3DContents.Count; i++)
{
    File.WriteAllBytes("raw-3d-" + i, raw3DContents[i]);
}

See Also