---
title: How to automatically add classes when importing Illustrator files or PDFs
description: How to automatically add classes when importing Illustrator files or PDFs
---

[Skip to content](https://help.designhuddle.com/how-to-automatically-add-classes-when-importing-illustrator-files-or-pdfs#main-content)

English

Show submenu for translations

[Submit a Support Ticket](https://help.designhuddle.com/kb-tickets/new?hsLang=en) [Customer portal](https://help.designhuddle.com/support-portal?hsLang=en)

![Design-Huddle\_expanded\_border.png\]](https://help.designhuddle.com/hs-fs/hubfs/Design-Huddle_expanded_border.png?height=40&name=Design-Huddle_expanded_border.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Submit a Support Ticket](https://help.designhuddle.com/kb-tickets/new)
- [Customer portal](https://help.designhuddle.com/support-portal)
- Design Huddle

 Design Huddle

 How can we help?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://help.designhuddle.com/?hsLang=en)
2. [Projects & Templates](https://help.designhuddle.com/projects-templates?hsLang=en)

# How to automatically add classes when importing Illustrator files or PDFs

Design Huddle can automatically add classes to imported elements when your Illustrator file or PDF includes preserved layer names. This allows you to prepare your layer structure before import and avoid manually assigning classes afterward.

This is helpful when you want imported design elements to receive consistent classes automatically.

#### **When to use this**

This workflow is useful when:

- Importing Illustrator files or PDFs with a defined layer structure
- Applying consistent classes to imported elements
- Preparing files for repeatable template or automation workflows
- Reducing manual setup after import

#### **How it works**

When layer names are preserved in the file being imported, Design Huddle can map those layer names to classes during import.

For example, if an element is placed on a specifically named layer in the source file, that layer name can be mapped to the corresponding class in Design Huddle. When the file is imported, the class is added automatically.

The important requirement is that the layer names must be preserved in the Illustrator file or generated PDF. If the layer information is available during import and the layer names are mapped, no additional class assignment is required afterward.

#### **How to prepare your file**

To use automatic class mapping:

1. Open the source file in Illustrator.
2. Name the relevant layers using the layer names you want to map to classes.
3. Export or save the Illustrator file or PDF while preserving those layer names.
4. Configure the layer name mappings so each relevant layer name corresponds to the appropriate class.
5. Import the file into Design Huddle.

Once imported, elements associated with the mapped layer names will automatically receive the corresponding classes.

#### **Alternate workflow when layer names cannot be preserved**

If your PDF generation process cannot preserve standard layer names, classes can instead be added after import using the API.

In this workflow, you can retrieve the Project metadata after the file is imported, identify the relevant elements, and use the API to add the appropriate classes to those elements.

This approach requires additional implementation compared with preserving layer names, so using mapped layer names during import is the simpler option when your file-generation workflow supports it.

#### **Best practices**

For best results, use consistent and predictable layer names in your source files and preserve them throughout the PDF generation process.

This can help ensure that imported elements are mapped to the correct classes without requiring additional processing after import.

- [Brands & User Groups](https://help.designhuddle.com/brands-user-groups?hsLang=en)
- [Projects & Templates](https://help.designhuddle.com/projects-templates?hsLang=en)
- [Accounts & Users](https://help.designhuddle.com/accounts-users?hsLang=en)
- [Template Locking](https://help.designhuddle.com/template-locking?hsLang=en)
- [Admin](https://help.designhuddle.com/admin?hsLang=en)
- [Editor](https://help.designhuddle.com/editor?hsLang=en)
- [User Portal](https://help.designhuddle.com/user-portal?hsLang=en)
- [MCP Server](https://help.designhuddle.com/mcp-server?hsLang=en)

[![Chill listening crop-3](https://help.designhuddle.com/hs-fs/hubfs/fbIcon.png?width=24&height=24&name=fbIcon.png "Chill listening crop-3")](https://www.designhuddle.com)

Design Huddle Knowledge Base

<https://www.facebook.com/designhuddle> <https://www.linkedin.com/company/designhuddle>

Copyright © 2026, Design Huddle