We have upgraded to the dynamic PDF version 3 only recently.While i am making the changes to take effect i find that in my page where i create the barcode according our company logic and use it in the AddImageRawData,it gives me an error saying that the call is invalid.
My coding is as follows:
The arrBuffer has a code value of |||aaa|||,the data required for the barcode.It was working fine with the previous version.
If isarray(arrBuffer) then
strImage=p_objDoc.AddRawImageData( "image/jpg", arrBuffer)
p_objPage.AddImage strImage,0,620
End if
Kindly suggest me where i am wrong and the way to proceed with this.
Thanks,
Sheeba.
Invalid procedure call or argument
Re: Invalid procedure call or argument
Support · Sep 15, 2006Hello Sheeba,
Is arrBuffer an ImageData object? If not, that’s the reason you are getting the error because the AddRawImageData method expects ImageData as the second parameter.
Following is the sample code to use when adding image using AddRawImageData method:
' Use ADODB Stream object to get a Byte Array of the Image File
Dim MyStream
Set MyStream = Server.CreateObject( "ADODB.Stream" )
MyStream.Open
MyStream.Type = 1
MyStream.LoadFromFile( Server.MapPath( "Images/DynamicPDF_Top.gif" ) )
Dim MyStrPath
MyStrPath = MyDocument.AddRawImageData( "Top.gif", MyStream.Read )
MyStream.Close
Set MyStream = Nothing
Thanks,
ceTe Software Support Team
Re: Invalid procedure call or argument
Forum member · Sep 16, 2006Sir,
I understand that I am supposed to pass a image buffer as the second argument.This was the same code which worked fine with version 2 and only after upgrading I came up with this error.The argument I pass 'arrbuffer' is an image which is actually dynamically built according to the barcode.Am i making it clear?
This image 'arrBuffer' is then sent as an argument for the AddRawImageData.
Is this wrong?
Sheeba.
Re: Invalid procedure call or argument
Support · Sep 18, 2006Hello Sheeba,
You may require some modification minor modification in your code for the code that worked in v2.6 to work in v3.0. Following is the link to the Compatibility
page on our web site that lists different things that need to be changed.
If you continue getting the same error, please send us over the image file and the source code you are using to our [^a|mailto:support@cete.com|Support Team^], so that they can take a look at it.
Thanks,
ceTe Software Support Team