Expand my Community achievements bar.

From an image field to an image object...?

Avatar

Former Community Member
Hello everyone,



Since the image field will always be in the front I have a problem. I want the user to choose an image. This image should be in the background but after having chosen the image it appears in the front covering every other object.

So what I'm thinking about is creating an image object for the background and a small image field where the users choses his image. The chosen image should then appear in the image object in the background.



I tried it with javascript but it didn't work. I had success with textfields trying something similar, but now I have no clue about it.



Does anybody know how to realize this?



Thanks, Knud
15 Replies

Avatar

Former Community Member
The problem with using an image object instead of an image field is that image objects are static objects. This means that you can't change their value at run-time (in Acrobat).



Unfortunately, I don't believe there's a work-around to the bug where the content of an image field is always displayed in front of any field it's over regardless of z-order.



Is there a reason why the image field must appear behind other fields on your form?



Are you aware that you can set a default image in an image field at design-time (in Designer) and embed the image data into the form so that the form can be deployed anywhere without having to retain access an the image file on a disk/server (in case you were thinking that the image always had to be loaded at run-time)?



Stefan

Adobe Systems

Avatar

Former Community Member
The form data will be collected. It is for someone who isn't able to design something, so I will give him a Form which looks similar to the final sheet. The background shall be able to be changed.



So now the problem is, that I would have to do it a different way and challenge his imagination, when he's only a small field and I'll tell him that this is his background image.



Thanks for your answer, though.



Do you have a hint how to manage the thing with the pictures? What's the best way to get the pictures, he chose in the form?

Include it into the XML? but then its encryptet with base64, isn't it? So Indesign won't be able to import it. DO you have any idea for this "workflow"?

I also could tell him to email the pictures to me and then import them manually, but this will cost too much time for this thing.



Thanks a lot so far!!



Knud

Avatar

Former Community Member
I'm not quite certain I'm following you on this.



If I understand correctly, you're giving this image to someone else to use as a background on a form and this image is supposed to be what the form looks like. This other person is simply supposed to overlay fields on top of the image where the fields have been drawn?



Yes, if you embed the image into the form, it gets Base64-encoded. Based on your reply, however, I don't think this would solve anything for you.



Could you give this person multiple image files that they could place around the fields? You could also provide an image which details the "finished" look of the form as a design guide.



Stefan

Adobe Systems

Avatar

Former Community Member
Ok.. It is a Form with some text fields and some small picture fields. In the background of all these fields shall be one picture which can be chosen by the user. But this one actually should be in the background, not in front.



"Could you give this person multiple image files that they could place around the fields?"

What do you mean by that? That I provide a certain amount of images? for filling the fields?



Thanks for the hint to use an jpg image as preview.



Knud

Avatar

Former Community Member
What I'm getting at is that it sounds like you're trying to use the image field at run-time to load an image which contains the
design of the form -- possibly containing some text and field place-holders -- which you're wanting to use instead of using XFA objects to design the form.



In the end, there's definitely a problem with having an image field behind other fields on a form whereby after loading an image into the image field, the image will always be rendered on top of any visible fields, regardless of hierarchy.



That's why I'm trying to figure-out what you're attempting to do in order to determine whether there's a work-around or if what you're trying to do simply can't be done because of this bug.



Stefan

Adobe Systems

Avatar

Former Community Member
I will start with the PDF now. I have a PDF with some text on it. The text is in some fields which contain only one line. Besides there are some images on it, which are always in the same position. And then there is also one picture in the background. This picture does not contain the layout. It shall be the background image of this document. It must be variable.



To simplify the creation of these Docs I created a Form which is layouted the same way as the final PDF. The users (not everyone in our company is able to use indesign etc.) can simply fill the form fields and choose images from a gallery to fill the small image fields and the large one in the background.



I figured out that it is possible to render objects in front a chosen image. To do this, choose an image an afterwards click anywhere on the form except this image field. Then you cannot see the fields below, but you can click them and chose an image, though. In this case the chosen picture will be on top of the large picture in the background.



I hope you're understanding what I'm trying to do.



I've another question concerning forms in acrobat:

Is it impossible to send the simple XML data per email button as it is possible in Designer?



Thanks for your effort!!

Knud

Avatar

Former Community Member
It sounds like you've figured something out with respect to your image field problem.



Now for your question about forms in Acrobat, wondering if it's possible to send the XML Data of a form with an email button:



