This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET | |
//Get Configurations | |
ViewerConfig config = Utilities.GetConfigurations(); | |
// Create html handler | |
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config); | |
// Guid implies that unique document name | |
string guid = DocumentName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string extension = Path.GetExtension(guid); | |
if (extension == ".gif") | |
{ | |
//return the file from storage | |
// Get original file | |
FileContainer container = imageHandler.GetFile(guid); | |
var fileStream = container.Stream; | |
// return File(pageImage.Stream, GetContentType(_convertImageFileType)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET | |
using (SlidesDocument doc = Document.Load<SlidesDocument>(Utilities.MapSourceFilePath(FilePath))) | |
{ | |
doc.SearchableObjects.SlidesSearchableObjects = SlidesSearchableObjects.Hyperlinks; | |
// Find all hyperlinks | |
var watermarks = doc.FindWatermarks(); | |
// Remove found watermarks | |
watermarks.Clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET | |
using (SlidesDocument doc = Document.Load<SlidesDocument>(Utilities.MapSourceFilePath(FilePath))) | |
{ | |
foreach (var slide in doc.Slides) | |
{ | |
string oldUrl = "http://aspose.com/"; | |
// Assign null to remove hyperlink | |
string newUrl = "http://groupdocs.com/"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET | |
// Setup GroupDocs.Viewer config | |
ViewerConfig config = Utilities.GetConfigurations(); | |
// Create image or html handler | |
ViewerImageHandler imageHandler = new ViewerImageHandler(config); | |
// Get supported document formats | |
DocumentFormatsContainer documentFormatsContainer = imageHandler.GetSupportedDocumentFormats(); | |
Dictionary<string, string> supportedDocumentFormats = documentFormatsContainer.SupportedDocumentFormats; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<root> | |
<data name="EXC_TMPL_CORRUPTED_OR_DAMAGED_FILE"> | |
<value>Could not load file '{0}', file is corrupted or damaged.</value> | |
</data> | |
<data name="EXC_TMPL_FILE_TYPE_NOT_SUPPORTED"> | |
<value>File type '{0}' is not supported.</value> | |
</data> | |
<data name="EXC_TMPL_INVALID_PASSWORD"> | |
<value>Unable to decrypt file '{0}'. Password is invalid.</value> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET | |
// Setup GroupDocs.Viewer config | |
ViewerConfig config = Utilities.GetConfigurations(); | |
config.LocalesPath = @"D:\Locale"; | |
CultureInfo cultureInfo = new CultureInfo("fr-FR"); | |
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config, cultureInfo); | |
// File guid | |
string guid = DocumentName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup GroupDocs.Viewer config | |
ViewerConfig config = Utilities.GetConfigurations(); | |
//Initialize viewer handler | |
ViewerImageHandler viewerImageHandler = new ViewerImageHandler(viewerConfig); | |
//Set encoding | |
Encoding encoding = Encoding.GetEncoding("shift-jis"); | |
//Set image options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup GroupDocs.Viewer config | |
ViewerConfig config = Utilities.GetConfigurations(); | |
//Initialize viewer handler | |
ViewerImageHandler viewerImageHandler = new ViewerImageHandler(viewerConfig); | |
//Set encoding | |
Encoding encoding = Encoding.GetEncoding("shift-jis"); | |
//Set image options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup GroupDocs.Viewer config | |
ViewerConfig config = Utilities.GetConfigurations(); | |
//Initialize viewer handler | |
ViewerImageHandler viewerImageHandler = new ViewerImageHandler(viewerConfig); | |
//Set encoding | |
Encoding encoding = Encoding.GetEncoding("shift-jis"); | |
//Set image options |
OlderNewer