How to generate a PDF using a webservice?

Hi all,
I've got the following code in a webservice that generates a PDF:
// Create a ServletOutputStream object
ServletOutputStream oOutput = objResponse.getOutputStream();
// Set the HTTPResponse objects content type
objResponse.setContentType(objMyOutputContext.getContentType());
// Get the length of the output stream
int outLength = objMyOutputContext.getOutputContent().length;
// Create a byte array and allocate outLength bytes
byte[] cContent = new byte[outLength];
// Populate the byte array by invoking getOutputContext
cContent = objMyOutputContext.getOutputContent();
// Write a byte stream back to the web browser. Pass the byte array
oOutput.write(cContent);
The problem is that I don't know how to pass the HttpServletResponse object (objResponse) to the WebService so I can obtain the ServletOutputStream which is needed to create the PDF form in a web browser. When I pass this object there's an error because this type of parameter is not serializable.
Can anyone help? Does anyone know how to serialize this object? Is there any other possibility to generate a PDF form using a webservice with a serializable parameter?
Thanks

Hi,
It sounds good, maybe you can get more info at http://www.adobe.com/devnet/
Good luck and regards

Similar Messages

  • How to generate a pdf form from a webform

    HOW TO GENERATE POPULATED PDF?
    We used to fill out the forms at work longhand (yes, with a pen!)
    Now since we created the form using Acrobat 9 Pro, we just enter the data on computer, and print out the form.
    Acrobat 9 form creator was great - I found it quite easy to use.
    Now, I'd like to automate the process even further.
    Each week we receive response forms from our website (maybe about 20-25).  These response forms have about 10 fields that
    people have completed with their information.Currently I am printing  out the response form and then open up the acrobat form and I enter their information into the pdf (and then print).
    1. Is it possible to automatically populate a pdf from the response form ? (without me having to print out the response form and re-enter the data)
    2. Is it really complicated; is this something I can do with some software/learning or do i need a programmer?
    Thank you kindly for any advice or direction.

    It sounds like you are using the forms in your local shop and that e-mail may work fine. If e-mail submission works fine (not recommended for normal use, but find in a controlled environment where you can be sure each e-mail client is running MAPI), then add a submit button to submit a FDF or XML data file (I like FDF when using forms in Acrobat, Designer only uses XML forms). You can then import the FDF or XML data to the form and print it. You can even manipulate the FDF or XML data and add it to a database of some form, furthering your processing even more.

  • How to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    PDF 417 Barcode Description given in the Livecycle Designer 8.2
    : PDF 417 Non-Scriptable Barcode. Value must be assigned to this barcode at design time, and this barcode will not update after form object value changes.
    And my question is how to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    All the information you described points to the problem that reports seems can't generate to a file which already exist. You can verify that by simply doing
    r30run32 C:\AC_REPORT.REP DESTYPE = FILE DESFORMAT = PDF BATCH = YES' desname=c:\temp\ac_report.pdf
    several times. If first time the report is successfully generated in c:\temp\ac_report.pdf, but not the second, third time, then it looks like there is a bug on reports r30run32 executable.
    You may try to find any latest patch for Reports 3.0 to see if patch can solve you problem. But keep in mind Reports 3.0 is de-supported, you are better to move to 6i or 9i reports.
    Thanks,
    -Shaun

  • How to disable 'display pdf (using Acrobat Pro X) in browser'?  Note:  The option is unavailable to un-check box.

    How to disable 'display pdf (using Acrobat Pro X) in browser'?  Note:  The option is unavailable to un-check box.

    Hi URT301,
    Please see this document: PDF Ownership when Reader X is Installed with Acrobat. You'll find several solutions to this problem in the FAQ section.
    Please let us know how it goes.
    Best,
    Sara

  • How to display a pdf using outlook

    How to display a pdf using outlook

    You would normally right click on the PDF and select to open it with Acrobat. You have to have Acrobat or Reader installed on the machine.

  • Generating a pdf using InDesign CS4

    Hi there
    I am having problems generating a pdf using version CS4 - I have done this hundreds of times but on this occasion after selecting the preset I want, the file begins to generate / export and once the last page is reached - I get the message Adobe InDesign CS4 has stopped working - A problem caused the program to stop working correctly  and so no saved pdf !
    I tried doing the same thing using InDesign CS3 version at home and alas this works!
    I have tried exporting the file to a Interchange file and then attempted to export the file this way but again the same message appears. V frustrating!
    I have used the same exporting / preset for months and never had a problem before.
    Any ideas? The file is quite large in size - around 80mb but not sure this would cause a problem when trying to generate a high res pdf.
    All thoughts / suggestions welcome!
    Thanks

    Sometimes this is caused by insufficient system resources. In such cases exporting in chunks and combining in Acrobat generally will work.
    If that 's not it, it's most ikley an object on a page that is damaged or otherwise non-cooperative. You can isloate the page by trying  to export half at a time, then half of each section that fails. Once you've isolated the page you can do the same withthe objects on the page.

  • How to export book pdf using custom presets for all book files in indesign using javascript

    How to export book pdf using custom presets for all book files in indesign using javascript.

    Hi jackkistens,
    Try the below js code.
    Note: you can change your preset name in below (e.g, Your preset name).
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "Your preset name", myBook.bookContents, "Book_PDF", false);
    example:
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "[High Quality Print]", myBook.bookContents, "Book_PDF", false);
    thx,
    csm_phil

  • How to generate addm report using grid

    Hi,
    how to generate addm report using grid, please provide any relevant doc/links etc.
    Thanks in advance.

    how to generate addm report using grid, please provide any relevant doc/links etc.When you start with the wrong question, no matter how good an answer you get, it won't matter very much.
    what is best way to divide board into 2 pieces using a hammer?
    Edited by: sb92075 on Oct 25, 2010 7:22 AM

  • After latest update (11.0.10.32), can't generate color PDFs using Word PDFMaker toolbar.  Solution?

    After applying the latest update to Adobe XI Pro, I can no longer generate color PDFs using the Adobe ribbon in Microsoft Word 2010 (Windows 7 operating system).  Other PDF generation methods (for example, Save As Adobe PDF) produce color PDFs just fine, but I need bookmarks as well as color.  Can anyone explain or offer a solution besides uninstalling the current Adobe XI Pro and re-installing the original version?
    Thanks in advance. 

    I’ve found the answer.
    I'm guessing that an Office 2010 update was the problem, or maybe a change in printer drivers?  In Word 2010, I went to Options, Advanced, expanded the Layouts options, and cleared the "Print colors as black on noncolor printers" option. Now I get color PDFs again.  By the way, this must be done for each .docx file. 
    Thanks so much for your patience and help to all who replied.

  • How to generate multiple sheets using xml publisher

    Hi,
    how to generate multiple sheets using xml publisher.
    Thanks,
    Nur

    http://lmgtfy.com/?q=how+to+generate+multiple+sheets+using+xml+publisher

  • How to generate pwm pulse using NI DAQ in MATLAB

    hi everyone. please tell me how to generate pwm pulses using Ni DAQ card in MATLAB Simulink. if through coding is possible then post the corresponding code.....reply me 

    Make sure you have installed the Measurement studio support for VB 6.0 then you will be able to find examples in the folder below on win7 and 8.
    C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples
    Narrow down to Analog Output and choose update voltage example for measurement studio.
    You also have the possibility to use DAQ assistant if you have measurement studio installed. This function is a configuration type programming. After going through the configuration Wizard code is automatically scripted for you so that you can output the voltage you need. Read more about DAQ assistant in the blow link.
    http://www.ni.com/white-paper/4652/en/
    Best Regards
    Jonas Mäki
    Applications Engineering
    National Instruments

  • How to generate a PDF output using batch file in 10G

    Hello,
    I am using .bat file to generate a report PDF output. I have done this many times in 6i but for 10G I am unable to do the same.
    Can someone please look at the syntax below and let me know where I am going wrong.
    I understand that reports are different for 6i and 10G specially .rep file but I am sure we should be able to generate a PDF file using 10G. Please let me know.
    Thanks
    IQ
    Contents of .bat file follow
    ECHO Opening parameter form. Please do not close this window.
    C:\
    FOR /F "tokens=1 " %%I IN ('time /t') DO (SET _TIME=%%I)
    FOR /F "tokens=2 " %%I IN ('date /t') DO (SET _DATE=%%I)
    SET EXP_DATE=%_DATE:~6,4%%_DATE:~0,2%%_DATE:~3,2%_%_TIME:~0,2%%_TIME:~3,2%
    SET FILENAME=SEND_EMAIL_%EXP_DATE%_%USERNAME%.PDF
    CD C:\Users\Documents
    RWCONVERTER REPORT=C:\Users\Documents\send_email.rep USERID=scott/tiger@ORCL1 ORIENTATION=LANDSCAPE DESFORMAT=PDF DESTYPE=FILE
    DESNAME=C:\Users\\%FILENAME% PRINTJOB =NO

    Rwconverter is not used to run reports:
    rwconverter (Reports Converter) enables you to convert one or more report definitions or PL/SQL libraries from one storage format to another.
    I think you mean rwrun:
    rwrun (Reports Runtime) runs a report by starting its own in-process server (not to be confused with the default in-process Reports Server), which runs in the same JVM as the rwrun process.
    This bat file has to run on the server. There is no Reports installation on the client anymore.
    If you want to run a report from a client, you can make a bat file that calls the report url
    See: http://download.oracle.com/docs/cd/E14571_01/bi.1111/b32121/pbr_cla002.htm#i634710

  • How to generate a PDF report using ADF RichTable?

    Hi,
    I am using JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I am displaying my data from db in a JSF Fragment(JSFF) using ADF RichTable component. Actually now I want to generate a PDF report using that data shown in the table on click of a Generate Button. Can anyone please provide me code or sample for that?
    Thanks,
    Vikas

    http://kohlivikram.blogspot.com/2009/04/generate-pdf-report-in-adf.html
    Thanks,
    Navaneeth

  • How to generate a pdf file using javascript?

    I would like to generate a pdf file having images in it using javascript. I tried jsPDF but getting some exceptions like
    Uncaught ReferenceError: pageWidth is not defined,
    fail to load pdf document
    Could anyone show me some pointers?
    Thank You
    Rahul

    Here is my code
    var myImg=new Image();
      myImg.src=arrData['employee'][1]['Image'];
      myImg.crossOrigin ="Anonymous";
       var imgData = this.getBase64Image(myImg);
       var doc = new jsPDF();
       doc.setFontSize(40);
       doc.text(35, 25, "Test Image");
       doc.addImage(myImg, 'JPEG', 15, 40, 180, 160);
       doc.save("sample1.pdf");
    I'm receiving the following error at 'addImage' function.
    Uncaught Error: getJpegSize could not find the size of the image
    Could you please help in pointing out where am I going wrong.
    Thank You

  • How to Write a PDF using File Adapter

    Hi All,
    Can anyone please let me know how to create a PDF file at the receiving end using a File Receiver Adapter. The source is an XML file. The scenario is as follows.
    XML-File ---> XI --->PDF-File.
    Any help would be highly appreciated.
    Thanks in Advance
    Anil.

    hi ,
    if u r using pi7.1 you  can  use agents concept.
    please find the links.
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/fc39c16bfb025ee10000000a1553f7/frameset.htm
    How to get started using Conversion Agent from Itemfield
    More on the SAP Conversion Agent by Itemfield
    Integrate SAP Conversion Agent by Itemfield with SAP XI
    Conversion Agent a Free Lunch?
    How to get started using Conversion Agent from Itemfield
    https://websmp102.sap-ag.de/~sapdownload/011000358700001090982006E/ConvAgentDocSP16.zip
    https://websmp102.sap-ag.de/~sapdownload/011000358700004921152005E/ConversionAgent.pdf
    XI: Generate PDF file out of file adapter
    XI: Read data from PDF file in Sender Adapter
    The specified item was not found.
    regards,
    navneet

