Showing PDF without using InteractiveForm

Hi experts,
I receive PDF content from a RFC in the "XSTRING" format.
I can show this in an interactive form (by mapping the pdfSource property of my InteractiveForm with the Xstring), but then we need to install ACF on all the PCs of the customer.
So what I would like to do is display a PDF not included in a Web Dynpro.
I read in this forum (from Bogdan) that this could be a solution:
byte[] pdfContent={here document is created};
IWDCachedWebResource pdfResource=WDWebResource.getWebResource
    (pdfContent,WDWebResourceType.PDF);
wdComponentAPI.getWindowManager().createExternalWindow(
     pdfResource.getURL(),"Report View",true).open();
But how can I convert my Xstring format to byte[] ?
Thanks in advance for your answers.
Regards,
Julien

Hi Julien.
Yesterday I can solved it.
I found a solution in a post, and it works.
I am only coded this in the wddoInit, and I use a FileDownload UI element.
//segun nota
  /* The FileDownload UI element requires: */
  final IWDAttributeInfo fileAttrInfo = wdContext.nodeOutput().getNodeInfo()
          .getAttribute("Bin_File");   
  final IWDModifiableBinaryType pdfType =
     (IWDModifiableBinaryType)
       fileAttrInfo
        .getModifiableSimpleType();
  /* In addition the FileDownload
UI element needs for  defined resource types
  pdfType.setFileName( "MyPdfFile.pdf" );
  pdfType.setMimeType( WDWebResourceType.PDF );          
    //@@end
"bin_file" is the xstring parameters that return my RFC module function.
Really I don't know the difference with your sample (I am newbbie in Java and webdynpro) but this code is the way that works in my aplication.
Thanks a lot anyway!
regards.
Leandro

Similar Messages

  • Func module to convert list to pdf without using memory id

    hi Experts,
    Is there any funct module to convert list to pdf without using memory, as I am using Convert_to_PDF func module which outputs last page only  when its running in Background.
    But my req is to output all the Pages in the PDF format.
    Sample code also appreciable,
    Reward Points are guranteed..
    Cheers
    Santosh

    Check the below postings :
    Re: Convert spool to pdf
    Convert a spooljob to a writeprotected PDF
    Hope this will helpful

  • How can I make hyperlinks work in InCopy when I export to PDF without using InDesign?

    I created an InCopy document with hyperlinks linking to other InCopy documents. When I exported to PDF, these hyperlinks don't work. Is there any way I can make these hyperlinks work without using InDesign? Thanks.

    beer and no prepress schrieb:
    If it's for the web, why not export to JPEG?  Why PDF?
    Terrible idea. In a JPG the text will not be alive, you loose all interactivity.
    And making JPGs with InDesign is not what the program is meant to make.

  • Generating a PDF in Web Dynpro without using InteractiveForms

    Hello All,
      I have been following this tutorial <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial%20on%20working%20with%20the%20pdf%20document%20object%20-%2032.htm">http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial%20on%20working%20with%20the%20pdf%20document%20object%20-%2032.htm</a> from SDN and is currently stuck.
    <u><b>What I'll like to achieve</b></u>
    1) User logs on to the system and a table displaying a list of items for approval appears.
    2) the user is then able to select a row item from the table and click on 'approve'. In doing so, my application should generate a pdf form in the background and attach it as an email attachment and sent that email to an appointed vendor.
    <b><u>Problem</u></b>
    As there is no InteractiveForm involved, I do believe I will need to provide the template (.xdp) so that the PDF can be generated. In the tutorial, it suggests doing this (I modified it a little to reflect my own path name):
    InputStream templateSourceInputStream =     getClass().getClassLoader().getResourceAsStream("d:
    usr
    sap
    pdf
    PDF
    XBCRPDFPreviewView_InteractiveForm1.xdp");
    However, I am given a NullPointerException when I attempt to do that. Does anyone has any idea what may have caused the error ? Thank you.
    from
    Kwok Wei

    Hi Kwok Wei ,
    According to the convention the any file can be placed in the src/mimes/Components/<component package + component name>/folder of your webdynpro project along with other generated files of your application.
    After this you just need to pass the filename to the getResourcestream() method,it automatically picks up the file from the folder.
    Regards
    Aarthi Mathivanan
    Message was edited by: aarthi mathivanan

  • Show PDF without bars around it

    Hi,
    I have a MS Dot Net WPF program that can show a pdf.
    But the problem is that the bar at the left is shown in 8.0
    and I can not get rid of it using the set.. commands.
    How can I tell the pdf to only show the document?
    PDFControl.setShowScrollbars(False) 'hide scrollbars
    PDFControl.setShowToolbar(False) 'hide toolbar

    Could you please elaborate on what you said about using COM APIs to do "static rendering" of a page.. I am having the same issue using .NET 2.0.
    A code snippet would be extremely helpful.. Thanks in advance!!

  • Submit by mail as .pdf  without using client side mail application

    is it possible to submit a form in pdf format to an e-mail address without it opening the clients outlook in order to send, i simply want them to click submit, and it to send to my mailbox with the info as follows
    from: [email protected]
    subject: Timesheet
    Attach: Timesheet.pdf
    body: Attached is this weeks timesheet
    all i want the page visitor to do is fill in the info, and click "submit via e-mail" no outlook, no attaching, simply click and done.

    >? I have a similar requirement where in the users should be able to open the form from out website, fill it, submit and the form should be submitted through email.
    >There should not be any windows based client email needed on the user's machine.
    What you describe is, superficially, utterly impossible. No e-mail
    client means you can't send mail.
    But the end result can be achieved. The form should be submitted, just
    like every HTML page, to a web script on a web server. The script
    should only be written by an experienced web programmer familiar with
    all the security issues of web programming today.
    The script can, if the programmer wants, send the form data as an
    e-mail. Note that sending it as PDF, rather than XML, may require a
    major investment in enterprise software.
    Aandi Inston

  • Creating an Adobe .pdf file without using the Adobe printer

    Is it possible to create a .pdf file by using Acrobat or Microsoft Word or any other program without using a printer driver? So far, when I remove the Adobe printer, I cannot create a .pdf file, as it is looking for the printer and printer driver. Is it even possible to create a .pdf without using, or having, a PDF printer of any sort? Any help on this issue would be most helpful. Thanks.

    I was trying to find a way to create PDFs without using the Adobe printer, or any PDF printer. I posed this question to see if there was a way to create a PDF without the aid of a printer or not. I mean, I know how to reinstall the Adobe printer, since I had to to see if there was another way to go about creating without using the printer. I am just curious if there is a way to create a PDF file without the aid of the Adobe printer or other PDF printers.

  • Does anyone know how to watch downloaded shows without using 3g or wifi?

    since my carrier Throttles me if I watch shows, and I do not have access to wi-fi at work, I would like to find a way to watch downloaded shows/movies without using 3g data services

    You do not need internet connection at all to watch downloaded content.

  • How to load and show PDF on stage in Flash using AlivePDF or PurePDF external libraries?

    Hello,
    I searched a lot on internet but didn't find a proper way to load and open/show PDF on stage in Flash. Following are my understandings about this topic.
    I know Flash does not have the built-in functionality to load and show pdf document on stage.
    I know you can do this in AIR application using HTMLLoader class but it required adove reader to be installed on your machine.
    I have used AlivePDF/PurePDF and I know how to export/generate a PDF File using these libraries but I don't know how to use them to load and show PDF document on stage in Flash. According to my research, I think these libraries can accomplish my task but how, I don't know. That's because I am here for your help.
    People suggest to first convert pdf into an image or swf file and then import it into Flash but I don't want this solution because my clients will be importing/uplading PDF file into my software.
    Some people suggest to "Convert PDF renderer code written in C/C++ using Alchemy to flash library" and then use that library to my project. I don't have any idea how to do this. If anyone can help me to achieve required functionality this way, please guide me.
    Now you know about my understandings, so you can guide me in better way. Let me give you an example what kind of functionality I want. Please visit: https://www.pdffiller.com. Upload a pdf file there and you will see that it shows that pdf to user (At the moment, I want this functionality) and pdf annotation i.e. write text on pdf and other functionalities.
    NOTE: I am not a Flex and AIR developer. I am a Flash (Actionscript 3.0) Developer. So please first help according to flash. If you want to offer the solution according to Flex and AIR, you are most welcome.
    I specially want "ADOBE EXPERTS - Adobe Flash developer from Adobe" to comment on this and help me out. It's about 4th day I am without a solution. I am afraid, I'll loose my client if I'll not have a solution in next couple of days.
    Thanks,
    momersaleem
    eLearning Specialist

    Just to throw in a $0.02, I looked at those libraries myself quite a while ago and all they had the ability to do was give you information and assets from the PDF. At that point you literally had to read each page in the PDF (whatever the library could extract), use the information it extracted (position, type size, images, etc) and create a layout engine that could "reconstruct" the page piece by piece.
    I hope it's better these days but that's what I took from those libraries quite a while ago and it may still be true. That would explain "Convert PDF renderer code written in c/c++ using Alchemy to flash library". Someone may already have written a quality layout engine. Otherwise there was no "load pdf, run this ShowPDF() function to add to display list" functionality at all.

  • Can i make a book in iPhoto without using any of the built in layout templates, which are too limiting when i have already cropped my pictures to show just what I want. Ideally I just want to drag and drop and arrange and size the pictures myself

    Can i make a book in iPhoto without using any of the built in layout templates, which are too limiting when i have already cropped my pictures to show just what I want. Ideally I just want to drag and drop and arrange and size the pictures myself

    If you have Pages you can create customs pages for your book as TD suggested. If you have Pages from iWork 09 or 11 this app will add 80 or so additional frames to those offered:  Frames and Strokes Installer. Don't use it on the latest Pages version, however.
    This tutorial shows how to create a custom page with the theme's background: iP11 - Creating a Custom Page, with the Theme's Background for an iPhoto Book.  Once the page is complete to get it into iPhoto as a jpeg file follow these steps:
    Here's how to get any file into iPhoto as a jpeg file:
    1 - open the file in any application that will open it.
    2 - type Command+P to start the print process.
    3  - click on the PDF button and select "Save PDF to iPhoto".
    NOTE:  If you don't have any of those options go to Toad's Cellar and download these two files:
    Save PDF to iPhoto 200 DPI.workflow.zip
    Save PDF to iPhoto 300 DPI.workflow.zip
    Unzip the files and place in the HD/Library/PDF Services folder and reboot.
    4 - select either of the files above (300 dip is used for photos to be included in a book that will be ordered).
    5 - in the window that comes up enter an album name or select an existing album and hit the Continue button.
    That will create a 200 or 300 dpi jpeg file of the item being printed and import it into iPhoto. For books to be printed choose 300 dpi.

  • Is there a way to download/view PDF files on the iPad without using another computer?

    I just recently purchased the new iPad. I have also downloaded iBooks and a PDF reader. Is there any way to view and/or download PDF files from my iPad, without using an outside computer? Please help!

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    One way is to get the GoodReader app. It has a built in web browser that allows you to web surf and download pdfs into GoodReader. You can read them in the GoodReader app or open them in other apps that can read pdfs.

  • Without using iTunes, I want to browse to an Apple website that shows me the list of devices associated with my Apple Id

    My primary goal:  I want to browse to some Apple website where I have already logged in using my Apple Id and password, and I then want to click a link that will bring me to a page that will show me the Apple Devices that I "own", that are associated with either "me" (whatever that entity Id should be) or with my Apple Id.  Most importantly, I want to do this without using iTunes.  I have seen my list of devices before on an Apple web page, and it even shows the MAC addresses of the devices.  I did not reach this list by using iTunes.
    I know for an absolute fact that an Apple Customer Service rep on the phone showed me some trick for viewing all the devices that I had purchased. There was even a device that another person had purchased and then had sold to me, and this Apple rep showed him how to "disown" the device and she then walked me through how I could take over ownership of the same device).
    The procedure that she walked me through might not have anything to do with my Apple Id.  It might have had to do with some other unique way of identifying myself.   I simply cannot remember, and I cannot imagine what that Id would have been.  I have searched and searched via Google and every result returned by Google always talks about using iTunes to associate an Apple device with my Apple Id.
    My secondary goal:  If this is not the appropriate community to which I should have sent this question, all I can say is that it was the closest match that I could find.  If no one here can help me achieve my primary goal, can you please suggest another community to which I should post my question?
    Thanks!

    After hours and hours of failed searches, I must have used a different keyword in my Google search, and here is the website that I was looking for:
    https://supportprofile.apple.com
    And here is the guy whose website I found that helped me solve my problem:
    http://www.marcomc.com/2011/01/how-to-find-the-list-of-my-apple-registered-produ cts/
    I was going to rant here about how badly Apple designed their "Apple Id" stuff, how they strongly distinguish between using your Apple Id at the online Apple Store vs. using it at the App Store (which you have to get to via iTunes ... quite ridiculous) ... but I won't.  :-)
    Anyway, I hope that the two previously mentioned websites will be of help to others.

  • I have an iPad 1.  I filled out a PDF questionaire in adobe reader. When I send it to Dropbox, iBooks,mercury browser the form shows up without the answers .  My objective is to email the completed form. Please advise as to how to do thisThanks. Big Jake

    I have an iPad 1.  I filled out a PDF questionaire in adobe reader. When I send it to Dropbox, iBooks,mercury browser the form shows up without the answers .  My objective is to email the completed form. Please advise as to how to do thisThanks.
    Big Jake

    If the PDF is a form fillable PDF, which I assume that it is, email it to yourself or send it to DropBox and open it on your computer. You should see the fields filled in there. It works for me if I do it that way.
    Adobe Reader supports it, but the other apps don't. I assume that if you email the PDF to a computer user it would be readable in Adode Reader.

  • Saving a Text data to a PDF file without using print option

    Hi,
    I want to save a Text to a PDF file. I want to assign the path of the PDF file as a default one.
    If I use Print options, then it ask for the file path at the run time.
    Is there any method to save to a PDF file without using print option in Labview 8.2.
    Regards,
    Raja

    This question comes up a lot. Did you try searching? It depends on the PDF printer driver that you're using. See here, here, here, ...

  • Create a pdf without showing it in the UI?

    Hello!
    I'm trying out Interactive Forms for Java for the first time, so please bear with me if this is obvious.
    Is there a way to create a pdf and not display it in the ui? If I for example just want to download or email it.
    I've tried setting visibility to None and Blank but that prevents the PDF from being generated at all.
    It sort of works if I use FireFox and choose DisplayType activeX since FireFox can't display ActiveX. Our customer runs IE so that is not an option however.
    Thank you for any input!
    Kind regards,
    Richard Linnander
    Edited by: Richard Linnander on Jun 18, 2010 1:49 PM
    Edited by: Richard Linnander on Jun 18, 2010 1:52 PM

    Hi Richard,
    You can create a pdf without displying it in UI.
    Follow the below steps :
    1. Copy your xdp file under mimes folder.
    2. create a pdfsource context and DataSource node for pdf.
    3. Create a File Download UI element in Ui and bind the data property with pdf source context.
    4. Now copy the below code in wdDoInit() which is genrating the pdf from xdp.
    wdContext.getNodeInfo().getAttribute("pdfSource").getModifiableSimpleType();
    ByteArrayInputStream pdfInputStream = null;
         String templateUrl = null;
         try {
              templateUrl = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(),"Name of XDP with extension");
         } catch (WDAliasResolvingException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
         try {
              IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
              IWDPDFDocumentCreationContext pdfDocumentCreationContext = pdfDocumentHandler.getDocumentCreationContext();
              pdfDocumentCreationContext.setData(WDInteractiveFormHelper.getContextDataAsStream(wdContext.nodeDataSource()));
              pdfDocumentCreationContext.setTemplate(getByteArrayFromResourcePath(templateUrl));
              //pdfDocumentCreationContext.setDynamic(true);
              IWDPDFDocument pdfDocument = pdfDocumentCreationContext.execute();
              pdfInputStream = (ByteArrayInputStream)pdfDocument.getPDFAsStream();
              wdContext.currentContextElement().setPdfSource(pdfDocument.getPDF());
         } catch (WDPDFDocumentRenderException e) {          
              wdComponentAPI.getMessageManager().reportException("An error occured: "+e.toString(), true);
         }catch(Exception e){
              wdComponentAPI.getMessageManager().reportException("An error occured: "+e.toString(),true);
    5. create a another method in global section
      private byte[] getByteArrayFromResourcePath(String resourcePath)
         throws FileNotFoundException, IOException {
         FileInputStream in = new FileInputStream(new File(resourcePath));
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         int length;
         byte[] part = new byte[10 * 1024];
         while ((length = in.read(part)) != -1) {
         out.write(part, 0, length);
         in.close();
         return out.toByteArray();

Maybe you are looking for