SetTextExtractionOptions

Texto, Extração

Descrição

Define várias opções que afetam a funcionalidade de extração de texto

A partir da 8.13, esta função define as opções de extração de texto apenas para o documento selecionado Ela também afeta apenas os resultados da GetPageText

function.

Para ajustar a extração de texto das funções ExtractFilePageText e DAExtractPageText, use a nova DASetTextExtractionOptions

function.

Sintaxe

Delphi

Function TPDFlib.SetTextExtractionOptions(OptionID, NewValue: Integer): Integer;

ActiveX

Function PDFlib::SetTextExtractionOptions(OptionID As Long, NewValue As Long) As Long

DLL

int DLSetTextExtractionOptions(int InstanceID, int OptionID, int NewValue);

Parâmetros

OptionID1 = Ignorar mudanças de Font para permitir agrupar blocos diferentes 2 = Ignorar mudanças de Color para permitir agrupar blocos diferentes 3 = Ignorar mudanças de Text Block para permitir agrupar blocos diferentes 4 = Emitir valores de cor CMYK 5 = Ordenar blocos de texto pela posição superior esquerda 6 = Descenders a partir das métricas da fonte 7 = Ignorar sobreposições 8 = Ignorar duplicados 9 = Dividir em espaço duplo 10 = Aparar caracteres fora da área 11 = Correspondência alternativa de blocos 12 = Ignorar blocos de texto rotacionados 13 = Aparar espaços no início e no fim dos blocos de texto 14 = Emitir caracteres não ASCII abaixo do caractere Space (0x32) 15 = Remover certas strings de caracteres, como linhas de underscore (veja abaixo)
NewValueFor OptionID = 1, 2, 3 and 6: 0 = Use, 1 = Ignore For OptionID = 4: 0 = Show as RGB (default), 1 = Show as CMYK For OptionID = 5: 0 = Do not sort blocks (default), 1 = Sort blocks For OptionID = 7, 8 and 12: 0 = Do not ignore, 1 = Ignore OptionID = 9: 0 = Do not split on double space (default) 1 = Split on double space OptionID = 10: 0 = Do not trim characters outside area (default) 1 = Trim characters outside area OptionID = 11: 0 = Regular block matching 1 = Alternative block matching OptionID = 13: 0 = Do not trim leading or trailing whitespace 1 = Trim leading and trailing whitespace OptionID = 14 0 = Remove non ASCII chracters below space character from output (default) 1 = Output raw unfiltered ASCII characters OptionID = 15 0 = Output text lines made with Underscore characters (default) 1 = Remove text lines made with Underscore characters OptionID = 16 0 = Keep hyphens at line ends (default) 1 = Re-join words hyphenated across line breaks in the line-oriented outputs (GetPageText modes 7 and 9); a lowercase continuation drops the hyphen and the break, capitalised or numeric continuations keep them OptionID = 17 0 = Leave show-text runs as painted (default) 1 = Re-split spaceless show-text runs into words at advance steps much wider than the run's median glyph advance (GetPageText modes 7 and 9-11), so documents that paint whole lines as one operator with kerning gaps instead of spaces still split into words OptionID = 18 0 = Extract rotated runs in page coordinates (default) 1 = Rotate runs painted at 90, 180 or 270 degrees into the horizontal reading frame and group each quarter turn separately, so rotated margin notes, table headers and axis labels extract as readable lines instead of interleaving with the upright text; OptionID 12 still wins where both are set

Valores retornados

0O parâmetro OptionID ou NewValue não era válido
1A opção de extração de texto foi definida com sucesso