I can't load this file in WpTools

  • ??

    • Offizieller Beitrag

    Hi,

    the text is encoded into escape sequences,
    example:

    Code
    {\*\cs5\cf0\rtlch\ltrch\dbch\hich\f1\fs22\lang1046\loch\f1\fs22\lang1046\rtlch\ltrch\hich\f2\lang2070\loch\f2\lang2070  cada uma,   do Edif\u237\'3fcio JOAN MIR\u211\'3f,}

    The \*\cs5 means that the rest of the text in this group between {] is ignored. There should be no \*

    Julian

  • Zitat von wpsupport

    Hi,

    the text is encoded into escape sequences,
    example:

    Code
    {\*\cs5\cf0\rtlch\ltrch\dbch\hich\f1\fs22\lang1046\loch\f1\fs22\lang1046\rtlch\ltrch\hich\f2\lang2070\loch\f2\lang2070  cada uma,   do Edif\u237\'3fcio JOAN MIR\u211\'3f,}

    The \*\cs5 means that the rest of the text in this group between {] is ignored. There should be no \*

    Julian

    What i can resolve this??

  • Eduardo,

    Não sei como esse arquivo foi produzido, mas pelo que pude ver, foi salvo usando o OpenOffice (comment StarWriter). Pelo menos num teste simples que fiz, o OpenOffice não criou dessa forma, com o \*\cs10. Ele foi feito com o Word2007? Ou foi copiado/colado de um browser?

    Infelizmente, a única forma de fazer o WPTools reconhecer isso, é removendo o '*\', pois caso contrário, como o Julian colocou, todo o trecho é ignorado.

    Isso acontece pois o WPTools não suporta estilo de caracter, mas na verdade o RTF criado está errado pois o texto em sí ('cada uma, do Edif...) não deveria estar dentro da tag {\*\.... }

    //
    Eduardo,

    I don't know this file was created, but I guess it was saved using OpenOffice. In a simple test I noted that OpenOffice didn't create the file with \*\cs10 in it. Was it created using Word 2007, or copied from a web browser?

    Unfortunelly the only way to solve this is removing the '\*' from it, otherwise, the entire piece will be ignored.

    This happenas because WPTools don't support character style, but in fact the problem is in the RTF File, that is wrongly created, because the text itself ('cada uma, do Edif...) should not be inside the tag {\*\.... }

  • Olá Fragnani, obrigado pela ajuda, alguns dos meus clientes me informaram que estes arquivos foram gerados da seguite forma: utilizaram o FineReader ( OCR ) para digitalizar o documento, colaram no Broffice 2.2 e salvaram o arquivo.. ao tentar colocar no meu sistema (para Cartório de Tabelionato) nada feito..

    vou fazer uma rotina para remover '*\'

    muito obrigado e um feliz 2009

    • Offizieller Beitrag

    Hi,

    I thaught some about this. WPTools in fact supprts the \cs tag, but it would expect \*\cs only in the style sheet definition. In the text body insted of \*\cs normally \cs is used. There is no reason for the \* here. \* means a change of the text "destination", for example to fill a table cell or a variable.

    The unit WPReadRTF can be patched to work around this problem like this:

    Change:

    Code
    if (currTag <> nil) and                    (currTag.ActionID = ipropCS) and // Handle \*\csN                    (FStack.Destination = rdsStyleSheet) then                    ChangeProp(ipropCS, keyvalue)                  else ChangeDestination(idestSkip, keyvalue);


    to:

    Code
    if (currTag <> nil) and
                        (currTag.ActionID = ipropCS) // Handle \*\csN
                       // (FStack.Destination = rdsStyleSheet)
                        then ChangeProp(ipropCS, keyvalue)
                      else ChangeDestination(idestSkip, keyvalue);

    Julian

  • Hi Julian, thank's for Help,

    Work's fine.. but.. loading the text i change the font but it's not changed on screen..

    i can load the file ignoring Styles to avoid the problem of don't change the font?


    happy new year to you!!!