Extract Meta Data From Dwf File

Inquiry: Extracting Metadata from DWF Files & Limitations in Aspose.CAD

I am currently working with DWF files and exploring the capabilities of Aspose.CAD to extract metadata and text-based information. My goal is to retrieve details such as:

  • File properties (author, creation date, title, etc.)
  • Layers and object names
  • Embedded metadata and annotations
  • Any textual content available within the DWF file

Before proceeding, I would also like to understand the limitations associated with handling DWF files in Aspose.CAD. Could you please clarify:

  1. Feature Support: What functionalities are supported for DWF files (e.g., metadata extraction, text retrieval, layer handling, object properties, etc.)?
  2. Size and Complexity: Are there any restrictions on file size, number of layers, or complex drawings?
  3. Conversion Limitations: Can DWF files be fully converted to other formats (such as PDF or DXF) without data loss?
  4. Performance Considerations: Any known performance issues when processing large or complex DWF files?
  5. Version Compatibility: Are there specific DWF versions that Aspose.CAD does not support?
  6. Implementation Guidance: Could you provide sample code snippets or API references for extracting metadata from a DWF file?

Your guidance on these aspects would be greatly appreciated. Looking forward to your response.

Best regards,
hasan
blocks_and_tables.zip (96.9 KB)

blocks_and_tables.zip (96.9 KB)

@clouddeveloper87

Can you please specify which specific metadata you are trying to extract from the DWF file using Aspose.CAD? Additionally, are you looking for information on limitations in a specific context or use case?

i need to extract all the text data, property name and dimensions

@clouddeveloper87,
Hello.
DWF file reading is supported, metadata (file properties) are available, text retrieval is possible but could be file-dependent as there are few different ways to store text. For example, for the attached sample file the majority of the text is represented as polylines. We need more information to understand what exactly data you need from layers (names are available), objects and annotations to clarify the support for these objects (and we can implement them by request also). There are no special restrictions, but large/complex drawings requre time for read/export and we do not support reading of protected (encrypted) files. Export is possible both to PDF and DXF, but we support only linearized DXF R12 output for this pair of formats. Possible data loss depends on the details of the drawing, e.g., we can find the entities/objects we don’t have support for reading and/or writing.

Please find the example below to print some information from the DWF file:

using (DwfImage dwfImage = (DwfImage)Image.Load(fileName))
{
    DwfMetadata[] metadata = dwfImage.Metadata;

    foreach (DwfMetadata dwfMetadata in metadata)
    {
        System.Console.WriteLine(string.Format("{0} {1}", dwfMetadata.Name, dwfMetadata.Value));
    }

    DwfLayersList layers = dwfImage.Layers;

    foreach (DwfWhipLayer layer in layers)
    {
        System.Console.WriteLine(string.Format("{0}", layer.Name.AsciiString));
    }

    foreach (DwfPage page in dwfImage.Pages)
    {
        System.Console.WriteLine(string.Format("{0} {1} {2}", page.Name, page.PaperWidth, page.PaperHeight));
    }

    foreach (string text in dwfImage.GetStrings())
    {
        System.Console.WriteLine(string.Format("Text = {0}", text));
    }
}

We encourage you to evaluate the product with free license to be sure it fits your needs.