ByteScout PDF Extractor SDK – ASP Classic – Extract Text

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – ASP Classic – Extract Text

ByteScout PDF Extractor SDK – ASP Classic – Extract Text

ExtractText.asp

<%

' In case of "Server.CreateObject Failed", "Server object error "ASP 0177 : 8000ffff" or similar errors:
' Please try the following:
' - Open IIS 
' - Find application pools (DefaultAppPool is used by default)
' - Open its properties and check .NET CLR version selected:
' - if you have  .NET 1.1 then change to .NET CLR 2.00
' - if you have .NET CLR 2.00 then try to change to .NET CLR 4.0


Set extractor = CreateObject("Bytescout.PDFExtractor.TextExtractor")
extractor.RegistrationName = "demo"
extractor.RegistrationKey = "demo"

' Load sample PDF document
extractor.LoadDocumentFromFile("..\..\sample2.pdf")

' Save extracted text to file
outputText = extractor.GetText()

response.ContentType = "application/text"

' add content type header 
response.AddHeader "Content-Type", "application/text"

' set the content disposition
response.AddHeader "Content-Disposition", "inline;filename=HelloWorld.text"

' write the output text
response.Write OutputText
response.End


Set extractor = Nothing

%>


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next