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();

Similar Messages

  • How do you create a PDF that shows up on the opening of an e-mail

    I use to be abel to create a PDF that I could drag onto the desktop of an email and it would show up as part of the e-mail when opened as well as an attatchement. Is there an actual procedure for creating one or is it random?  Sometimes it works sometimes it doesn't?

    Yakandhurl wrote:
    I use to be abel to create a PDF that I could drag onto the desktop of an email and it would show up as part of the e-mail when opened as well as an attatchement. Is there an actual procedure for creating one or is it random?  Sometimes it works sometimes it doesn't?
    There is no procedure. Whether it shows up or not is purely dependent on the receivers email application and their preferences.
    As always, I suggest if you want to do something like that, you should create an HTML email. There's a bit more control although it isn't foolproof either.

  • Is it possible to create and save a .PDF without any compression to the resulting .PDF?

    I need an uncompressed file so I can use the resulting PDF to do a find/replace. Can't do it with compression.
    Thanks
    JDRHC1115

    Dave,
    Thanks for the reply. Of all the suggestions I've received this seemed to
    be most promising. I gave it a try and the problem is that when I attempt
    to save as optimized a message box pops up and says I have to save my
    document first. Low and behold when I save it, compression occurs. Even
    when I select the options you suggest I'm left with a compressed document.
    I'm using Acrobat Pro X
    Jeff
    From:   Dave Merchant <[email protected]>
    To:     Jeff Ross <[email protected]>
    Date:   01/06/2011 09:35 AM
    Subject:        Is it possible to create and save a .PDF
    without any compression to the resulting .PDF?
    You don't want the UncompressPDF plugin - that's designed to split out the
    COS objects but doesn't remove the Flate encoding (plus if you've never
    compiled a plugin before, it's not really the time to learn).
    Instead, simply save your PDF file using the PDF (Optimized) file type,
    click the Settings button and under "Clean Up" - "Object compression
    options", choose "Remove compression". Turn everything else off if you
    want to retain the PDF content exactly as it was before.
    Your document-level scripts will then be in the file as plain text.

  • Just converted a PDF document to Word, none of the graphics from the PDF file show up in the Word document?

    Just converted a PDF document to Word, none of the graphics from the PDF file show up in the Word document?
    What do I need to do to bring the graphics and exhibits from the PDF file to the Word file?

    Hi jackp52432917,
    How was that PDF file created? Please see  Will Adobe ExportPDF convert both text and form... | Adobe Community
    It could be that the PDF file you're converting was created using a third-party application, and it doesn't contain all the information necessary to ensure a clean conversion. Have you had similar troubles converting other PDF files?
    Best,
    Sara

  • Created a pdf file showing a graph generated with CL_GUI_CHART_ENGINE

    Hi Experts!
    Please, anyone has already created a pdf file showing a graph generated with CL_GUI_CHART_ENGINE??
    Could anyone help me with this requirement?
    Thanks in advance,
    Best regards

    Hi,
    I searched and found another solution, because with the code from the link above I got everytime a short dump, maybe I did something wrong.
    The solution works with Adobe Form
    1. I used the class cl_igs_chart_engine to create a chart with my data and customizing to get the binary data of the image.
    2. Convert the binary tab to xstring.
    3. You can use this xstring on the Adobe Form to display the image.
    Maybe the following tips are useful.
    *How to get the data of chart you can see in the class
    CL_TIME_CHART_SIMPLE (use cl_gui_chart_engine for the chart but  class cl_igs_chart_engine for saving the image)
    *How to bind the image to the importing parameter (xstring)
    /people/thomas.jung3/blog/2005/07/13/lessons-learned-from-adobe-forms-development
    Regards

  • I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    Hi Brian,
    You can create it in Word or excel and then you can Convert it into .pdf Format
    Here's a feature list that depicts benefits of PDF pack: Convert Word to PDF, Convert PDF to Word & Merge PDFs | Adobe PDF Pack
    Please revert back if you have any other questions or need any help.
    Regards,
    Rahul

  • I have created a PDF with mp3 audio clips, the file works on PC's with audio playback (WIndows 7, 8 ) however the audio does not play when hosted on a website or an ipad/tablet computer or smart phone when used with PDF reader

    I have created a PDF with mp3 audio clips, the file works on PC's with audio playback (WIndows 7, 8 ) however the audio does not play when hosted on a website or an ipad/tablet computer or smart phone when used with PDF reader

    adobe42135678 wrote:
    the audio does not play when hosted on a website...
    When viewing in what browser?

  • How can I add an attachment to an email without showing it in the body of the email?

    How can I add an attachment to an email without showing it in the body of the email?

    1. You must open attachment first
    2. Tap the square with arrow on top right and select mail
    3. Compose your email

  • Printing to PDF without having to enter the file name

    Hi,
    I need to print (NOT EXPORT) to PDF without having to enter the file name manually.
    Any ideas?
    See http://forums.adobe.com/message/5224900#5224900#5224900 for a more details
    Thanks Trevor

    straight form indesign, don't think you can. but if on windows, you can try with this: http://www.autoitscript.com/site/autoit/

  • After changing my graphic card to an ASUS Strix GT 970, Photoshop CS6 opens the JPG files without show them on the screen

    After changing my graphic card to an ASUS Strix GT 970, Photoshop opens the JPG files without show them on the screen

    Try turning off GPU support in your Photoshop's preferences performance section.  Also check that you have installed the latest device driver installed for your GT 970 adapter and that all CS6 updates are installed... Your CS6 should be version 13.0.1.3....

  • How long does it take for the custom field created in SFDC to show up in the field mapping list?

    How long does it take for the custom field created in SFDC to show up in the field mapping list? I hit the refresh field button, but it is not showing up after 5 min. Do I just need to have patience? 

    Hi,
    What do you have to do to the field in SFDC to make it accessible so that it shows up in the Eloqua field mapping area as a field to be mapped?   

  • Netweaver 2004 :  How to create an pdf without need to use Adobe Control ?

    Dear WebDynpro experts,
    in my application I use Adobe interactive forms to create a pdf document for printing purposes.
    I provide it as download using the file download GUI element.
    There's no need to work with the pdf document afterwards, sionce it is only needed for printouts.
    If I use my application with Firefox this works great. I can download my pdf without any problem.
    But if I try to use Internet explorer and wand to download the pdf I always get the message that I have
    to install Adobe Control into my Internet explorer.
    Is it possible to configure my application the way that I don't need the adobe control on my Internet explorer ?
    Is there a better way to provide non interactive pdf documents ?
    Best regards,
    Daniel

    Dear Ruturaj,
    thanks for your answer.
    Unfortunately Í don't have an "display type" property for Interactive form.
    I have beneath the Event and Event properties the following properties in my
    property list for the Interactive Forms element :
    data source
    enabled
    height
    id
    mode
    pdfsource
    templatesource
    tooltip
    visible
    width
    I also checked the Form Properties within the designer and didn't find a display type property.
    I assume this is due to the fact I use an old version of Netweaver Developer Studio since I have
    only Netweaver Developer Studio 2004 SP 20.
    is there a way to switch off Active X using such a version ?
    Best regards,
    Daniel

  • Creating a PDF without layers?

    Hi
    I'm new to InDesign, using CS5.
    I made a couple of pages and placed psd files on the pages, and when I export to PDF, and open in it in Acrobat it loads each layer slowly and it shows that it is done in layers. If I try to open the PDF in Photoshop, it gives the option of opening each individual image. Is there a way to not export it layered? I don't even check the option that says "create acrobat layers" yet it still does it (if that's what that's for)
    The reason is because I don't want a client to open it in Photoshop or Illustrator and edit its content. I basically would like to export it and it would become a static graphic, and still in hi-res.

    They must be large psd files, if they weren't so big Acrobat would open it fast and you wouldn't notice the different layers...  Flatten the psd first and you'll fix it.

  • Need to create a pdf that shows imported charts accurately

    I have an annual report with a lot of charts and graphs imported from Illustrator. When I create a pdf, the lines of the charts and graphs appear to be inconsistent. The images are fine, but I am unable to show them to the client as the should look. I have tried every option for exporting and also have printed to a pdf with no luck. Is there a way to get a better preview a pdf from Indesign? I am on a MAC/OS 10.5.8/CS3.

    That's a display issue and there's not a whole lot you can do about it. You can try playing around with the Acrobat/Reader display prefs but I will tell you one thing for sure...if the person viewing this is using an LCD that is not running at its native resolution it's not likely that you'll ever get it to look good.
    Bob

  • How do I set up my Airport Extreme to create a LAN without being connected to the internet?

    I'm trying to set up a POS(point of sale) for my small restaurant. ADSL internet is not available at the site. I have set up my system(finally)while hooked up to my router at home, however my system will not work when disconnected from my router. How can I configure the Airport to operate my printers without an internet connection?

    First off- Thanks for taking the time to answer me.
    I have 2 Star Micronic Ethernet connection printers that I hope to operate using a POS software interface called Ambur.
    The program is pretty straight forward and while my Airport Extreme was WAN ethernet connected to my D-Link Router, I had the program and printers integrated and operating surprisingly easily.
    My issue is that I don't have internet available at the restaurant, so I need to create a network without an internet connection.
    I did the hard reset and the rest.
    Now I have the same configuration, but not connected through the router, trying to acheive the same result, but its not connecting.
    I've tried programming the software with every IP address, including the ones that worked while connected to the other router, to no avail.

Maybe you are looking for

  • How do I get the music on my memory card to show up in my music on my Samsung Brightside?

    I have a Samsung Brightside and I have a memory card in it. For some reason I can't get the music on my card to show up on my phone. whenever i go to My music it says there is no music.

  • Thumbnail view of tabs in tabbedpane

    Hi all, I am doing a desktop app . In my app i am using JTabbedPane . In order to view the contents of all tabs in one shot,i need to bring the JPanel in each tab into a single frame,that contains a scrollbar.i.e,something like a thumbnail view of al

  • Field symbols as Class Attributes

    Hello Gurus, Is anybody able to say to me if it is possible to declare field symbols as class attributes? As I can understand until now, this is not possible and we need to use some attribute with the "TYPE REF TO Data" to get the information we need

  • Database native web services and RAC

    The Readme in the database documentation library says : Database native web services used in an Oracle RAC configuration are not supported. Is this restriction still there for the latest release (the one which was just announced for windows)? Why doe

  • Mac OS X 10.8.3 causes frequent Crash/Reboot

    My 2012 Macbooc Pro began to restart frequently after I have upgraded to Mac OS X 10.8.3.  Everyday it's getting rebooted twice or thrice after getting frozen/unresponsive for few seconds. Is anybody else also facing the problem?