|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Adobe complete PDF Posting Processing
Any information on how to receive a POST of a "complete pdf" (a submit option available in acrobat 6.0)? I have seen an example of this script using php where the raw html data posted "fputs($fptr, $HTTP_RAW_POST_DATA);" is collected and saved to a file. However I have not figured out nor found another who has figured out how to accomplish this with ColdFusion. Any ideas?
|
|
#2
|
|||
|
|||
|
I'm not really sure what you are asking here. If you mean can you use a file upload form element to upload a PDF to CF, then the answer is yes. But it sounds like you are talking about "posting" from Acrobat directly, which I've never heard of and have no idea how it works. Perhaps you can explain further?
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Clarification
The submit option is contained within Adobe Professional or Distiller itself. Your options are
![]() |
|
#4
|
|||
|
|||
|
Well, as long as this is posted using a standard HTTP POST action, and the encoding is set to "multipart/form-data" (the standard encoding type for uploading files), then this should be simple:
<cffile action="UPLOAD" filefield="name Of File Form Field" destination="path to save file on server" nameconflict="ERROR"> If Acrobat won't let you know the name of the field it is posting, you should be able to determine it on the server by inspecting the FORM structure. Hope that helps, Brian |
|
#5
|
|||
|
|||
|
I'm using
Code:
<cfif IsDefined("Form.Submit")>
<cffile action="UPLOAD" filefield="FileName" destination="C:\location\" nameconflict="MAKEUNIQUE">
<cfelse>
<a href="test.pdf" target="_blank">test</a>
</cfif>
The target for the POST is the original page. It can recognize the submit and causes an error. FileName is a hidden field in the form set equal to the filename so I know I'm passing it (I couldn't figure out how adobe sends the file). I'm worried that Adobe didn't include a enctype="multipart/form-data" or something else that would mess it up. Could this be the problem? I also realize that passing the file name in a hidden field is not the proper way for this to be done. The only success I have had is to use the "mailto:" HTML command and mail the document to myself (this is not ideal). |
|
#6
|
|||
|
|||
|
I would try doing a cfdump of the form scope on the target page to see exactly what Acrobat is posting.
<cfdump var="#form#"><cfabort> You don't want the fileField attribute to be the NAME of the file being posted, you want it to BE the actual file that's being posted. If you picture an HTML form where you can pick a file and upload it to a server, that file field isn't sending the name of the file, it's actually sending the file itself. That's the field that needs to be in the fileField attribute of cffile. |
|
#7
|
|||
|
|||
|
unbelievable
I did the <cfdump> and while it works on every normal HTML based form it displays nothing (blank page)from the POST with the Adobe PDF (it doens't throw an error). I'm currently paging my way through Adobe's 1,100+ pg manual to try to figure out what is going on. Any other suggestions? other methods to figure out how it's posting?
|
|
#8
|
|||
|
|||
|
Well, the form scope should contain all posted HTTP elements. The web server simply forwards these elements to CF, and CF aggregates them into the FORM scope. So if the FORM scope is coming up as an empy structure, then Acrobat is definitely not doing something in the correct/standard way. Aside from looking through the docs and/or searching around the web for info on how Acrobat is posting the data, I'm not sure what else to propose.
|
|
#9
|
|||
|
|||
|
Adobe Reference
Taken from PDF Reference Version 1.5
pg. 641 SubmitPDF (PDF 1.4) If set, the document is submitted in PDF format, using the MIME content type application/pdf (described in Internet RFC 2045, Multipurpose Internet Mail Extensions (MIME), Part One: Format of Internet Message Bodies; see the Bibliography). If this flag is set, all other flags are ignored except GetMethod. pg. 643 PDF format (in this case, the entire document is submitted rather than individual fields and values). |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Adobe complete PDF Posting Processing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|