IsTaggedPDF

Propiedades del documento, accesibilidad

Descripción

Comprueba si Catalog declara PDF etiquetado mediante /MarkInfo /Marked. Devuelve 1 si está presente y true; ausencia, /Marked false o falta de /MarkInfo devuelve 0

Sintaxis

Delphi

Function TPDFlib.IsTaggedPDF: Integer;

ActiveX

Function PDFlib::IsTaggedPDF() As Long

DLL

int DLIsTaggedPDF(int InstanceID);

Valores devueltos

0El documento no está declarado como PDF etiquetado (o no hay ningún documento abierto)
1El documento se declara como PDF etiquetado (/MarkInfo /Marked true)

Observaciones

Solo comprueba metadatos de Catalog, no el árbol real. Puede haber /Marked true sin árbol o árbol sin /Marked true. Para diagnóstico profundo use GetPDFUADiagnostics

El indicador se fija mediante SetPDFUAMode, SetPDFAMode en nivel a (1, 4, 6) o SetMarkInfo(1)

Ejemplo

// Branch on whether the loaded document already declares tagged PDF
PDF.LoadFromFile('input.pdf', '');
if PDF.IsTaggedPDF = 1 then
  WriteLn('input.pdf is a tagged PDF — content can be re-flowed')
else
begin
  WriteLn('input.pdf is not tagged — adding tag declarations');
  PDF.SetMarkInfo(1);  // mark, then construct a structure tree
end;

Véase también

SetMarkInfo, SetPDFUAMode, SetPDFAMode, GetPDFUADiagnostics, BeginTag