Dynamic image in Adobe Form
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 Kroll
Hi,
The moment i make my context element of type BINARY ,
the form does not display.
It says "Failed to process request"
Any suggestions?
Similar Messages
-
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 -
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. -
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,
akHi 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. -
Merging of cells of a dynamic table in adobe form
Hi,
I am trying to Merge 2 columns in a dynamic table in adobe form.The requirement is to merge column 3 and column 4 if column 4 is empty. I used the below javascript code in both "Form ready " and Initialize event of the row.
if (this.Cell4.rawValue == " ")
this.Cell3.colSpan = "2";
this.Cell4.presence = "hidden";
Note : Since above code was not working , i used the below code in my subform also but it did not returned desired output.
if(Table22.Row1.Cell1.rawValue == " ")
Table22.Row1.Cell3.colSpan = "2";
Table22.Row1.Cell4.presence = "hidden";
The problem is that in my dynamic table , its the second row where the requirement is fulfilled ie in the 2nd entry of my table the column4 is blank (the exact row number might change depending on input data).
is there a way to loop in the dynamic table and check if column 4 is empty for a particular row.
the above code does not help to fulfill my requirements. kindly help.
Thanks
AditiHello Aditi priya,
Hope you are doing good..
Please go through my recent blog..
http://scn.sap.com/community/interactive-forms-by-adobe/blog/2015/01/02/merging-internal-table-cells-dynamically-in-sap-adobe-forms-using-java-script-code
I hope you will find all answers from this blog..Reward if helpful...
Thanks & Regards,
B Raghu Prasad -
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. -
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 -
Populate Default Dynamic Filename In Adobe Form (On Click of Save in Menu) - SAP
Hi,
We have a scenario in which we want to populate the file name dynamically in Adobe form integrated in SAP Webdynpro.
Scenario -
A adobe form has been intergrated in the SAP webydnpro application which opens the form in Web Browser (IE).
There is a save button which is part of standard adobe form menu and on click of that save button (circled - 1 in image ) the name of the form ( i.e techincal name of adobe form created in SAP {ZTESTSS} ( circled - 2 in image ) appears.
We want to change the default name to (employee_date_time ) on click of save.
We have found a approch by using the folder level javascripts (http://forums.adobe.com/message/2266799#2266799%232266799).
In case we use folder level scripts "where should we write the JavaScript code in the Adobe Form to trrigger the this script on click of Save Button (in the menu)?"
Also is there any other apporch which does not require folder level javascript as its a security issue also we need to maintain in all the user systems.
Please let me know the approch to address the issue.
Thanks .
TausifHi,
you can't change the behavior of the save button in the browser nor in Reader/Acrobat.
You can add a custom button within your form which calls a custom script from a folder level script using the browserForDoc method.
The browseForDoc methos is the only one whcih can change the name in the saveAs dialog.
Here's an example., you can run from Acrobat console.
You need to combine it with the solution from the other thread to make it work with your form.
http://forums.adobe.com/message/2266799#2266799%232266799
var oRetn = app.browseForDoc({
bSave: true,
cFilenameInit: "MyForm.pdf",
cFSInit: "",
if (typeof oRetn !== "undefined") {
this.saveAs({
cFS: oRetn.cFS,
cPath: oRetn.cPath,
bPromptToOverwrite: false -
Getting Dynamic image in PDF ( form R/3 as URL )
Hi gurus ,
I am using a wd java application . In that i want to show employee pic in adobe form . I have RFC in place , that gives me URL (ex : http://retep.... ) containing employee pic Context is of type string
Now i have craeted a image field in PDF .when i directly binding context data to image dield , Image is not being displayed. i am not sure about scripting and how to bind that context to image field , so that based on the url it dynamically displayes employee pic.
Any suggestions are most welcome .
Regards
AbhayIn RFC instead of giving the URL ,tell them to give the image as a bytestream.And convert that byte stream into gif or jpg image using the following code,,,,,
byte[] pdfContent=wdContext.nodeOutput().currentOutputElement().getTestform();
IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.JPG_IMAGE/* or u can use GIF_IMAGE*/);
try{
wdContext.currentContextElement().set<this is a user created attribute of typw string>Pdfurl(pdfResource.getURL());
}catch (Exception e) {
wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
And bind this pdf url to an iFrame or adobe interactive form it wil work..
xxxxxxxxxxxxxxxxxxxxxx
Warm regards
Shanto Aloor
Edited by: Armin Reichert on Apr 26, 2008 7:06 PM -
Button to load dynamic image in interactive form webdynpro for java
Hi all
i tried to use image field to load dynamic image as shown in the online interactive form tutorial
and it worked for test but when try it with view appears inside viewset it doesnt....
so i think if we could call the image after render by pressing a button inside the form it may work
but the problem is i have no idea about how to implement such solution ,so if any one has any idea about how to implement such solution i will be thankful if he can share me the solution.
thanks.....
Naguib..use the following tutorial. it is very easy to follow and it works fine, i have tried that.
http://www.docstoc.com/docs/2540673/How-To-Integrate-ADOBE-form-on-WebdynPro-for-ABAP-and-Deploy-it-
in case of some more problems, ask again and point out the part of tutorial where there is a problem. -
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 -
hi all,
I am working o adobe forms, i have to print a paragraph text which has both dymanic and static elemets in it. By putting all the text in a static text it works fine, but allignment does not happen properly.
do we have something like &.....& we have in smartforms.???
I saw in a example in which the variable was used as { } and that was dynamically filled at run-time... but i am not able to do the same...may be i am missing some settings or something...
Any help will be appreciated....in this regard.hi
Check this
Difference between Smart Forms and Adobe Form
Re: Smart Forms & Adobe Forms
Adobe forms
/message/4983958#4983958 [original link is broken]
Re: adobe forms
adobe forms
adobe forms
adobe forms -
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.. -
Hi ,
I want to call Adobe forms with dynamic table .
Some one please explain me how I can implement this in ADOBE interface ?
Any Pointers or Help higly appreciated.
Thanks
Jameshi
Check this
Difference between Smart Forms and Adobe Form
Re: Smart Forms & Adobe Forms
Adobe forms
/message/4983958#4983958 [original link is broken]
Re: adobe forms
adobe forms
adobe forms
adobe forms
Maybe you are looking for
-
cannot open pictures in Window 8.1...getting message 'the remote procedure call failed". What is the solution? I recently bought a new HP computuer and uploaded Window 8.1. I then transfered photo files from old computer to new computer using a por
-
MSI Z77A-GD65 1st PCI-E x16 slot is unusable
Today I spent some time assembling my new system based on the Z77A-GD65. It's a bummer but I think I have to RMA the mainboard. My graphics card (MSI Twin Frozr II GTX 570) isn't recognized in the 1st PCI-E x16 slot (where it should be installed),
-
Submitting Your Podcast to iTunes
I need to break my question into steps, otherwise it will get confusing. If there is anyone that can advise me on my next steps that would be great! 1. I submitted my Podcast and realized I submitted the incorrect feed URL. 2. I than removed my Podca
-
is this the case? I tried to double click the clip marker but it won't allow....contrary to when you click a sequence marker and add notes... So is this just not engineered to do so with clip markers? Any suggestions if not....? I'm trying to run thr
-
Not able to use xsl:import in my XSL doc
Hi, I'm using Oracle 9.2.0.6.0 and DBMS_XSLPROCESSOR to transform my XML. I build XML using DBMS_XMLDOM methods, build stylesheet using dbms_xslprocessor.newstylesheet, then try to transform it using DBMS_XSLPROCESSOR.processXSL. It work fine. But if