Skip to content

Instantly share code, notes, and snippets.

// 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 ViewerHandler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
// Set guid
string guid = DocumentName;
// Set html options to render hidden sheets (do same while using ImageOptions)
// 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();
// 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;
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
ViewerConfig config = Utilities.GetConfigurations();
// Create html handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
string guid = DocumentName;
// Set Cells options to ignore empty rows
HtmlOptions options = new HtmlOptions();
options.CellsOptions.IgnoreEmptyRows = true; // default value is false
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);
' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc = Document.Load(Utilities.MapSourceFilePath(DocFilePath))
' Search for hyperlinks only.
doc.SearchableObjects.PdfSearchableObjects = PdfSearchableObjects.Hyperlinks
' The code for working with found watermarks goes here.
Dim watermarks = doc.FindWatermarks()
End Using
// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
using (var doc = Document.Load(Utilities.MapSourceFilePath(DocFilePath)))
{
// Search for hyperlinks only.
doc.SearchableObjects.PdfSearchableObjects = PdfSearchableObjects.Hyperlinks;
var watermarks = doc.FindWatermarks();
// The code for working with found watermarks goes here.
}
' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Document.DefaultSearchableObjects = New SearchableObjects() With { _
.WordsSearchableObjects = WordsSearchableObjects.Hyperlinks Or WordsSearchableObjects.Text, _
.CellsSearchableObjects = CellsSearchableObjects.HeadersFooters, _
.SlidesSearchableObjects = SlidesSearchableObjects.SlidesBackgrounds Or SlidesSearchableObjects.Shapes, _
.DiagramSearchableObjects = DiagramSearchableObjects.None, _
.PdfSearchableObjects = PdfSearchableObjects.All _
}
For Each file As Object In Directory.GetFiles("D:\files")
// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Document.DefaultSearchableObjects = new SearchableObjects
{
WordsSearchableObjects = WordsSearchableObjects.Hyperlinks | WordsSearchableObjects.Text,
CellsSearchableObjects = CellsSearchableObjects.HeadersFooters,
SlidesSearchableObjects = SlidesSearchableObjects.SlidesBackgrounds | SlidesSearchableObjects.Shapes,
DiagramSearchableObjects = DiagramSearchableObjects.None,
PdfSearchableObjects = PdfSearchableObjects.All
};
' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Dim publicKey As String = "[Your Dynabic.Metered public key]"
Dim privateKey As String = "[Your Dynabic.Metered private key]"
Dim metered As New Metered()
metered.SetMeteredKey(publicKey, privateKey)
' Use the library in licensed mode