Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK-939929 - Updated Documentation Details for the Getting Started Page #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public byte[] Sign(byte[] message, out byte[] timeStampResponse) {
RSACng rsa = (RSACng)digitalID.PrivateKey;
return rsa.SignData(message, System.Security.Cryptography.HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1);
}
else if (digitalID.PrivateKey is System.Security.Cryptography.RSAOpenSsl)
{
System.Security.Cryptography.RSAOpenSsl rsa = (System.Security.Cryptography.RSAOpenSsl)digitalID.PrivateKey;
return rsa.SignData(message, System.Security.Cryptography.HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1);
}
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
using Syncfusion.Drawing;
using Syncfusion.Pdf;
using Syncfusion.Pdf.Parsing;
using System.IO;


//Get stream from an existing PDF document.
FileStream docStream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.Read);
//Load the existing PDF document.
// Load the existing PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
//Get the first page of the loaded PDF document
// Get the first page of the loaded PDF document
PdfPageBase page = loadedDocument.Pages[0];
TextLineCollection lineCollection = new TextLineCollection();
//Extract text from the first page
string m_extractedText = page.ExtractText(out lineCollection);
//Gets specific line from the collection

// Extract text from the first page
string extractedText = page.ExtractText(out lineCollection);
// Get a specific line from the collection
TextLine line = lineCollection.TextLine[0];
//Gets collection of the words in the line
// Get the collection of words in the line
List<TextWord> textWordCollection = line.WordCollection;
//Gets word from the collection using index
// Get a word from the collection using an index
TextWord textWord = textWordCollection[0];
// Gets Glyph details of the word
// Get Glyph details of the word
List<TextGlyph> textGlyphCollection = textWord.Glyphs;
//Gets character of the word

// Get a character from the word
TextGlyph textGlyph = textGlyphCollection[0];
//Gets bounds of the character
// Get bounds of the character
RectangleF glyphBounds = textGlyph.Bounds;
//Gets font name of the character
string GlyphFontName = textGlyph.FontName;
//Gets font size of the character
float GlyphFontSize = textGlyph.FontSize;
//Gets font style of the character
FontStyle GlyphFontStyle = textGlyph.FontStyle;
//Gets character in the word
char GlyphText = textGlyph.Text;
//Gets the color of the character
Color GlyphColor = textGlyph.TextColor;
//Close the document
loadedDocument.Close(true);
// Get font name of the character
string glyphFontName = textGlyph.FontName;
// Get font size of the character
float glyphFontSize = textGlyph.FontSize;
// Get font style of the character
FontStyle glyphFontStyle = textGlyph.FontStyle;
// Get the character in the word
char glyphText = textGlyph.Text;
// Get the color of the character
Color glyphColor = textGlyph.TextColor;
loadedDocument.Close();
Loading