Class PdfReader
Summary description for PDFReader.
Inheritance
Namespace: Syncfusion.Pdf.IO
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public class PdfReader : TextReader
Constructors
PdfReader(Stream)
Initialize an instance of the PDFReader class.
Declaration
public PdfReader(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
Properties
Position
Sets or gets the position within the stream.
Declaration
public long Position { get; set; }
Property Value
Type |
---|
System.Int64 |
Stream
Returns the underlying stream.
Declaration
public Stream Stream { get; }
Property Value
Type |
---|
System.IO.Stream |
Methods
Dispose(Boolean)
Disposes the object.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
GetNextToken()
Returns next string separated by delimiters.
Declaration
public string GetNextToken()
Returns
Type | Description |
---|---|
System.String | A string. |
IsDelimiter(Char)
Determines if the character specified is a delimeter character.
Declaration
public bool IsDelimiter(char character)
Parameters
Type | Name | Description |
---|---|---|
System.Char | character | The character to test. |
Returns
Type | Description |
---|---|
System.Boolean | True is the character is a delimeter character, false otherwise. |
IsEol(Char)
Informs whether the character is from the EOL character.
Declaration
public bool IsEol(char character)
Parameters
Type | Name | Description |
---|---|---|
System.Char | character | The character to test. |
Returns
Type | Description |
---|---|
System.Boolean | True if the character is from EOL characters, false otherwise. |
IsSeparator(Char)
Determines if the character specified is a separator character.
Declaration
public bool IsSeparator(char character)
Parameters
Type | Name | Description |
---|---|---|
System.Char | character | The character to test. |
Returns
Type | Description |
---|---|
System.Boolean | True is the character is a separator character. |
Peek()
Reads a character from the stream and preserves the current position of the stream.
Declaration
public override int Peek()
Returns
Type | Description |
---|---|
System.Int32 | A character read, or -1 if EOF reached. |
Read()
Reads a character from the stream and andvances the current position.
Declaration
public override int Read()
Returns
Type | Description |
---|---|
System.Int32 | A character read, or -1 if EOF reached. |
Read(Char[], Int32, Int32)
Read the sequence of bytes from the stream.
Declaration
public override int Read(char[] buffer, int index, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Char[] | buffer | The storage for the characters. |
System.Int32 | index | The index in the buffer. |
System.Int32 | count | The number of characters to read. |
Returns
Type | Description |
---|---|
System.Int32 | The count of the characters read. |
ReadBack(Int32)
Reads a string from a stream in the oppozite direction.
Declaration
public string ReadBack(int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length |
Returns
Type | Description |
---|---|
System.String | The string. |
ReadBlock(Char[], Int32, Int32)
Read the sequence of bytes from the stream.
Declaration
public override int ReadBlock(char[] buffer, int index, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Char[] | buffer | The storage for the characters. |
System.Int32 | index | The index in the buffer. |
System.Int32 | count | The number of characters to read. |
Returns
Type | Description |
---|---|
System.Int32 | The count of the characters read. |
ReadLine()
Reads a single line from the stream.
Declaration
public override string ReadLine()
Returns
Type | Description |
---|---|
System.String | The line read. |
ReadToEnd()
Read all bytes to the end of the stream and returns them as a single string.
Declaration
public override string ReadToEnd()
Returns
Type | Description |
---|---|
System.String | The characters read. |
SearchBack(String)
Looks up for the token.
Declaration
public long SearchBack(string token)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | What to look for. |
Returns
Type |
---|
System.Int64 |
SearchForward(String)
Searches for a token specified by 'token' string.
Declaration
public long SearchForward(string token)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | What to search. |
Returns
Type | Description |
---|---|
System.Int64 | The position of the found token. |
Seek(Int64, SeekOrigin)
Seeks for the position specified.
Declaration
public long Seek(long offset, SeekOrigin origin)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | offset | The origin relative offset. |
System.IO.SeekOrigin | origin | The origin for the offset. |
Returns
Type | Description |
---|---|
System.Int64 | The zero based position in the stream. |
SkipWS()
Skips all white spaces. stream.Position will point to the first nonspase character or EOF.
Declaration
public void SkipWS()
SkipWSBack()
Skip any whitespace at the tail. NOTE: stream.Position points to the last encounted whitespace.
Declaration
public void SkipWSBack()