ExportLanguageToSpanTag

PdfSaveOptions.ExportLanguageToSpanTag property

Ottiene o imposta un valore che determina se creare o meno un tag “Span” nella struttura del documento per esportare la lingua del testo.

public bool ExportLanguageToSpanTag { get; set; }

Osservazioni

Il valore predefinito èfalso l’attributo “Lang” è allegato a una sequenza di contenuto contrassegnato nel flusso di contenuto della pagina.

Quando il valore èVERO Il tag “Span” viene creato per il testo con lingua non predefinita e l’attributo “Lang” è allegato a questo tag.

Questo valore viene ignorato quandoExportDocumentStructure Èfalso .

Esempi

Mostra come creare un tag “Span” nella struttura del documento per esportare la lingua del testo.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Writeln("Hello world!");
builder.Writeln("Hola mundo!");

PdfSaveOptions saveOptions = new PdfSaveOptions
{
    // Nota, quando "ExportDocumentStructure" è falso, "ExportLanguageToSpanTag" viene ignorato.
    ExportDocumentStructure = true, ExportLanguageToSpanTag = true
};

doc.Save(ArtifactsDir + "PdfSaveOptions.ExportLanguageToSpanTag.pdf", saveOptions);

Guarda anche