Skip to content

Instantly share code, notes, and snippets.

Avatar

GroupDocs GroupDocsGists

View GitHub Profile
View RenderDocumentAsHtmlExcludingFonts.cs
// 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;
View CodeForGif.cs
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));
View RemoveHyperlinksUsingFindWatermark.cs
//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();
View ReplaceMouseOverHyperlinks.cs
View LocalizedStringXML.xml
<?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>
View EncodingEmailDocument.cs
// 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
View EncodingExcelDocument.cs
// 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
View EncodingWordDocument.cs
// 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
View ShowHideGridLInes.cs
// Setup GroupDocs.Viewer config
ViewerConfig config = Utilities.GetConfigurations();
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
// File guid
string guid = DocumentName;
// Set html options to show grid lines
HtmlOptions options = new HtmlOptions();
View tmp.cs
ViewerConfig config = new ViewerConfig();
config.StoragePath = "D:/Storage";
config.UseCache = true;
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
string guid = "input.xlsx";
List<PageHtml> Pages = htmlHandler.GetPages(guid);
You can’t perform that action at this time.