Skip to content

Commit

Permalink
Code snippet changed (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel-A-Sokolov committed Jul 10, 2023
1 parent e882bfc commit 2f53854
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ If you want to check if a file is encrypted, use the _GetFileInfo()_ method that
```csharp
using (Viewer viewer = new Viewer("encrypted.pdf"))
{
// Specify a file extension.
string extension = ".docx";
// Set a file type using the extension.
FileType fileType = FileType.FromExtension(extension);
// Get file information.
Results.FileInfo fileInfo = viewer.GetFileInfo();

// Display the file type and flag if the file is encrypted.
Console.WriteLine($"Extension {extension}; File type: {fileType}.");
Console.WriteLine("File type is: " + fileInfo.FileType);
Console.WriteLine("File encrypted: " + fileInfo.Encrypted);
}
```
{{< /tab >}}
Expand Down

0 comments on commit 2f53854

Please sign in to comment.