Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Absorber is entering Hex (0x00) instead of space.

$
0
0
Hello, 
Aspose.Pdf'm using (9.4.0) and reading the pdf attached an insert of hexadecimal 0x00 instead of a space at positions 572 and 573 occurs while reading page 30. 
This character 0x00 (null) generates me problems when inserting into the database. 

At the moment I am having to read byte by byte 0x00 demand this and remove it. This is very time consuming and processing. 

The snippet code I'm using is:
textAbsorber = new TextAbsorber();
textAbsorber.TextSearchOptions.LimitToPageBounds = true;                        
textAbsorber.TextSearchOptions.Rectangle = new Aspose.Pdf.Rectangle(0, 15, 300, 787);
pdfDocument.Pages[page].Accept(textAbsorber);
linha = textAbsorber.Text;

To identify the 0x00 I used:
char[] arr = ((string)linha).ToCharArray();
for (int i = 0; i < arr.Length; i++){
    if (arr[i] == '\0'){ 
      string x = "Err!! ";
    }
}

Viewing all articles
Browse latest Browse all 3131

Trending Articles