---
title: "PsdTextFrame Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame.htm
product: "Graphics Mill"
---

# PsdTextFrame Class
 
Represents a PSD text layer.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs.Psd](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs_Psd.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public class PsdTextFrame : PsdFrame, ITextSettings
```
 
## Remarks
  
The text layer is a particular case of a raster layer. It always contains the bitmap with a rasterized text string, as well as:
 
- The text string itself (the [Text](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame_Text.htm.md) property).
- The font settings (the [FontName](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame_FontName.htm.md) and [FontSize](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame_FontSize.htm.md) properties).
- Paragraph settings (such properties as LeftIndent(), RightIndent(), [Justification](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame_Justification.htm.md), and others).
- The text color (the [Color](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame_Color.htm.md) property).
- The text box (the [TextBox](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame_TextBox.htm.md) property).

Typically you get an instance of this class in the following way:
 
1. Iterate through the layers (you will get them as [PsdFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdFrame.htm.md)).
2. Check the [Type](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_Psd_PsdFrame_Type.htm.md) property value.
3. If it is [Text](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_FrameType.htm.md), cast the frame class to PsdTextFrame.
 
## Examples
  
The following code reads a PSD file, iterates through its layers, and writes some information about text layer to the console:
 
```csharp
//create PSD reader
using (var reader = new PsdReader(@"Images\BusinessCard.psd"))
{
    //read layers and check for a text layer
    for (int i = 0; i < reader.Frames.Count; i++)
    {
        using (var frame = reader.Frames[i])
        {
            if (frame.Type == FrameType.Text)
            {
                var textFrame = (PsdTextFrame) frame;
                Console.WriteLine("Font name: " + textFrame.FontName);
                Console.WriteLine("Font size: " + textFrame.FontSize);
                Console.WriteLine("Text caps: " + textFrame.Caps);
                Console.WriteLine("Text justification: " + textFrame.Justification);
                Console.WriteLine("Paragraph first line indent: " + textFrame.Paragraph.FirstLineIndent);
                Console.WriteLine("Text tracking: " + textFrame.Tracking);
                Console.WriteLine("Text box: " + textFrame.TextBox);
                break;
            }
        }
    }
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Codecs.Frame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Frame.htm.md)
            - [Aurigma.GraphicsMill.Codecs.Psd.PsdFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdFrame.htm.md)
                - Aurigma.GraphicsMill.Codecs.Psd.PsdTextFrame
                    - [Aurigma.GraphicsMill.Templates.PsdCustomTextFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Templates_PsdCustomTextFrame.htm.md)
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [PsdTextFrame Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame.htm.md)
- [Aurigma.GraphicsMill.Codecs.Psd Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs_Psd.htm.md)

### Manual

- [Loading Text Layers](https://www.graphicsmill.com/docs/gm/loading-text-layers.htm.md)
