Issue with emailing dynamically generated PDF (InteractiveForm UI element)

Hi Experts ,
I have a requirement according to which i need to generate PDF dynamically using webdynpro java and email the dynamically generated PDF.
I am facing issue while emailing the dynamically genarated pdf.
It gives me an exception :
nested exception is: javax.mail.MessagingException: IOException while sending message;  nested exception is: java.io.IOException: no data
This is because its unable to get the binary data (byte array) of the dynamically generated PDF which is required to send mail.
Could some one suggest me how to fetch the binary data of the dynamically generated PDF.
For dynamic PDF generation i am using dynamic generation of UI element   InteractiveForm UI Element 
In case of static PDF (i.e. the PDF genarated by inserting the InteractiveFrom Ui element on the view using the insert child option) we do set the pdf source property of Interactive Form UI element to a context variable attribute of type binary but  my problem is ,how to set the PDF source of a dynamically generated Interactive form UI element to a context variable attribute of type binary ..
Any help would be highly appreciated.
Regards ,
Navya

Hi Frank ,
the code to generate PDF dynamically is written in the WdDoModifyView section of the view as the PDF need to be generated dynamically., i.e. by adding InteractiveForm UI elements at  runtime.
I tried the code suggested by you  but i gave mean exception.
errorjava.io.FileNotFoundException:
(The system cannot find the path specified)
Kindly let me know where i am going wrong .
Below is the code that i  had written in a separate method m_mail().
This would take as input the name of the dynamically generated data node and is called from the wdDoModifyView section of the view
public void m_mail( java.lang.String p_dynamicnodeName )
               ByteArrayOutputStream templateSourceOutputStream = new ByteArrayOutputStream();
          //        This would need to have the Templatefile in the Mimes-Directory of the Webdynpro-Component
               String templateUrl = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "AdobeView1_InteractiveForm.xdp");
               InputStream templateSourceInputStream = new FileInputStream(templateUrl);
               IOUtil.write(templateSourceInputStream, templateSourceOutputStream);
               IWDPDFDocumentCreationContext pdfContext = WDPDFDocumentFactory.getDocumentHandler().getDocumentCreationContext();
               pdfContext.setData(WDInteractiveFormHelper.getContextDataAsStream(wdContext
               .nodeCtx_vn_dynmcnd()
               .getChildNode(p_dynamicnodeName, IWDNode.NO_SELECTION)));
               pdfContext.setTemplate(templateSourceOutputStream);
               pdfContext.setInteractive(false);
               IWDPDFDocument pdf = pdfContext.execute();
               if (pdf != null) {
                pdfArray = pdf.getPDF();
Kindly let me know where am i going wrong.
Regards ,
Navya

Similar Messages

  • Sign in issue with email

    i am still getting a issue wtih my email sign in i have click twice on the sign in box . i am using the new bt home page both on w8 and the desktop and it does it on both email accounts my primary acc/ and sub acc. my sub acc email address i use to sign into my microsoft account. i have run bt desktop help pc heath check and it come back with cache size/clear history/ auto detect settings. so i clicked on the box to clear them and still got a issue with email sign in.

    I have a large number of apps that show me what happens when accessing  web-sites and when accessing BT yahoo I have had up to ---14--yes that's right--14 adverts blocked. Also in every case Yahoo is tracking you. These cause problems with the site. Since blocking them things have got better. I say this because I post on a popular US website which has multiple adverts including pop ups and video ads which badly effected the stability of that web-site-many complaints. Now its toned them down complaints have stopped. Try telling Yahoo to stop its ads and see where it gets you.    

  • I am having some issues with email. My iphone shows 4 emails as unread yet when I look thru all my emails, both on my iPhone5 and my outlook there are no unread emails. How do I clear this up on my phone?

    I am having some issues with email. My iphone shows 4 emails as unread yet when I look thru all my emails, both on my iPhone5 and my outlook there are no unread emails. How do I clear this up on my phone?

    Email does not and has never synced between the iPhone and the computer. It sounds like you may have had your PC set up to use POP3 for e-mail, which will download e-mail from the server and delete it, causing it to vanish from your phone if the phone was set up for IMAP. IMAP provides full synchronization between the server and clients. What you delete on one will vanish from the others. This is the preferred method of managing e-mail as it prevents e-mail from being downloaded, for example, on a PC and making it inaccessible on your phone.

  • We have been having some issues with Email notifications not going out and getting hung up in SOST.  Can anyone please tell me whether we can use Solution Manager to monitor outbound emails?

    We have been having some issues with Email Notifications not going out and getting hung up in SOST. Can anyone please tell me whether we can use SAP Solution Manager to monitor outbound email?

    What version of Solman are you using ?  Check in t-code Rz20 >ccms monitor template of satelliate system , there would be option to monitor your outbound mails .You can sutomise your monitorig metrics in solman 7.1  else in 7.01 you use auto reaction methods to monitor .
    Regards
    Jay

  • How do i default my PC to open email photo or pdf attachments in Elements?  It currently opens in my olf Adone photoshop starter edition 3.2

    how do i default my PC to open email photo or pdf attachments in Elements?  It currently opens in my olf Adone photoshop starter edition 3.2

    You can install PSE on the XP machine.Convert the catalog on of starter edition to PSE.Take the backup of the catalog on XP machine and then restore it on the windows 7 machine. This way you will have all the data of the catalog on your XP machine.

  • Issue with Czech characters in PDFs generated from RSTXPDFT4

    Hi,
    We have a requirement to generate PDF documents from the spool of the Billing document outputs in our project.
    For this we are using the standard program RSTXPDFT4, which converts the SAP script OTF to PDF format.
    But the Czech characters in the billing document output are not getting displayed in the PDF generated out of it.
    We are already using a device type I2HP4 when creating the print request , which supports Latin-2 Character set ( ISO 8859-2 ), to which the special characters
    of East European languages belong.
    Even then , the czech characters are not getting displayed in the PDF generated.
    We have raised  a message to SAP for this, and SAP informed us that currently the only solution to this is to use Latin 2 soft fonts,
    and to upload these soft fonts into R/3 System using report RSTXPDF2 as they contain the Eastern European special characters plus all the other characters in ISO 8859-2.
    But, since character font definitions (font files) are protected by copyrights, SAP informed us that they cannot provide these font files and we have to acquire
    these latin-2 font files by searching in search engines in the internet.
    If anyone has the information where we can get these "Adobe type 1 Latin-2" font files with '.PFB' extension,  for the proper display of Czech characters, please let me know.

    Hi,
    Did you or anyone manage to find a reasonable solution for this issue?
    I'm currently facing something similar but with Polish characters instead.
    I tried using RSTXPDF2 to upload .PFB and .TTF files but to no avail.

  • We are having issues with WLS 5.1   pdf   SSL

    We are running IE 5.0 and above browser with our application and the server is Weblogic 5.1 We are having issues with a generated pdf being sent down from the server using the response outputStream in an SSL connection. We tried setting the content type before getting the outputstream. IE comes back with a dialog for download. When we select either of the options IE comes back with "Unable to download <url> from <server>. We are using WLS 5.1 service pack 6. Any help will be greatly appreciated
              

              I tried this option, but did not help. We have two weblogic servers on different
              machines. One works fine in downloading pdf file over https, but not the other.
              The error we are getting after selecting it to save it to a file:
              IE cannot download xx.pdf from www.xxx.com
              From the link, when we say "save target as", we get different error as:
              This file could not be written to cache.
              Someone suggested to pass "pragma: public" or "pragama: no-cache" in the header.
              But we are just simply serving it as a file, neither from servlet nor from jsp.
              So I suspect it something to do with our weblogic proxy or security configuration.
              Any ideas/help is much appreciated.
              Thanks
              Jayashree Raghavan <[email protected]> wrote:
              >If you ever have a similar problem it might help to check in browser
              >settings.
              >In IE goto tools/internet options/
              >Goto advanced Tab
              >go down to Security.
              >Uncheck the "donot save encrypted pages to disk".
              >This will make downloading a pdf work in ssl.
              >
              >
              >Jayashree Raghavan wrote:
              >
              >> We resolved this problem thanks to Maxim, by commenting out the code
              >that sends to the browser not to cache these pdf files. response.setHeader("Pragma",
              >"no-cache");
              >
              

  • Issue with Email generation using MAPI32.OCX and Outlook 2010

    Our application use MAP32 OCX to generate an email with an attachment (PDF File), but no email address. The user will select the address from their contacts.
    Right now we have an issue with some Outlook 2010 clients that after about 8 emails , Outlook has an issue and hangs.
    Now if we do a mailto://[email protected] before we create the 8th email, Outlook 2010 doesn't hang.  Is there any setting we can set in Outlook 2010 to prevent the "address checking" when the email is generated or do I have to fill
    the email address with a "bogus" address that the user must then overwrite to prevent this from happening?
    Thanks,
    Chad Newman

    Hello Chad,
    Why do you need to use MAPI instead of OOM?
    I'd suggest automating Outlook instead. See
    How to automate Outlook from another program and
    How to automate Outlook and Word by using Visual C# .NET to create a pre-populated e-mail message that can be edited for more information.
    Also you may find the
    C# app automates Outlook (CSAutomateOutlook) sample project helpful.

  • HELP!! Issue with mailto button in PDF

    Hi
    I have a button in a PDF form that attaches default email (LOTUS NOTES) when clicked. I have my settings in IE set to Lotus Notes as my default client and also in Lotus Notes I have the same settings.
    The form however does not work sometimes when the button is clicked, nothing happens. It works fine for me but doesn't on another computer with the same settings.
    Is this an issue with the PDF or Lotus Notes? If so any suggestions?
    Thanks

    Hi
    Both machines are running windows XP SP 3
    I have done some google-ing the issue but I didn't get any useful information.
    I tried it on the second computer again and it says no 'email exits'
    Any help on why this is happening will be very useful.
    thanks in advance!!

  • Issues with Emailing

    For emailing through PDF files, is there something special the user has to have setup on their computer locally? An email client for example i.e. Groupwise or MS Outlook? Does Outlook actually have to be setup or does it just sent throught the Internet?
    I attempted to setup Outlook to test this but I got lost when it started asking me about POP3 addresses without telling me how or where to get such information, does the average user even have these programs setup? I seriously doubt the average computer user is going to have a clue what the heck that is either (I know you get those with your own website, if you have a mail system installed, but the average computer user just has an ISP).
    I was also having issues with sending to more then one users but I think I found a way around that, though my only remaining obsticle is that when I click the button to email it does nothing at all. It was trying to on the computer I have Adobe installed by on another computer with just Abobe Reader installed it does nothing at all.

    OK, now I seem to have it working, to some extent, it when I click to Email it brings up a menu asking if I want to use a program, the Internet, or Other, I select program and then it prompts me to log into GroupWise then it sends out the email to my test emails, only issue now is that I can't view the attachment, it says the encoding is not correct, so what is the proper way to save it and which encoding, I think the default was UTF-16 (IIRC or U**-something-16?).
    Another issue I just realized is that the GroupWise is actually sending the information out to FAX Numbers for automated printing rather then to actual email addresses, so is there a way to use FAX numbers rather then email addresses during this process or convert them?

  • Multiple OS issues with Email set up; "People" ; Synching phone not working as advertised

    Nokia Lumia 822
    Purchased yesterday (2/10/13)
    So far I have spent 14 hours attempting to resolve what feel like endless errors and bugs. If I can;t get these resolved in the next 48 hours the phone goes back. I am so disappointed  I waited especially for this phone - heard great stuff. My experience is it sucks. Worst phone ever.
    1) POP3 email accounts are non functional. I have attempted to set up and delete and re-set up now multiple times. Each time presents a fresh new nightmare.
    Issue 1 - Email account  receives email but will not send. Error message goes something like  <" Problem sending message. Message failed to send. Problem with Files or Data on your device." >
    Issue 2 - Tapping email + accounts sends me back to start screen cannot even set up account
    Issue 3 - I  get to add email account I enter my information but no account is created
    Issue 4 - I set up an account and I get an error message stating my information cannot be found.
    Issue 5 - trying to open email from start screen just resets to start screen  over and over and over NEVER opens the account.
    These are deal breaker issues. I have multiple email accounts on different platforms. If I cannot access my various emails AND send from those accounts this is NOT the phone for me.
    2) PEOPLE does not function. ALSO multiple various issues and never the same one twice.
    Issue 1 - I tap on a contact and get sent to the start screen over and over and over  and over again.
    Issue 2 I tap on a contact and the phone freezes and wont respond unless I pull the battery
    Issue 3 I open a contact and make an edit, save the contact but the change is never reflected in the list
    Issue 4 I try and search for a contact and the search freezes - only option is to return to start screen
    3) Scrolling thru any APP randomly takes me back to start screen.
    I dread attempting to synch Outlook calendar and contacts on my PC to hotmail - especially if I can't even set up email. And it seems like even holding it will jettison me out of anything I'm doing and back to start screen.
    If I can't get these issues resolved.  look like I'll be going  back to my 3 year old Blackberry Bold which performed flawlessly. It may not be the most impressive phone out there but it did what I needed it to do with out any issues.

    Interesting Twitter conversation VZWSupport on Twitter.  It was suggested to try a HARD reset - and if that doesn't work take the phone back.
    Since I don;t have anything set up yet  that's my solution.
    I see a BlackBerry Z10 in my future

  • Email Integration Scenario - Issue with email body content

    Hi All,
    We have an Email to File Scenario. PI is connected to Outlook server using Sender Mail Channel using POP3. We are able to fetch and display emails correctly for most of the received emails.
    However we notice that for Email sent from few Mail server like Yahoo mail, Gmail, Hotmail, we are not getting the Email content correctly.
    Issue is happening with Emails sent in HTML/Rich text format (containing Formatting and without any attachments). In the receiver system we see the email is converted to Plain text format. If the same email is sent with some attachment / Embedded Image, we get all the Formatting correctly in Receiver System.
    A closer look at Pimon we found the following:
    1. When Email is sent with Formatting (without any attachment/ image) in Pimon we see that it creates 2 Payloads (screenshot attached)
    2. The First Payload - MainDocument contains the Email content in XML format, but is missing the Email formatting data in it.
    3. The other Payload - ([email protected]) contains the actual Formatted Email Content.
    Not sure why the formatting data is missing from MainDocument. Instead its coming in other payload. Due to this we are not able to display correct data at receiver end as we parse the MainDocument as our Input Payload Stream
    Note: We cannot use payload swap bean, as it will swap the data for all the incoming emails which we don't want.
    Anyone faced similar issue? Steps to get proper formatting data in MainDocument..
    Suggestions / Inputs will be highly appreciated.
    Thanks,
    Azhar

    Azhar,
    We cann't influence the behavior of Gmail, Hotmail. But have to get HTML as main payload, so we have to swap payload (not always, in some cases based on a condition). Please try below Java mapping. In Operational Mapping set "Read Attachments".
    package javaapplication1;
    import java.io.*;
    import com.sap.aii.mapping.api.*;
    import java.util.Collection;
    public class NewClass6 extends AbstractTransformation {
        @Override
        public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {
            try {
                InputStream inputstream = transformationInput.getInputPayload().getInputStream();
                OutputStream outputstream = transformationOutput.getOutputPayload().getOutputStream();
                byte[] b = new byte[inputstream.available()];
                inputstream.read(b);
                //Loop over attachments and if attachment name starts with 'payload-' swap it with main payload. Edit below logic as needed.
                Collection<String> listAtt = transformationInput.getInputAttachments().getAllContentIds(true);
                for (String att : listAtt) {
                    if (att.startsWith("payload-")) {
                        b = transformationInput.getInputAttachments().getAttachment(att).getContent();
                outputstream.write(b);
            } catch (Exception exception) {
                getTrace().addDebugMessage(exception.getMessage());
                throw new StreamTransformationException(exception.toString());

  • Issues with buttons in interactive pdf (CS4)

    Hi there, I'm working on an interactive pdf that is going to be used cross platform. I'm working with ID CS4 (6.0.6) and Acrobat CS4 (9.4.4). I have some issues with the buttons I've created that I need to solve. The buttons are contours made in AI and pasted in ID. When done I exported my pdf from ID and checked with Acrobat and added a few links using Acrobat as one can't use the command 'go to specific page' in ID itself (yes, this has to be a non-Flash pdf).
    When testing in Acrobat I noticed 2 things I need to solve.
    First: sometimes a button doesn't work properly the first time but later on it does or the other way around.
    Second: when viewing on a pc using Acrobat Reader 9.4 some of the buttons show little dots in a square showing the active field when hovering, although I've set border colour and fill colour to none on all buttons.
    How can I fix these issues? I couldn't find anything in the properties dialog box. And one final question: from which versions of Adobe Reader (Mac and pc) are interactive pdf's supported?
    TIA

    Thanks George. You're correct, most of the actions were set straight in ID. The only reason I go into Acrobat is to hookup the buttons that need to go to a specific page rather than to the next page. Since my version of Acrobat is not English I had to google English manuals to get the exact English phrases. Alas, I can't hand you a copy of the document either since it holds some sensitive information that I'm not allowed to share.
    Instead of posting all the settings I made, I looked more carfeful to the buttons that have multiple actions. In Acrobat you have a bit more control over the hierarchy of the actions so I guess this is where we can straighten out the hickups, right? I have a few buttons that have actions for go to a next/previous page and toggle the show/hide of a few items on the pages. So I my case most of the buttons were set to first do the show/hide and then go to the next page rather than first go to the previous/next page and then do the show/hide actions. Could this be the cause of the staggering of some of the buttons?
    And for last, right now the ID document has 4 layers. I could reduce that to 2. Would that be of any (additional) help? Thanks!

  • Issue with printing Indesign exported PDF in Chrome

    I have created a file in CS6 and exported it to a two sided PDF. This PDF works when printing from the PDF.
    I have uploaded it as a document link on a website and when clicking on the link it opens in a separate window. If people use Internet Explorer or download the file the PDF and print it it looks perfect.
    If the user is using Google Chrome only a section of the PDF prints at a large size. It looks like it thinks the PDF is an A3 so only prints the bottom left hand corner.
    Things I have already tried - which all have the same issue.
    Creating a brand new InDesign file and exporting reuploaded on the website
    Saving it as a IDML file and exporting and reuploaded on the website
    Had someone else export the file
    Tried printing from google chrome outside the office
    Checked no issues with the website backend
    Checked with the IT company that services our systems.
    Thanks in advance of your help.

    Hi jtrew,
    It sounds as though the issue is specific to Chrome. Please see the following document from Google support: https://support.google.com/chrome/answer/142056?hl=en
    Let us know how it goes.
    Best,
    Sara

  • Issue with email sync

    I have configured 5 gmail accounts, 3 yahoo accounts and 1 live account. Everything was working fine until a day came that I was forced to change the password of all my G accounts. I changed it in my phone also but since then I cant sync just 1 gmail account. Not that I cant sync but its not loading the mails in the viewer. Email app works fine with other accounts. I tried deleting all the account and re-created all the accounts still its not working. I tried deleting it from email.nokia.com and STILL its not working. a 3 months ago I had the same issue with another G account. What I did then was I stopped using the Email app. I sstarted using it only a 3 weeks ago as I really needed a client on my phone. Wish someone could help me out from this really awkward situation

    you do realize there isnt an ios 7.7.1 right?

Maybe you are looking for