Problem reading attached PDF files

<!--[if gte mso 9]><xml>
</xml><![endif]--><!--[if gte mso 9]><xml>
Normal
0
false
false
false
MicrosoftInternetExplorer4
</xml><![endif]--><!--[if gte mso 9]><xml>
</xml><![endif]--><!--[if !mso]>
<object
     classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
</object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
Hello.
At my work, we use JavaMail (version 1.4.1) in server
programs, processing mails with attached files from customers. Mostly it is
TIFF images, but it can also be PDF
files, and the attached files are extracted and saved for further processing.
Sometimes, we have a problem, reading attached PDF
files. The files get saved, but is of size 0 bytes. If I forward it, however,
using an Outlook client, the forwarded item can be read by our JavaMail program, and files saved OK.
I have tried to forward it using JavaMail, but I cannot
compose the mail parts, that fails, however - of the same reasons: I cannot
read the them in:-)
It looks like it's when the mail is send from a Mac.
Anyway, the part to read is of content type "APPLICATION/APPLEFILE" whereas when it's forwarded, it's content
type is "APPLICATION/OCTET-STREAM"
The way, I read the part, is to check if the part is an
instance of an InputStream, and then saving into a byte array, like this:
h5. Object
obj = part.getContent();
if (obj instanceof
InputStream) {
InputStream
inStream = part.getInputStream();
byte[]
buffer = new byte[BUFFER_SIZE];
int
bytesRead;
BufferedOutputStream
outBufStream = new BufferedOutputStream(new FileOutputStream(attFileName));
while
((bytesRead = inStream.read(buffer)) != -1)
outBufStream.write(buffer,
0, bytesRead);
inStream.close();
h5. outBufStream.close();
Problem
is that .read() method always returns -1 when content type Is APPLICATION/APPLEFILE,
so a file of 0 bytes are created.
Interesting is perhaps, that debugging shows me that the
part instance of the InputStream actually is a
com.sun.mail.util.BASE64DecoderStream when it fails, and a
com.sun.mail.util.QPDecoderStream
when it works OK.
So I have this idea, that I's a certain type of decoder
stream we're missing? We use Java 1.6.0 update 10 and JavaMail 1.4.1. and since
we use java 1.6 we use the JAF framework from that one, I guess?
Hope you guys can help?
Thanks in advance, Per Jensen
[email protected]

We have two (MS Exchange) servers (from trace log):
Microsoft Exchange IMAP4rev1-server version 5.5.2650.23
Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
- the first one is the one, we're using here, but I have tried on the other, newer version too, and it didn't help either.
But I've found out a couple of interesting things:
1: Debugging shows me, that the part instance of the InputStream actually is a com.sun.mail.util.BASE64DecoderStream when it fails, and if I forward the mail via Outlook as described earlier, and it can be read OK, the part is a com.sun.mail.util.QPDecoderStream instance.
2: I can save the WHOLE message to a file, using message.getInputStream(), and when I opens the file I can find the individual attachments - as well as the bodytext, if any - as they are separated with the disposition, mimetype and filename fields, showed as plain text. And the attachments are showed as blocks of characters; I guess it's the ascii character representation of the bytes. Here's a snippet, note the first two sentences. They seemes to be added, somehow, when I dump the message to file(?):
<START OF DUMPED FILE>
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C9A8A2.19479FE4
Content-Type: text/plain;
     charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
(The body text here)
------_=_NextPart_000_01C9A8A2.19479FE4
Content-Type: application/applefile;
     name="first_attachment.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
     filename="first_attachment.pdf"
AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
egAAABAAAAABAAAAigAAI6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAA1NzE2NSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
aWRzIFsgNCAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAovUHJvZHVjZXIgKEhh
...(and so on)
DMgMDAwMDAgbg0KMDAwMDAwNTM1NSAwMDAwMCBuDQowMDAwMDA2NTA5IDAwMDAwIG4NCjAwMDAw
MDc2NjUgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
MQo+PgpzdGFydHhyZWYKODgyNAolJUVPRgo=
------_=_NextPart_000_01C9A8A2.19479FE4
Content-Type: application/applefile;
     name="second_attachment.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
     filename="second_attachment.pdf"
AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
egAAABAAAAABAAAAigAAI9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAA1NzE4MSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
...(and so on)
<END OF DUMPED FILE>I understand that it's base64 encoded and must be decoded, and I have tried to copy/paste the blocks separately, run them through the com.sun.mail.util.BASE64DecoderStream, and saving them as PDF files, which works fine(!).
As the solution seems to be painfull: Parse the mail to find where the attachments starts and stops and saving them as files, I hope you guys can send me on the right track?
PS: The trace log when dumping the file shows everything OK, I think. Here's a bit of the log at the end of dumping the message:
(...)MTUgMDAwMDAgbg0KMDAwMDAwNTg2NyAwMDAwMCBuDQowMDAwMDA3MDIxIDAwMDAwIG4NCjAwMDAw
MDgxNzcgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
MQo+PgpzdGFydHhyZWYKOTMzNgolJUVPRgo=
------_=_NextPart_000_01C9A8A2.19479FE4--
A10 OK FETCH fuldført.
A11 FETCH 1 (BODY[TEXT]<40336.16384>)
* 1 FETCH (BODY[TEXT]<40336> {0}
20/03-09 15:18:21,445 3 Done, writing bytes to ByteArrayOutputStream. Size: 40336 bytes (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
20/03-09 15:18:21,445 3 Done, writing ByteArrayOutputStream to file. (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
A11 OK FETCH fuldført.

Similar Messages

  • Problems reading generated pdf-files

    Hi all,
    I have problems reading generated pdf-files from
    Report Builder 6.0.8.11.3
    An error-message occurs when opening the pdf with
    Adobe Acrobat 5.0.1:
    ... problem 110 and after moving in an empty pdf-document
    the messages:
    - too few operands
    - an unrecognized token
    I think the solution must be very simple, but the docu and
    other info resources provide nothing aboutthis issue.
    Greetings,
    Bernhard

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by the oracle reports team:
    hello,
    there are no known problems with reading reports PDFs with later Acrobat Readers. maybe your file is somehow corrupt.
    regards,
    the oracle reports team<HR></BLOCKQUOTE>
    I had to install a local printer, the network printer is not appropriate here. After that, everything is fine :-)),
    Greetings,
    Bernhard
    null

  • Problem opening attached pdf file

    Hi everybody,
    I'm trying to open a pdf file attached in a mail, but when i try to open it adobe acrobat gives me this error.
    Adobe Reader could not open <doc1.pdf> because it is either not a supported file type or the file has been damaged (for eg:it was sent as an email attachment and wasn't correctly decoded.)
    I've read many posts related to this problem but i haven't found the solution yet.
    Can anyone help me?
    Thanx!!

    Hi Dieter,
    Here is the code,
    doc_chng-obj_name = 'Nomina'.
    doc_chng-obj_descr = 'Nomina de empleado'.
    objtxt = '<html><body>Reserve price : <b>$250000</b>'.
    APPEND objtxt.
    objtxt = 'A reproduction of the painting to be auctioned'.
    APPEND objtxt.
    objtxt = 'is enclosed as an attachment.</body></html>'.
    APPEND objtxt.
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    Creating the entry for the compressed document
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'PDF'.
    APPEND objpack.
    Crecion de attachments
    (Assume the data in OBJBIN are given in PDF format)
    DESCRIBE TABLE data_tab LINES tab_lines.
    objhead = 'nomina.pdf'. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'PDF'.
    objpack-obj_name   = 'ATTACHMENT'.
    objpack-obj_descr = 'Nomina Empleado'.
    objpack-doc_size   = tab_lines * 255.
    APPEND objpack.
    Entering names in the distribution list
    reclist-receiver = 'kkkkkkkkk'.
    reclist-rec_type = 'U'.
    append reclist.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = doc_chng
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        packing_list               = objpack
        object_header              = objhead
        contents_bin               = objbin
        contents_txt               = objtxt
        receivers                  = reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        operation_no_authorization = 4
        OTHERS                     = 99.

  • Problems reading some pdf files in Playbook

    Hi
    I have downloaded some PDF bus timetables and maps from the website of our local operator but found some problems in opening a few of the files -strange error messages or just grey screens
    However I have just found that the app qPDF opens the "problem" files successfully
    So maybe there is a problem with the Playbook version of Adobe or perhaps a problem with the latest OS...???
    But anyway qPDF has got me to where I wanted to be
    Peter

    I have had problems opening the same bus schedules Peter mentioned above. Most of the schedules on that companies routes open without problems with Adobe Reader.
    I get an email notification of my cable bill. When I go to the website to open the Pdf bill, it only opens page 2 of the bill, page 1 is blank. Before the last update, my bill opened fully with Adobe Reader. I will be looking at qpgf

  • I'm having problems opening my pdf files. I'm running windows XP and have adobe reader XI (11.0.06)

    I'm having problems opening my pdf files. I'm running wiondows Xp and have adobe reader XI(11.0.06) installed.

    What kind of problems? What happens when you try? Any error messages?

  • Attaching pdf files they do not open in adobe reader?

    I just downloaded Mozilla as browser due to the many issues with IE. Now when attaching PDF files or trying to read PDF files they show up as a Mozilla icon or do not open with Adobe Acrobat.

    Hi bboedeke,
    That is because Firefox is set as default program for opening .pdf files by Windows.
    There are two ways to change it.
    1,
    Right click on any pdf file --> choose "Open With" --> choose "Choose Default Program" --> now choose the application that you want to set as default for opening .pdf (in this case, Adobe reader.)
    2,
    Refer to http://windows.microsoft.com/en-in/windows/change-default-programs

  • Having problems opening a pdf file with reader 10/11 get error msg cannot open close reader and try again any ideas

    having problems opening a pdf file with reader 10/11 get error msg cannot open close reader and try again any ideas

    Hi George ,
    Is it happening with all the PDF' or any specific one?
    Could you please share the error message so that we can replicate at our end ?
    Try repairing reader  once and see if that fixes the issue.
    Launch Reader>Navigate to Help>Repair Adobe Reader Installation
    Regards
    Sukrit Dhingra

  • Problem in Reading a .PDF file

    HI Friends,
    I am reading a .pdf file from within java program using its java.io package.
    I am able to read the file, but when I print the line read from file on to the screen, it all garbage. Its not in readable characters.
    I guess its reagrding mismatch in Charcter Sets of original file and the stream with which I m reading the file.
    So,if u know the solution plz suggest me.

    Hello Simple@java
    Here's an exemple of a class that opens the File "rapport.pdf" located at the same place as the class.
    Of course AcroRd32.exe is the name of Acrobat Reader which allows to read pdf files. You can get it on : adobe.com(http://www.adobe.com/products/acrobat/readstep2.html)
    You will change "rapport.pdf" by the name of your pdf file.
    Then execute "test()".
    * Open the file "rapport.pdf"
    public class test
         public test()
              Runtime a = Runtime.getRuntime();
              try
                   a.exec("AcroRd32.exe rapport.pdf");               
              catch (Exception e)
                   System.out.println(e.getMessage());
    Good luck !

  • How can I retain the attached .pdf files (displayed as icons) from my word file 2010 to a pdf file?

    Hi everybody,
    I have looked for an answer in this forum ... without any good result.
    I worked on a Word 2010 file with some attached pdf files. These attached files are displayed as icons on the word file. If you double click on them, you can consult them. This works very good.
    Problem: I would like to convert this word 2010 file into a pdf file, which keeps the icons (linked to attached files) active. If I "pdf" this with my current system, icons are displayed as pictures: I cannot open the attached files.
    My question is very simple: is it possible to retain these active icons (= to open attached documents) in a pdf file? Which adobe package should I use?
    Many thanks for your help 
    cheers
    elgreengo

    No, it's not possible, but I agree it would be a very nice feature.

  • Can no longer attach pdf files into email.

    I recently purchased a new computer with Windows 8.1 as the OS.  Seems that I am no longer able to attach PDF files into any email.  Any clues as to what has gone wrong?

    Thanks for the help.  Seems I had a failed Windows update several weeks past I had forgottent about.  Had to do a restore to the prior date to get back to the right configuration.  Did an online session with Mircosoft, reinitiated the update, and it seems as if the issue is resolved.  We were able to re-test attaching and send pdf files. Seems there is still some slight issue with IE, but you appear to be on the right track about focusing on Web Outlook if the problem continues to surface.  Thanks again.

  • How read a pdf file and change TableCell height after reading it using itext api

    I have created a pdf form file using itext ( see class CreatingFormClass ) with itext PdfPTable and PdfPCell. It is done successfully .
    Now I  read this pdf file and filling this pdf file(see class FillingFormClass  ) and at this point i want to change  PdfPCell height () according to Items.
    It is possible or Not???
    My code is given below.
    Thanx in advance
    public class FillPdfFormMainClass {
    public static  String RESULT1 = "E:/BlankForm.pdf";
        public static  String RESULT2 = "E:/FilledForm.pdf";
        public static void main(String[] args) throws DocumentException, IOException {
            String empName="Rakesh Kumar Verma";
                    // This part is Dynamic. It can be 1 item Or can be 25 items
            String listOfItem="Item 1 \n Item 2 \n Item 3\n Item 4 \n Item 5 \n Item 6 \n Item 7 \n Item 8 \n Item 9";
            CreatingFormClass example = new CreatingFormClass(0);
            example.createPdf(RESULT1);
            FillingFormClass class1 = new FillingFormClass();
            class1.manipulatePdf(RESULT1, RESULT2,empName,listOfItem);
    public class CreatingFormClass implements PdfPCellEvent {
        protected int tf;
        public CreatingFormClass(int tf) {
            this.tf = tf;
        public void createPdf(String filename) throws DocumentException, IOException {
            Document document = new Document();
            PdfWriter.getInstance(document, new FileOutputStream(filename));
            document.open();
            PdfPCell cell;
            PdfPTable table = new PdfPTable(2);
            table.setWidths(new int[]{1, 2});
            table.addCell("Name:");
            cell = new PdfPCell();
            cell.setCellEvent(new CreatingFormClass(1));
            table.addCell(cell);
            table.addCell("Item List:");
            cell = new PdfPCell();
            cell.setCellEvent(new CreatingFormClass(2));
            cell.setFixedHeight(60);
            table.addCell(cell);
            document.add(table);
            document.close();
        public void cellLayout(PdfPCell cell, Rectangle rectangle, PdfContentByte[] canvases) {
            PdfWriter writer = canvases[0].getPdfWriter();
            TextField text = new TextField(writer, rectangle, String.format("text_%s", tf));
            text.setBackgroundColor(new GrayColor(0.95f));
            switch (tf) {
                case 1:
                    text.setText("Enter your name here...");
                    text.setFontSize(8);
                    text.setAlignment(Element.ALIGN_CENTER);
                    break;
                case 2:
                    text.setFontSize(8);
                    text.setText("Enter Your Address");
                    text.setOptions(TextField.MULTILINE);
                    break;
            try {
                PdfFormField field = text.getTextField();
                writer.addAnnotation(field);
            } catch (IOException ioe) {
                throw new ExceptionConverter(ioe);
            } catch (DocumentException de) {
                throw new ExceptionConverter(de);
    public class FillingFormClass {
        public void manipulatePdf(String src, String dest,String empName,String listOfItem) throws IOException, DocumentException {
            PdfReader reader = new PdfReader(src);
            PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(String.format(dest, empName)));
            AcroFields form = stamper.getAcroFields();
            form.setField("text_1", empName);
            form.setField("text_2", listOfItem);
            stamper.close();
            reader.close();

    Hi,
    I am facing the same problem. Please help me out. I just want to read a PDF file as bytes from one location and write it as another pdf file in some other location with a diolog box prompting to open or save in the location where we want.
    I executed the following code:
    try{
    File report =new File(location);
    BufferedInputStream in=new BufferedInputStream(new FileInputStream(report));
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition", "attachment; filename=" + report.getName());
    OutputStream outs = response.getOutputStream();
    int readlen;
    byte buffer[] = new byte[ 256 ];
    while( (readlen = in.read( buffer )) != -1 )
    outs.write( buffer, 0, readlen );
    outs.flush();
    outs.close();
    in.close();
    response.setStatus(HttpServletResponse.SC_OK);
    } catch (FileNotFoundException fileNotFoundException) {
    PrintWriter out= response.getWriter();
    out.print("<center><Font color = 'RED'><b>"+PxDSLUtils.getApplicationProperty("label.error.CTM_E017")+"</b></Font></center>");
    Though it prompts with open, save dialog box when i try to open directly or when i save it some where locally and then open it i am getting the following message " File is repaired ot damaged.Operation failed." Any idea about what can be done??? Its very urgent.Please suggest.
    I am not convetin to string just reading and writng as bytes itself.
    Thanks in advance,
    Mani

  • Problem with opening PDF files from JSF page using SDO

    Hi all,
    I'm new with JSF and was attempting to read a PDF file from a Database using SDO and JSF. The code below throws an exception when casting from DataObject to Blob. The getLcDoc() method was created by WSAD when I dragged an SDO relational record onto the JSF page. This method returns an DataObject type which I tried casting to a Blob type before using it further. However, an exception is thrown.
    Any feedback is appreciated.
    Arv
    try {
                   FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   Blob file= (Blob)getLcDoc().get("ATTACH");
                   int iLength = (int)(file.length());
                   response.setHeader("Content-type", "application/pdf");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   response.setContentLength(iLength);
                   ServletOutputStream os = response.getOutputStream();
                   InputStream in = null;
                   in = file.getBinaryStream();
                   byte buff[] = new byte[1024];
                   while (true) {
                   int i = in.read(buff);
                   if (i<0) break;
                   os.write(buff,0,i);
                   os.flush();
                   os.close();
         } catch(Exception ex){
              System.out.println("Error while reading file : " + ex.getMessage());
         }

    Hi...I found out that there is actually no need to use a Blob object at all. You can simply call the OutputStreams write() method and pass the DataObject.getBytes() method that returns a byte[] array. The revised code is shown at the end of this posting.
    However, a few other teething problems exist:
    1. This works well only if I specify the content type in response.setHeader() method. What if my users upload different types of files, is there a way that the browser opens according to the file type without setting the content type?
    2. I still have a problem opening PDF files, even if I specify - response.setHeader("Content-type", "application/pdf");
    I get the message - The file is damaged and could not be repaired
    3. I would also like this to open the attachment in a new window and using target="_blank" doesn't seem to work as seen below:
    <h:commandLink
                                                 styleClass="commandLink" id="link1" action="#{pc_DocumentDetailsRead.doLink1Action}" target="_blank">
                                                 <h:outputText id="text5" styleClass="outputText"
                                                      value="Click Here"></h:outputText>
                                            </h:commandLink>
    ------------------------Revised code-----------------------------------------
    FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   response.setHeader("Content-type", "application/msword");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   ServletOutputStream os = response.getOutputStream();
                   os.write(getLcDoc().getBytes("ATTACH"));
                   os.flush();
                   os.close();

  • Problem in viewing PDF File.

    Hi All,
    I created a servlet which reads the PDF file from the file system and to show it in the browser. And I attached the URL in my HTML Page. Whenever I click on that URL it is activating PDF viewer in the browser and browser is showing the blank page. But, The moment I refresh the page I was able to view the PDF document. I am sure this is not a coding problem. It looks like some problem with the plug-in. I tried by reinstalling the Acrobat Reader 5.0 still I am facing the same problem. I am using Windows2000 Professional, SilverStream 3.7.is the application Server. Database is Oracle 8i.
    I want to avoid the second step(i.e refresing the page to view PDF document). Can any one help me out in this matter.
    Thanks in advance for helping me out in this problem.
    Thanks
    Shivaji

    I've been working on displaying pdf from a servlet, and although I don't know exactly what your situation is, here is how I served up the pdf file from the servlet using the HttpServletResponse object.
                byte[] data = getFileBytes();// from somewhere
                response.setContentType("application/pdf");
                response.setContentLength(data.length);
                java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("EEE, dd MMM yyyy - HH:mm:ss z");
                response.setHeader("Expires", dateFormat.format(new java.util.Date()));
                response.getOutputStream().write(data); //Write out the pdf report
                response.getOutputStream().flush(); //flush the buffer

  • Problem with preview PDF files on Windows 7 32bit

    Hello,
    in my office I have a problem with preview PDF files on my computers. The files are allright, but if I select a file and click on preview mode after ~ 10sec operation system write something "Preview this file is corrupt for PDF Preview Handler wrong". On other 64bit computers with same programs the preview is work. I try uninstall all Adobe soft (Reader, Flash), clean all Adobe data from folders in root and in register, but it is not solve this problem. On Microsoft forums wrote me, that the problem is probably with AR plugin.
    So, can someone help me?
    Config PC:
    Windows 7 32/64bit Pro
    Intel i3, 4GB
    Adobe Reader 11.0.5
    Adobe Flash Player 15 ActiveX
    Adobe Flash Player 15 plugin
    Preview Handler Surrogate Host ver.: 6.1.7601.17514
    Thank you for help.

    I think I figured it out after reading other forums. Thanks!

  • How do I email an attached pdf file to stationary templates in mail.

    How do I email an attach PDF file using the stationary templates in mail on lion.
    I attached the PDF but when try to send it I get back a dialog box that sez:
    "This message cannot be sent because it uses stationery and contains attachments that are not images. Messages with stationery cannot contain attachments that aren’t images. You can cancel and return to editing the message or remove the stationery in order to send." My choice is to cancel or remove stationary.
    Is there a third party solution? Any suggestion?

    No
    Envoyé depuis Molto pour iPad
    De: pwillener
    Envoyé: jeudi, février 12, 2015 07:14 AM
    À: René Allamelle
    Objet:  how do I compress a large pdf file to fit in an email?
    how do I compress a large pdf file to fit in an email?
    created by pwillener in Adobe Acrobat.com Services - View the full discussion
    But generally it is never a good idea to send e-documents as email attachments.  Better use a file sharing service (Acrobat.com, Dropbox, Google Drive, Microsoft OneDrive, ..), upload the document, then send the shared download link via email.
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7187079#7187079 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7187079#7187079
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Adobe Acrobat.com Services by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

Maybe you are looking for

  • SQL Query -- Please Help

    Table1 QTE_ID     SEQ_NO 1435177     2 1435177     5 1435177     7 1435177     8 1435177     12 1435177     14 Table2 QTE_ID     SEQ_NO     CMMT_CURR_AMT 1435177     1     98500 1435177     2     98500 1435177     3     0 1435177     4     98500 1435

  • I need a report with Rol  - Transaction

    Hello everyone, I have a list with many roles and I need the transaction's list on each role in this role's list, I know I can get this information from Tx SUIM, but from this Tx I need to put each role in the filter and merge all the result, there i

  • Internal Order -Systeme Requirement

    Internal Order accounting  provides you with  a comprehensive  suite of features such as status management, commitments management, detailed reports, and analysis that helps you monitor your jobs through their entire lifecycles Give me the T-Codes fo

  • I am not getting the email required to verify my password

    I changed my apple ID password and it then asked me to verify account by email but I'm not getting the email to do so.

  • CS4 upgrade requirements

    I have a license for Acrobat 8. Will this qualify for an upgrade to CS4?