These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

submitForm doesn't submit the whole pdf content to server side

kendrew
Registered: Oct 27 2006
Posts: 29

I found that it's strange after I submitted the pdf file with keywords to server side, then I found the pdf content on server side lost the keyword content.

that's simple to make the things happen again.
ctrl+d, set some keywords into keywords field of any document,
ctrl+j raise up the console, input:
this.submitForm(
{cURL: "http://test08/test/echofile.aspx",
cSubmitAs: "PDF"
});

where echoFile.aspx just return the PDF file back;
ctrl+d, and then you found no keywords there.
Also, the other info's will lost too like the property: this.info["staffID"] = '1990213';

---------------echoFile.aspx as below-----------------
<%@ Page Language="C#" debug="true" %>
<%@ import Namespace="System.IO" %>
<% int len = (int)(Request.InputStream.Length);
byte[] bytes = new byte[len];
Stream stream = Request.InputStream;
stream.Read(bytes, 0, len);
Response.ContentType = Request.ContentType;
Response.OutputStream.Write(bytes, 0, len);
Response.End();
%>
----------------------------------------------------------------

* Testing under Acrobat 8.0
any one could help?

thanks,
Kendrew.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
the keywords and the "doc.info" object are the PDF's metadata. This is an odd one. Did you try saving the PDF before submitting? Have you tried saving the PDF on the server, from the aspx, and then looking at that?

Have you tried filling out form fields on the PDF and performing the same operation to see if other kinds of data are stripped out? It's possible that instead of the data being stripped out, that the Pre-modified PDF is being sent. One way to check this is to look at the "docID".

When Acrobat sends the PDF it sends the raw PDF bytes. There's no easy way to just leave off data and as far as I know it doesn't do any preprocessing that could have stripped out the metadata.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

kendrew
Registered: Oct 27 2006
Posts: 29
thomp wrote:
the keywords and the "doc.info" object are the PDF's metadata. This is an odd one. Did you try saving the PDF before submitting? Have you tried saving the PDF on the server, from the aspx, and then looking at that?Have you tried filling out form fields on the PDF and performing the same operation to see if other kinds of data are stripped out? It's possible that instead of the data being stripped out, that the Pre-modified PDF is being sent. One way to check this is to look at the "docID".
I did try saving, close acrobat and then open again, then upload to server side, and echo file back, the result is the same.