Save a server-side temp image & retrieve it using the ASP Barcode Server Component
NOTE: This document only refers to the 2002-2007 version of the ASP Barcode Server Component for IIS. The ASP.NET Web Forms Server Control, dated December 2007 or later performs the saving and retrieving of the image automatically. Obtain the latest version by updating the Priority Support and Upgrade Subscription.
Save a temp image and then retrieve it for applications such as PDFlib that use functions called ‘open_image’ and ‘open_image_file’. Add this code to the .asp file distributed by IDAutomation, for example, in the linear package the file is idalin.asp. Remark out the commands that send the image to the browser.
‘Save the image to a unique file
FileName=Session.SessionID & “.jpg”
IX.Export.ToFile FileName, 1
Then, to retrieve it from an application on the server, access the variable FileName. Or, to retrieve it from the browser:
Problems saving the JPEG file on ASP server:
In some IDAutomation documentation as well as in the ASP file, an error and the correction for saving a temp image is shown in the following syntax:
ERROR: IX.Export.ToFile “C:\Inetpub\Scripts\10test.jpg”, ixstJPG
CORRECTION: (Replace ixstJPG with 1) IX.Export.ToFile “C:\Inetpub\Scripts\10test.jpg”, 1
Other image formats may also be saved. Valid values are as follows: 1= JPG, 2=PNG, 3=PSD, 4=TIF, 5=PCX, 6=TGA, 7=WBMP, 8=BMP & 9=WMF.
Insufficient security rights; problem saving the JPEG file on ASP server:
Internet access rights may need to be modified in the directory where the JPEG files are saved. This is by design of the Windows 2000 security system and not something that can be controlled through IDAutomation DLLs. Although the DLLs should be viewed as system objects, in some situations, Windows security takes over to verify the user has access to save the file.