Maybe you are looking for

  • Win 8.1 Pro dism /Online /Cleanup-Image /RestoreHealth returns Error: 14098

    I am running Windows 8.1 Pro and have recently been experiencing some odd behavior.  This has lead me to discover that my component store is corrupt. I have attempted to use sfc with no luck and have posted that on a separate thread. When I attempt t

  • Billing plan with partial Delivery

    Hello, I would like to ask question regarding the Downpayment process when processing partial delivery. I have a scenario where i manage a sales Order with item required 2 PC. I have a billing plan for the sales order, with a Fisrt payement against t

  • Batch Rename... how do I keep the version number [NOT the version name]?

    Hi! I've finally made up my mind about renaming my img. names in Aperture, and I would like to have something like "Travel San Francisco 2005 version x 1.CR2", where "version x" is the number which Aperture automatically adds whenever I make a change

  • JRE not found during 9i installation

    Hello guys, I know this is not the right section to post installation errors. However, this is more of a cofiguration error during the time of setting up Oracle 9i on RHEL 4 enviroment. I am trying to install Oracle 9i R2 on RHEL 4.. on HP ProLiant D

  • Does Aperture work with the new EOS 5D Mark II???  Getting an error message

    I have a 5D Mark II and just tried to upload my images for the first time into Aperture. I'm getting a ton of gray boxes and when I click on one, it turns maroon and says "Unsupported Image Format." Please help! These are wedding images so I'm pretty