HiddenDataSanitizer.SanitizeAllToImages

HiddenDataSanitizer.SanitizeAllToImages method

Replaces page content with images and removes other hidden data. Allows you to remove hidden text with a background color, as well as text hidden under images. Also completely removes all interactive elements. The document is converted to images as is, and then cleared of any remaining hidden data. If you need to clear first and then convert, use the main class method.

public static void SanitizeAllToImages(Document document, int dpi = 150)
ParameterTypeDescription
documentDocumentThe docunent object.
dpiInt32The dpi of pages’ images.

See Also