These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Setting image dynamically as a button Icon

manjunath.madanbhavi
Registered: Sep 26 2008
Posts: 3

Hello,
I have requirement where I need to set dynamic image to a button. I have used FDFSetAP.

I have done below activities already,

1. I am using FDFToolkit.
2. Created a PDF file containing Image (which need to be set as Icon to a button.
3. In the main PDF I have created a button with below attribute.
a. Type : Button
b. Read Only
c. Layout : Icon Only
d. Highlight: None

Below is the piece of Code in aspx.
------------------------------------------------------------------------------------------------------
Dim objFDFApp As FDFACXLib.FdfAppClass
Dim objFDFDoc As FDFACXLib.FdfDoc

objFDFApp = New FDFACXLib.FdfAppClass()
objFDFDoc = objFDFApp.FDFCreate
objFDFDoc.FDFSetFile(http://testsite/PDF/form.pdf")
Const FDFNormalAP As Integer = 0
objFDFDoc.FDFSetAP("icon1",FDFNormalAP, "F:\Icon\icon.pdf", 1)
Response.ContentType = "application/vnd.fdf"
Response.BinaryWrite(objFDFDoc.FDFSaveToBuf())
----------------------------------------------------------------------

I have attached the FDF that is generated,

It do embed the image data as part of Xobject.
BUt Image is not visible when PDF opens,button area is still blank.

Am I missing anything, or is there some setting in reader to enable it.

Please help.

My Product Information:
Acrobat Standard 8.0, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Are you able to open the PDF in Acrobat and manually import the FDF?

George
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
If the FDF references the PDF, you can just open the FDF and the PDF will be opened and the FDF imported as part of the PDF initialization.

George Kaiser