%@ Language=VBScript %> <% Dim pdfDoc Dim content Dim text set pdfDoc = Server.CreateObject("PDFParser.Document") If not pdfDoc.Open(Server.Mappath("in_sample.pdf")) then Response.Write "
"
Response.Write "Could not open file." & "
"
End if
pdfDoc.PageNo = 1
set content = pdfDoc.Page.content
If Not (content Is Nothing) Then
for iImg = 1 to 10
Set image = content.GetNextImage
If Not (image Is Nothing) Then
Height = image.Height
imgName = "img" & iImg & ".jpg"
image.ConvertToRGB
image.Store Server.Mappath(imgName)
Else
Response.Write "
No more images" & "
Image " & iImg & ": (" & round(Height, 1) & " x " & round(Width, 1) & ") at (" & round(X, 1) & ", " & round(Y, 1) & ")
"
Response.Write "
There is no content on this page" & "