Images in Adobe Form
Hello All,
I want to display images in Adobe form. I've done the following. The images are not static but dynamic - for each time the form loads the images are different.
1. Created the image field (Va_Image)
2. The URL for the image comes from a Context node which is mapped to the PDF DataSource.
3. i mapped the context node to a invisible TextField (Image_URL)
4. I wrote the following script (to set the href of image dynamically) in the initialize event of the Page1 on which the text field and image are present
xfa.form.Vn_MasterRecord.Page1.Va_Image.value.image.href = xfa.form.Vn_MasterRecord.Page1.Image_URL.rawValue
5. On preview of the PDF in Adobe Live Cycle Designer, i get the image correctly.
However, when i execute the Webdynpro application (java), the image doesn't appear on my final screen.
Any pointers? am i missing something?
Points assured for good answers.
Thanks in advance,
Regards,
ak
Hi Arun -
For dynamic image,
You cannot directly display a logo which is uploaded in se78 on an adobe form. The image format needs a conversion.
- You can write this code in your interface section.
- Create a global variable g_logo of type xstring."converted logo and v_name of type STXBITMAPS-TDNAME. "logo name in se78.
- Pass these parameters of the image in se78 to this method.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = v_object " 'GRAPHICS'
p_name = v_name " Name of the logo as in se78
p_id = v_id " 'BMAP'
p_btype = v_btype " 'BCOL' (whether the image is in color or black and white)
RECEIVING
p_bmp = v_field
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
g_logo = v_field.
- The variable g_logo will have the converted image.
- Drag g_logo into the context from the interface.
- Finally, in the context of the adobe form, make a graphics node and choose Graphic Type as Graphic Content.
- The Field should have the global variable g_logo and the mime type is 'BMP' (with quotes).
- Create an image field (not just image. That would be static) and in binding, bind it to g_logo and check the check box u2018Embed image datau2019.
I think, this should work.
Similar Messages
-
Hi i am trying to disply image in adobe forms using ABAP, But i can't abl ?
hi friends,
I am using adobe forms to display the VORNA , NACHN and EMPPHOTO.
for this i created an interface with the 3 import parameters like IM_VORNA, IM_NACHN and IM_PHOTO.
Then i desingned the form with this interface.
I dragged the IM_VORNA, IM_NACHN to ADOBE form layout.
And for employee photo i created the IMAGEFILED in layout.
And i setted the imagefield binding property to $record.IM_PHOTO.
To call this ADOBE form i using the ABAP code.
My code is like this......
*& Report ZHR_EMP_PHOTO1
REPORT ZHR_EMP_PHOTO1.
TABLES: PA0001, PERSON.
DATA: ITAB_EMPDATA LIKE TABLE OF PERSON,
ITAB_DATA LIKE TABLE OF PERSON WITH HEADER LINE.
DATA: P_CONNECT_INFO LIKE TABLE OF TOAV0 WITH HEADER LINE,
P_DOCUMENT_TYPE LIKE TOAV0-RESERVE,
URL TYPE char255.
DATA: VORNA TYPE VORNA, "VALUE 'SHANKAR',
NACHN TYPE NACHN, "VALUE 'REDDY',
PATH TYPE XSTRING,
TPATH TYPE STRING.
DATA: FM_NAME TYPE FUNCNAME.
DATA: FP_OUTPUTPARAMS TYPE SFPOUTPUTPARAMS,
FP_DOCPARAMS TYPE SFPDOCPARAMS,
FP_FORMOUTPUT TYPE FPFORMOUTPUT.
PARAMETERS: PERNR LIKE PERSON-PERNR.
START-OF-SELECTION.
CALL FUNCTION 'HR_GET_EMPLOYEE_DATA'
EXPORTING
PERSON_ID = PERNR
SELECTION_BEGIN = SY-DATUM
SELECTION_END = SY-DATUM
IMPORTING
PERSONAL_DATA = ITAB_DATA
EXCEPTIONS
PERSON_NOT_FOUND = 1
NO_ACTIVE_INTEGRATION = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MOVE ITAB_DATA-VORNA TO VORNA.
MOVE ITAB_DATA-NACHN TO NACHN.
*Function Module To check Existance of Image
CALL FUNCTION 'HR_IMAGE_EXISTS'
EXPORTING
P_PERNR = PERNR
IMPORTING
P_CONNECT_INFO = P_CONNECT_INFO
EXCEPTIONS
OTHERS = 2.
P_DOCUMENT_TYPE = P_CONNECT_INFO-RESERVE.
*Function Module To Get the URL of Image
CALL FUNCTION 'SCMS_DOC_URL_READ'
EXPORTING
STOR_CAT = SPACE
CREP_ID = P_CONNECT_INFO-ARCHIV_ID
DOC_ID = P_CONNECT_INFO-ARC_DOC_ID
COMP_ID = 'DATA'
DP_URL_ONLY = 'X'
IMPORTING
URL = URL
EXCEPTIONS
OTHERS = 10.
IF SY-SUBRC <> 0.
ENDIF.
MOVE url TO tpath.
CALL FUNCTION 'HR_KR_STRING_TO_XSTRING'
EXPORTING
* CODEPAGE_TO = '8500'
unicode_string = tpath
* OUT_LEN =
IMPORTING
XSTRING_STREAM = path
EXCEPTIONS
INVALID_CODEPAGE = 1
INVALID_STRING = 2
OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
I_NAME = 'ZHRIN_EMP_PHOTO'
IMPORTING
E_FUNCNAME = FM_NAME
* E_INTERFACE_TYPE =
*WRITE: fm_name.
*/1BCDWB/SM00000204
*SAPR3://SAPR3CMS/get/520/Z2/4907DEB34A170115E10080000A8C6728/DATA
*MOVE 'SAPR3://SAPR3CMS/get/520/Z2/4907DEB34A170115E10080000A8C6728/DATA' TO PATH.
FP_OUTPUTPARAMS-NODIALOG = 'X'.
FP_OUTPUTPARAMS-GETPDF = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
IE_OUTPUTPARAMS = FP_OUTPUTPARAMS
EXCEPTIONS
CANCEL = 1
USAGE_ERROR = 2
SYSTEM_ERROR = 3
INTERNAL_ERROR = 4
OTHERS = 5
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
fp_docparams-langu = 'E'.
fp_docparams-country = 'IN'.
fp_docparams-FILLABLE = ' '.
CALL FUNCTION fm_name
EXPORTING
/1BCDWB/DOCPARAMS = fp_docparams
I_VORNA = vorna
I_NACHN = nachn
I_URL = path
IMPORTING
/1BCDWB/FORMOUTPUT = fp_formoutput
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* E_RESULT =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: lt_att_content_hex TYPE STANDARD TABLE OF solix. "TABLE OF TEXT80.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = fp_formoutput-PDF
* APPEND_TO_TABLE = ' '
* IMPORTING
* OUTPUT_LENGTH =
TABLES
BINARY_TAB = lt_att_content_hex
tables rlgrap.
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i,
gd_file TYPE c.
DATA: flength TYPE i.
*selection-screen begin of block m with frame.
data: p_file TYPE rlgrap-filename.
*selection-screen end of block m.
flength = xstrlen( fp_formoutput-PDF ).
* At selection screen
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
* Display save dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Enter File Name to Save'
default_extension = 'PDF'
default_file_name = 'accountsdata'
initial_directory = 'c:\temp\'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.
p_file = ld_fullpath.
call function 'DOWNLOAD'
exporting
bin_filesize = flength
filename = p_file
filetype = 'BIN'
importing
act_filename = p_file
tables
data_tab = lt_att_content_hex.
with this code I am able to see the VORNA, NACHN field data in ADOBE Forms. But i am unable to see the employee photo.
Any helps will be appreciated.....
Regards,
Shankar.Or post a URL.
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================
"Alan" <[email protected]> wrote in
message
news:C0E592D7.29A315%[email protected]..
> go back to the dialog box, and re-browse to pick the
image.
> Find the pulldown in the "browse to file" dialog box
that gives a choice
> of
> Relative to site root, or Relative to document.
>
> set to relative to document.
> -
Inserting Images in Adobe Forms
hi all,
My requirment is that i need to print three diferent logos in a single form by validating them with the company code.
i have to print the respective company code logo in the adobe form how can i do that and tell me the steps for the formcalc coding.
Thanks in advance.
M.PhanindraHi Phanindra,
Place the All Images in Form and Go to the Form Ready Event ,
Initially Hide all the images,
Assume,
image1.presence = "hide"
image2.presence = "hide"
image3.presence = "hide"
Place the one textfield for validating images,
Goto the Exit event of the textfied, there u will write a code for visibility,
if (textfield1.rawValue = "1") then
image1.presence = "visible"
else if (textfield1.rawValue = "2") then
image2.presence = "Visible"
elseif (textfield1.rawValue = "3")then
image3.presence = "visible"
endif.
This code, may help for u,
By
Parthi -
Dynamic Text to be displayed as Image in Adobe Forms
Hi ,
I have a requirment to display dynamic text in the image format in the Adobe Form.
I have tried using the Image field instead of text field.But could not solve the problem.
kindly help me.
Thanks.Hello,
if you send a text into a text field to the print form, it looks like a paper print, you cannot tell where there is a picture and where is the text. So you don´t care about the image/ text problem. If you need to make difference between two for the user, you can put the text (your image) into a rectangle, use a background or anything like this.
Why would the image make any difference?
Otto -
How to update image in adobe form
Good Day
I am trying to update image in adobeform. i used object library->image->and double clicked it and i got a popup and given the path. i got my image there
but when i am running my adobeform in url I am unable to see the image on it. is it because the path is from my desktop. there is no binding done with any field on the context of adobeform.. do i need to upload the image in se78 and then do binding....
pls help
Regardshi battula,
1.upload the image in se78
2.Get the xstring of image by function module
data img_ x_string type xstring.
data img_string type string.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS' " SAPscript Graphics Management: Application object
p_name = 'LOGO' " Name of image
p_id = 'BMAP' " SAPscript Graphics Management: ID
p_btype = 'BCOL' " SAPscript: Type of graphic
RECEIVING
p_bmp = img_x_string.
and convert this xstring to string by function module
CALL FUNCTION 'SSFC_BASE64_ENCODE'
EXPORTING
bindata = V_FIELD
* BINLENG = BINLENG
IMPORTING
B64DATA = img_string.
* EXCEPTIONS
* SSF_KRN_ERROR = 1
* SSF_KRN_NOOP = 2
* SSF_KRN_NOMEMORY = 3
* SSF_KRN_OPINV = 4
* SSF_KRN_INPUT_DATA_ERROR = 5
* SSF_KRN_INVALID_PAR = 6
* SSF_KRN_INVALID_PARLEN = 7
* OTHERS = 8
3.bind the img_string to imageField in adobe form ..
if you want to update image then update image in se78 keeping name same.
4.and write also javascript code
on initialization event of ImageField
this.access = "readOnly";
hope it will help.
regards
Jitendra.. -
Hello experts,
I have created a form with the transaction sfp and want to bind in an image. This image has to be dynamic, so that it can be changed, if necessary.
Is it possible to have an image in a structure and this structure in the interface of the adobe form in sfp?
The structure will be part of a web dynpro for abap context. So I will create the dynamic in the web dynpro component.
Can someone help?
Thanks a lot!
Best Regards
Ingmar
Message was edited by:
Ingmar KrollHi,
The moment i make my context element of type BINARY ,
the form does not display.
It says "Failed to process request"
Any suggestions? -
Hi,
Can anyone tell me how can i display images from a URL , Adobe doesnt support href property from version 8.1...Try this,
Re: Image field dynamic display employee photo
Thanks and Regards,
Siva -
How to upload an image on Adobe form and add some condition for image display?
hello,
you need to use Image field, not only and image to display the picture chosen in backend. For a simple image you need only image field. Check there is a checkbox "embed image data" and set it to true.
You need to pass the picture as a XSTRING from backend if I remember it well. Please check How to integrate Adobe form
on WD ABAP. Link: http://www.docstoc.com/docs/2540673/How-To-Integrate-ADOBE-form-on-WebdynPro-for-ABAP-and-Deploy-it-
this will show you the fast working example of working with pictures in adobe forms. Regards Otto -
Hello All,
I have a requirement for dynamic images on Adobe form.
I have some images stored on portal server in a afolder called images which gets upadeted every hour . I have developed a java webservice which can get this images from the portal server.
The reponse of the webservice is like " http://<Hostname>:<portnumner>/images/abc.png". I have impoted this webservice as Adaptive webservice model in WD.
I have executed this webservice in WD and binded the response to IFRAME UI element and I am able to images(http://<Hostname>:<portnumner>/images/abc.png).
Now I want these images to be on the PDF.
I have installed and configurred ADS and binded the Webservice response as Datasource to the intercative form. I am able to see the datasourcse in the data view of the interactive form.
Now when I bind the response to the Image Field UI element I am unable to see the image.
Please let me know if anyone has any idea on this.
Thanks,Hi Naresh,
It's an issue with ADS. Exactly not an issue but a requirement. The server on which images are available, has to be exposed to ADS.
Your Admin might help you on that.
Regards,
SV. -
Multiple images into a subform in a dynamic non-interactive adobe form
I want to convert a set of images into a PDF (one page for each image) with Webdynpro. I'm trying with a non-interactive adobe form.
I followed the tutorial "Dynamic Non-Interactive PDF Form".
I've got a multiple Context node: 'Images' with a string attribute 'url' for each image.
In the form, I've created subform1, and subform2 within. I put an image field into subform2, setting its url to: $record.Images[*].url
and its script to: this.value.image.href = xfa.resolveNode(this.value.image.href).value;
It doesn't work.
If I add a field into subform2 binding it to url attribute, I can see some lines with the correct path for each image, but the image isn't displayed.
It works with a single dynamic image in the page. What am I doing wrong?
Regards
Anibal Pozo.No. It's form scripting. In any case I'm working with Webdynpro Java.
I tried this code in table 'initialize' event.
for int=0 upto $record.nImages do
Table1.Row1[int].ImageField.value.image.href = $record.Images[int].url;
Table1.Row1[int].Cell4.value.#image.href = $record.Images[int].url;
endfor
Cell4 is a static image.
In 04SP9, it show always the same image in the image field (first column), and alternating image in cell4 (second column).
In 04sSP6, it shows always the same image in all the rows in both columns.
Any idea? I didn't find any OSS related. -
How to SAVE the images in the offline adobe form pdf
Hi All,
Actually I am working offline adobe forms.In my one of the requirement user want to upload the images in the final output pdf form. For this requirement I added Image Field in the layout. So, now I am able to upload the images from desktop but I am unable to save the uploaded images in the pdf form.
Please let me know is there any parameters need to pass for this requirement.
Please help me ASAP and your help will be appreciated.
Thanks,
Ravi.Hi Sandy,
Sorry for Delay.Could you please provide script code for the Button and in which event we want to add the code
I want to Save the lot of images in the PDF. For that I kept Image field in the form.Here I am able to upload the images but those are not saved.
If possible please share the details document.
Please help me.
Thanks,
Ravi. -
Can I enter an image into a form on Adobe Forms Central?
Can I enter an image into a form on Adobe Forms Central?
Yes, you can add an image to a form design using the toolbar button highlighted below:
-
Adobe form - Printing images dynamically
I have created a simple read-only (not interactive) Adobe form. At the end of the document, I need to print a signature depending upon the approver (which I can access from the data structure imported into the form.).
If I create an image field, how do I assign the image dynamically depending on the approver?
I have thought of an alternative solution of creating 3 separate forms each with a static image of the signature and calling a separate form in the program depending on the approver. But I was wondering if I can assign images dynamically so that I can have only one form.
Any help will be greatly appreciated.
Jitendra MehtaHello . The solution is easy, I have posted the solution into IFbA forum under NeWeaver many times. And I can recommend you to read this article where there is a complete solution for your problem:
http://www.docstoc.com/docs/2540673/How-To-Integrate-ADOBE-form-on-WebdynPro-for-ABAP-and-Deploy-it-
It was originally SAP SDN blog, but I am not able to locate it on sap site any more. Hope this solves your problem, regards Otto -
Fetching a image in the adobe form from sap server/appliaction layer
hi all,
i want to fetch a logo/image from the application layer/ sap server, so that everyone can use it in adobe form. i have already upload the image using SE78.
I try to add the image into library, it works. But the problem is that, only from my login i can access that image, other can't. I want that image to be shared by everybudy like we use in smartform.
But i want to fetch that image from SAP server/application layer.
plzz help me out...
and tell me the steps for fetching the image from sap server/application layer into the adobe form layout.Hi rahul,
I too have the same requirement. Can you please tell me the steps. -
Problems with Image Field Table in Adobe Forms
Hello,
I have a desgined a Adobe Form(Print Only) in the Adobe Desinger in NWDS.
The form layout contains a table of images in 2 columns and 3 rows. Every Column has a Image Field and a TextField displaying the Image URL.
The URL of this image is passed at runtime.
The problem is that when the form is rendered, All the Columns have the same image which is the URL in the first row first column. However the text field displays the correct URL.
Is this some known bug in the Adobe Forms, or I am missing some property.
Regards,
ShubhamHi,
The solution was to put the following code in the initialize event of the image field.
this.value.image.href = <Photoimagepath>.rawValue;
Where <Photoimagepath> is the image path.
Regards,
Shubham
Maybe you are looking for
-
Images missing GPS info in photo library
hey everyone, I've been using iPhone taking picture and screenshot, import images from other app like GoPro App, wechat, etc, I'm pretty sure before not only the photo taken by iPhone build-in camera has the GPS info, the rest image also has that GPS
-
How to execute an sql function containing a SELECT query as paramete
Hi I want to execute this sql query using JDBC methods , but could not be able to find any appropriate method to execute this query. select dbms_xmlgen.getxml(select * from departments) from dual please some one help with appropriate java code to exe
-
Hi Experts, I have searched SDN, but couldn't find solution. I have a metachain with 16 local chains in it and it is getting failed as the 16th local chain is failed. And displaying messages as follows.. 19.05.2011 05:17:14 Job started S
-
Cisco 5508-WLC using MS NPS as RADIUS Server for EAP-TLS
Has anyone experienced a problem getting a Cisco WLC to work with MS NPS server? We've done it before albeit with differnt code versions. I have a Cisco 5508 WLC running 7.0.116.0 code hosting a WLAN configured for WPA2 with 802.1x for authentication
-
I archived an idvd project w both menu and assets included, or whatever the 2 boxes are - i cannot remember. I transferred the file to another machine (both intel - same os, versions, ect) but when i open the archived project, the video plays if i 'p