ActivePDF
Shopping Cart My Account Help Contact Us
Request a Call
Search
Products Solutions Support Downloads Corporate
Submit an Issue
Knowledge Base
Server Product Support
Examples & How-Tos
Support Options
Support Policies
Annual Subscription
Extensions
Documentation
Resource Links
   
 
 
 
 

HomeSupportKnowledge Base
 
activePDF KB #11694 - Retrieving Image Information with Server
activePDF KB #11694 - Retrieving Image Information with Server
Information: Example Printer Version | Return to Search
Retrieving Image Information with Server
 
Product Version Code Samples    
Server
3.5.2
VBS
VB.NET
C#
ASP
CF
PHP
 
Description
 
The following ASP example demonstrates the LoadImageInfo method, which retreives information from an image file specified with the ImagetoPDF method. This method also uses the following Server Properties:
  • ImageInfoBitsPerPixel
  • ImageInfoFileType
  • ImageInfoHeight
  • ImageInfoTotalPages
  • ImageInfoWidth
  • ImageInfoXResolution
  • ImageInfoYResolution
These files are required:
  • image.JPG - The image to convert to PDF.
  • LoadImageInfo.asp - Code detail provided below.

NOTE: This example is available for other programming environments. Please select from the Code Samples list above to display the download link for this example in the language appropriate to your environment.

Click here to download this example for ASP (includes required files):


Example:
<%
' Variables

' Name of image file
strImageFileName = Server.MapPath("image.jpg")

' Instantiate activePDF Server Object
Set objSVR = CreateObject("APServer.Object")

' LoadImageInfo
lngRtn = objSVR.LoadImageInfo (strImageFileName)
If lngRtn <> 1 Then
errorRtn "LoadImageInfo", lngRtn
Else
intBits = objSVR.ImageInfoBitsPerPixel
intType = objSVR.ImageInfoFileType
intHeight = objSVR.ImageInfoHeight
intWidth = objSVR.ImageInfoWidth
intXRes = objSVR.ImageInfoXResolution
intYRes = objSVR.ImageInfoYResolution
intPages = objSVR.ImageInfoTotalPages
Response.Write "Bits: " & intBits & "
Type: " &
intType & _
"
Height & Width: " &
intHeight & "x" & intWidth & _
"
X Resoulution & Y Resolution: " &
intXRes & _
"x" & intYRes & "
Pages: " &
intPages
End If

' Release Object
Set objSVR = Nothing

' Error Return Handling
Sub errorRtn(strMethod, RtnCode)
Response.Write strMethod & " error: " & RtnCode & _
"<br><a href='http://www.activepdf.com/support/kb/?id=10549&tk=ts'>" & _
"Return Codes</a>"
End Sub
%>
 
Keywords
 
LoadImageInfo, ImageInfoBitsPerPixel, ImageInfoFileType, ImageInfoHeight, ImageInfoTotalPages, ImageInfoWidth, ImageInfoXResolution, ImageInfoYResolution
 
Last Updated 2008-04-29 Printer Version | Return to Search
 
Knowledge Base Article Feedback*
*KB article feedback ONLY (submit support issues here)
Quality of this article?
  Poor Excellent 
1 2 3 4 5 6 7 8 9 10
Is this article helpful? Yes       No       Maybe
Comments (Optional)
Email Address (Optional)
Please enter the word "PDF"
(without quotes)
 
The information in this article is for the use of activePDF Customers and Evaluation Users Only. No part of this document may be transmitted or reproduced without the express written consent of activePDF.

Copyright © 2005, activePDF, Inc. All Rights Reserved
2003 activePDF Site Map Feedback Privacy Policy Legal