Update Text

PSD Processor Personalization

Updates text layer of PSD image and saves to PDF file.

Сode Snippet

var psdProcessor = new PsdProcessor();

var psName = psdProcessor.FontResolver.FontRegistry.Add("ARIALUNI.TTF");
psdProcessor.FontResolver.FontRegistry.FallbackFonts.Add(psName);

psdProcessor.StringCallback = (processor, textFrame) =>
{
    var textString = textFrame.GetFormattedText();

    if (textFrame.Name == "Name")
    {
        textString = "Type your name";
    }

    return textString;
};

psdProcessor.Render("BusinessCard.psd", "UpdateText.pdf");

Input

BusinessCard.psd

Download

Output

UpdateText.pdf

Download

UpdateText.png

For AI-assisted development: Download Graphics Mill Code Samples XML Catalog