Convert PDF to Black and White | VBScriptByteScout PDF Extractor SDK

Convert PDF to Black and White | VBScript

MakePDFBlackAndWhite.vbs:

VB
' Create Bytescout.PDFExtractor.UnsearchablePDFMaker object
Set unsearchablePDFMaker = CreateObject("Bytescout.PDFExtractor.UnsearchablePDFMaker")
unsearchablePDFMaker.RegistrationName = "demo"
unsearchablePDFMaker.RegistrationKey = "demo"

' Load sample PDF document
unsearchablePDFMaker.LoadDocumentFromFile("sample1.pdf")

' Larger resolution - longer processing and larger PDF file size
unsearchablePDFMaker.RenderingResolution = 300

' Enable Black and White mode
unsearchablePDFMaker.Grayscale = true

' Process the document
unsearchablePDFMaker.MakePDFUnsearchable("result.pdf")

WScript.Echo "Unsearchable document saved as 'result.pdf'."