Get PDF using FileDownload UI

Hi,
Any pointers to documentation which shows step by step creation of a WD application, for downloading PDF using the FileDownload UI.
I have a WD application which calls a BAPI. This BAPI returns one parameter (BIN_FILE) which is of type XSTRING. This paramter contains the PDF content. I need to use this to be downloaded to a pdf.
Can anyone guide me how to do it. I used the recent posts for this but seems to loose track somewhere.
Regards
Puneet

Hi
create a context element of type binary for example FileDownload.
In doInit() metod:
   IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("FileDownload");    
   IWDModifiableBinaryType binaryType;
   binaryType = (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
   binaryType.setFileName("test.pdf");
   binaryType.setMimeType(WDWebResourceType.pdf);
you xstring is for example "file"
try
     int length =(int)file.length();
     byte b[] = new byte[length];
     b = file.getBytes();
     wdContext.currentContextElement().setFileDownload(b);
     catch(Exception ex)
Andrea

Similar Messages

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • When i try to open a pdf using int exp i get a message that it has encountered a problem and will cl

    when i try to open a pdf using int exp i get a message that it has encountered a problem and will close

    Internet explorer.  I have adobe reader and flash player which I uninstalled and reinstalled.  I tried another browser and the pdf's open so it is a problem with IE .Thanks for your comments.
    [private data removed]

  • I'm trying to timestamp (RFC 3161) a pdf using my own timestamp server hardware but always get an error: "Certificate invalid for use" ...

    I'm trying to timestamp (RFC 3161) a pdf using my own timestamp server hardware but always get an error: "Certificate invalid for use" (Original text - pt_BR:O certificado não é válido para uso). How can I get more info on what I'm missing or whats wrong with the certificate?

    Which Acrobat version are you using? Do you use "Document Timestamp" command? If so, do you get this error during the signing process and the signature is not created or signature is created and you get this error when it is validated? If the latter you can open signature properties, click on the "Advanced Properties" and in the next dialog on timestamp's "Show Certificate". If you get this error during the signing process do you get an alert that shows some cryptic info with a number? If you do provide the content of this alert.
    Also which Acrobat version (including minor) are you using?

  • How to get image properties in PDF using javascript or plug ins

    Hi
    How to get the image(all the images) properties in PDF using javascript or suggest plug ins
    Thanks in Advance

    HI,
    In the PDF Edit API's ( as has already been suggested) there is the PDEImage and using this you should be able to find out everything you need to know about any image in a PDF file.
    I would recommend starting with PDEImageGetAttrs
    Hope this helps
    Malcolm

  • How to get image properties in PDF using javascript

    Hi
    How to get the image(all the images) properties in PDF using javascript?
    Thanks in Advance

    Hi
    Thanks for your quick response. Any recommended plug ins
    Thanks in advance

  • I can't get pdfs to open in IE 11 tabs, using Adobe Reader latest. PDFs open in Reader window.

    I can't get pdfs to open in IE 11 tabs, using Adobe Reader latest. PDFs open in Reader window. Using Windows 7, all updated.

    Hello,
    I would suggest you to try the steps in the article and check if it helps.
    View PDFs on Web: Quick fix | View PDFs on Web
    Refer to the article for additional information.
    Can't view PDF on the web: Can't view PDF on the web
    Regards,
    Nakul

  • Can any budy tell me how i use FileDownload UI elements.

    Hi,
    Can any budy tell me how i use FileDownload UI elements.
    I need to Download pdf file to my local drive . If possible please provide me code for that also.
    Regards,
    Gurprit Bhatia

    Klaus,
    If you download from http://www.ilivid.com/ then you get a dmg file with the iLivid application and, oddly enough, VLC.
    I'm not about to open the application on my machine, however!
    To the OP: just download the disk image file, double-click it and it will mount like a disk and drag the iLivid application to your application folder. Do so at your own risk - it just looks fishy to me.
    Clinton

  • Print to PDF - using Snow Leopard (Saving a PDF file when printing is not supported. Instead, choose

    i have a PDF form that i created that is used as a custom proposal that my company sends out to potential clients. the form in its editable state is only used internally. we recently upgraded to snow leopard, but prior to the upgrade, we were able to fill the custom proposal form out using adobe reader, and, as you well know, we weren't able to save that edited document as a PDF with the custom form fields filled out. our work around using adobe reader was to print to a pdf using the adobe pdf printer in the printer dialog. with the addition of snow leopard, however, instead of choosing the adobe pdf printer, we were to choose PDF from the bottom left corner, then Save As PDF, and it would spit out an uneditable pdf that then allowed us to email it to the potential client without them being able to edit it as well as have an internal, digital copy for our records instead of having lots of paper floating around (i know this is also doable using security that disallows the client certain editing privileges, but printing to a pdf is much quicker and more efficient, and the pdf security isn't really that secure at its best).
    in any case, i came across this gem of a post here on the support forums that installs another option from the PDF drop down on the bottom left of the print dialog menu that reads Save As Adobe PDF and is supposed to do exactly what i am trying to get it to do...print to a pdf file from adobe reader.
    http://kb2.adobe.com/cps/509/cpsid_50981.html    
    once i updated to acrobat 9.2 (as the link above suggests 9.1), however, the Save As Adobe PDF does appear in the print dialog menu, but it still gives me the same error that acrobat 8 - 9 gave me while using Snow Leopard — Saving a PDF file when printing is not supported. Instead, choose File > Save — and as i've already explained, you can't save an edited pdf form in reader (as i am the only one in the office with acrobat) and still keep the fields as you've entered them in. the only work around is to print to a pdf but is apparently having some recent problems.
    using acrobat, however, i know that i can save the editable pdf as a new file with the fields customized as i have left them, but it still saves it as an editable pdf and the print to a pdf option still remains the best option...that way we have digital copies internally that are uneditable that can be printed at any time or emailed to the client.
    how can i do print to a pdf, based on what i've written above, using snow leopard and acrobat and reader?

    A simple way is to flatten the form fields, which converts the field appearances to regular page contents. You can do this with JavaScript or PDF Optimizer (Advanced > PDF Optimizer > Discard Objects > Flatten form fields). A very nice script that adds a custom menu item can be found here: http://www.uvsar.com/projects/acrobat/flattener/

  • What happens to attachment in a PO when it is converted to PDF using SPOOL.

    Hi Experts,
    While converting a PO to PDF using a spool number, it works fine but i have a question as If the PO has an attachment, does the spool take care of that also?
    If not how to download the attachment as well.
    Thanks & Regards,
    K

    Hi Shan,
    No in ME21N there is a tab called Attachment, by which we can attach a note or something(I am thou not sure why this is done), yes a script is generated into a PDF but this attachment which is part of PO does it get attached or we need to do somthing to attach it to PDF was my question?
    Cheers,
    K
    Edited by: Ken Thompson on Sep 29, 2008 5:58 AM

  • Instead of getting PDF got XML output Bi publisher report

    Hi ,
    While i run the concurrent request i got the below :
    Executing request completion options...
    Output file size:
    335
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 3715769 on node CORPT228V at 14-SEP-2012 07:50:11.
    Post-processing of request 3715769 failed at 14-SEP-2012 07:50:11 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    ------------- 2) PRINT   -------------
    Not printing the output of this request because post-processing failed.
    instead of getting pdf output i got xml o/p....
    thanks in advance....
    Regards,
    Doss

    Alex,
    I have checked the log ...i did find the below,
    [9/14/12 8:13:23 AM] [90939:RT3715787] Output file was found but is zero sized - Deleted
    [9/14/12 8:13:23 AM] [UNEXPECTED] [90939:RT3715787] java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:611)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:239)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:302)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:176)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'ref' used but not declared.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
         ... 17 more
    [9/14/12 8:13:23 AM] [90939:RT3715787] Completed post-processing actions for request 3715787.
    [9/14/12 8:15:47 AM] [GSMServiceController:90939] New Initialization Parameters: oracle.apps.fnd.cp.opp.OPPServiceThread:2:0:max_threads=5
    [9/14/12 9:03:39 AM] [GSMServiceController:90939] Received shutdown request.
    [9/14/12 9:03:39 AM] [GSMServiceController:90939] Preparing to shutdown service.
    [9/14/12 9:03:39 AM] [GSMServiceController:90939] Stopping all Service Threads.
    [9/14/12 9:03:39 AM] [OPPServiceThread0] Preparing to shut down service thread.
    [9/14/12 9:03:39 AM] [OPPServiceThread1] Preparing to shut down service thread.
    [GC 25492K->7906K(63424K), 0.0562769 secs]

  • Can't convert files to pdf using Acrobat 8 Standard or 9 Pro

    I am having a major problem. I have tried converting both Word 2003 and Excel 2003 documents to pdf using Acrobat 8 Standard (I can't recall which version because I uninstalled and installed a trial version of Acrobat 9 Pro) and Acrobat 9 Pro. I have tried to convert directly from the open document and through Acrobat using create from file. In every instance the process starts and then stops after a few moments. When I try the conversion from within Acrobat, I get the following error message: " Pdf conversion failed, please correct the error and retry." When I try the conversion directly from Word or Excel, the conversion starts, stiops suddenly and gives no error message.  I have had Acrobat 8 Standard installed for a couple of years. It worked fine on this computer until the problem started a week ago or so. There have been no software or hardware changes that woudl trigger suspicion.
    I've tried uninstalling and reinstalling the 8 Standard version. I have uninstalled the 8 Standard version and installed the 9 Pro trial version. I have run the repair module on both versions. I'm sure it is something simple but I just can't figure out what the "error" is that I need to "correct". Any suggestions?
    As an aside, I have several Adobe programs (Photoshop CS5, Contribute 3 and Acrobat), all of them expensive. Their business model of offering no unpaid support (even for this type of problem) is one reason I hate Adobe more than Microsoft... but I rant.

    When you uninstalled, you should have used the MS Installer Cleanup utility. It cleans up a lot of the junk left over in the registry. You should have also deleted the Acrobat folder. Then you would reinstall. You did not indicate your OS and it may be that you need to update the AA8 to get it to work correctly. Also, the installs and uninstalls can mess up your registration process if you are not careful. If you uninstall the AA9 trial, you will not be able to reinstall it for use. At this point, I can only suggest you do a repair of your installation and be sure you have all of the updates.

  • How do I create  a PDF using Acrobat 7.0 in Windows 8 from a Visio drawing on a 64-bit system

    I used to be able to create a PDF using Acrobat 7.0 from a Visio drawing in XP. Now I'm running a 64-bit system, no Adobe printer can be installed, and it is unsupported.  Help?

    On a 32-bit system, there is a workaround. I do not think it is possible to get AA7 to work on a 64-bit system (no one has reported success and only 1 has suggested success with AA8). You may be able to print to a PS file and then open that in Distiller. I suspect that is the only way and you will have to find a decent PS printer driver to do it. I suspect the printer driver (and associated AcroTray) will not work in a 64-bit Win8 -- Acrobat and Distiller may.

  • Not able to convert word file to PDF using Adobe Acrobat 9 Standard

    Hi,
    I am not able to convert word file to PDF using Adobe Acrobat 9 Standard. When I try to convert, it starts the process and in between I am getting this prompt, as shown in figure below and the conversion process stops. The PDF is not created.
    Note: The filename 'Acr85.doc' in the above prompt keeps changing and is random.
    I tried clicking Yes, No and Cancel on the above prompt, but the conversion process just stops and PDF is not getting generated.
    I am able to create PDFs from web pages. No issues with that. Not working only with Word.
    Can someone help me with this.
    Thanks,
    Vinay Jaassiel Kankipati
    Technical Writer

    In MSWord please changes the settings as "Adobe PDF" menu => "Change Conversion Settings" goto Tab Bookmark and clicks the option Convert Word Bookmarks. Now you convert the Doc to PDF you can achieve the Bookmark.
    Hope this help you
    Sudhakar

  • Websites will convert to a PDF using Adobe Acrobat 9 but not Adobe Acrobat XI

    Hello,
    We have noticed that there are several websites that can be concerted into a PDF using Adoble Acrobat 9, but do not work with Adobe Acrobat XI. An example is the website http://amseventsubc.com/. This site converts with no problems using Adobe Acrobat 9, but will not work with Adobe Acrobat XI. When one tries to convert the website (by going Create > PDF from Web Page > Capture Multiple Levels > Get entire site > Create) it starts to work for about 10 minutes but then stops and crashes the program.
    Does anyone have a suggestion for how to fix this problem?
    Is there any reason why a website would work in an older version of Acrobat and not the most recent?
    Thanks for your help!

    Hi, we are actually not looking to have active links but rather to have the content from each link saved as part of the PDF (We are looking to convert the entire website's content to PDF). On Adobe X you can normally append any link so that its content will be converted and added to your PDF, however, this can't be done with XML links. 

Maybe you are looking for

  • Delete records from z-table

    Hi , delete statement is not working . i am using the logic like this . loop at itab into work_area. delete z-table from work_area . endloop. but i am unable to delete the records from the z-table . could you please look into this. Thanks, kumar.

  • Configure log file transfer to downstream capture daabase!

    Dear all, I am setting up bidirectional replication among 2 database server that are Linux based and oracle 11gR1 is the database. I am following the document Oracle Streams Administrator Guide, Have completed all the pre-configuration tasks but I ha

  • Logical multiply instead of pause trigger

    Hello all! Can some one help me with gating counter with another one, i want to produce modulated timebase, first counter generate pulses in continuous mode, and another one does the same, but with lower frequency, for example f1 = 20Hz, f2 = 0,1 Hz.

  • Mutilp regions in one page

    I am using ADF BC and Jdev11g 1.1.4, Search for the samples or documents for multiple regions in only one page, but can not get it, Can the expert let me have it ? Thanks!!!! Rgds!

  • SOLVED Cannot view .pgm and .ppm images

    Hi, I tried to view some .pgm and .ppm images produced by my APT weather satellite image receiver but gqview could not open them. Tried mirage but have same problem. Only gimp opens these type of images. Last time I tried to view .pgm images was prob