If you're asking whether it's possible to submit form data in Acrobat, the answer is "yes". You just need to use an email or HTTP submit button on your XFA form and save the form as a PDF. Clicking on the button in Acrobat should then submit the form's data in XML format to the specified address.



It's also possible to submit the form along with the data in a single PDF. You can use other submission options by using a regular button, specifying that it's a
Submit button using the Object palette's Field tab and then going to the Submit tab that appears once you change it to a submit button.



Stefan

Adobe Systems

Avatar

Former Community Member
Yes I figured something out but it isn't useful cause this would be too complicated for the user. You do not have a workaround in mind or an idea how I could try to solve this?



What's the difference between this button: "You just need to use an email or HTTP submit button on your XFA form"



..and this one: "You can use other submission options by using a regular button"



I already tried the "regular" submit button. But I could not choose the XML format as submission format. My fault?

Avatar

Former Community Member
Unfortunately, I believe there's nothing you can do to get around the problems you're having with the image fields. It's a bug in Acrobat. I've logged it and I hope it'll get fixed in a future release.



Now for the submit buttons:



The "email submit button" and "HTTP submit button" objects are pre-configured to submit XML data to an email or HTTP address, respectively.



The "regular button" object can be turned into a submit button by choosing
Submit from the Type property on the Field tab in the Object palette. After making it a submit button, a Submit tab will appear in the Object palette. You can then use the Submit Format property (drop down list at the top) on that tab to set what gets submitted. Setting it to
XML Data and specifying a URL such as "mailto:email@address.com" would essentially make the submit button into an "email submit button" equivalent.



Stefan

Adobe Systems

Avatar

Former Community Member
Hi,



How can we differentiate between Picture form field and Push button? In both the case '/ft' entry is 'btn' only. It will be very helpful for me if any body can tell me.



Regards,

Shekhar

Avatar

Former Community Member
Shekhar,



I'm a little confused by your question. Are you talking about XFA form fields (buttons and images) or AcroForm fields? What do you mean by the "/ft" entry?



Stefan

Adobe Systems

Avatar

Former Community Member
Hi Stefan,<br /><br />Thanks for responding to my last mail. I am talking about the XFA(xml form architecture). Actuallly i am working on Picture form field in PDF which Adobe has newly introduced. In this type of form field , user can add an image. But i am not able to differentiate between the "Picture form field" and "push button". The only thing i have found that the picture form field entry exist in dataset but not the Push button.<br /><br />29 0 obj<br /><<<br />/Length 13533<br />>><br />stream<br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data><form1><IMAGE href="" xfa:contentType="image/jpg"></IMAGE></form1></xfa:data></xfa:datasets><br />endstream<br />endobj<br /><br />In the above case the "Image" is a picture form field.<br /><br />Another difference i found between "push Button" and "Picture Form Field" is the MK dictionary as below.<br /><br />Pushbutton<br />-----------<br />/MK <<<br />/BG [ 0.831375 0.815689 0.784317 ]<br />/CA (Print Form)<br />/BC [ 0 0 0 ]<br />>><br /><br />Picture form Field<br />-------------------<br />/MK <<<br />/TP 1<br />/I 17 0 R<br />>><br /><br />But i want to find the exact difference. May be some bit in Form Field Flag(ff) signify the picture form field. It will be very helpful to me if you could tell me the exact difference.<br /><br />Kind Regards,<br />Shekhar Kumar Keshri

Avatar

Former Community Member
What's your overall goal for this? I'm not sure how to differentiate the two based on the COS objects in the PDF (manipulating PDF's at that level isn't really my thing). Differentiating between the two with script on the form that goes against the XFA Form DOM is simple enough if that would help you.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Hi Chris,



<<<<

What's your overall goal for this?

<<<<

I need to fill the image form field with the image. Generally you won't find any entry for button in "dataset". Since the value we are going to provide for this type of form field is very large i.e. the image stream so i need to check whether it is image form field or not. I hope you will understand my problem.



Regards,

Shekhar Kumar Keshri

Avatar

Former Community Member
I'm back with a new idea:



A kind of workaround could be to simulate a click on an area next to the image field. (NOT ON the image field) So after this the other fields which are below the image field will become visible again when the user moves the cursor over them (mouseover effect).



The idea with the click is only an example. It could also be done by simply activating a different form field after the user having chosen the image.

I think that this should be possible by scripting, isn't it? It won't be the best way, but it would help....+



Regards, Knud