SunQuest
           ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 12th, 2004, 04:51 PM
GomerFusion GomerFusion is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GomerFusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old July 12th, 2004, 07:27 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
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

Reply With Quote
  #3  
Old July 13th, 2004, 12:00 PM
GomerFusion GomerFusion is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GomerFusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Clarification

The submit option is contained within Adobe Professional or Distiller itself. Your options are

Reply With Quote
  #4  
Old July 13th, 2004, 12:40 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
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

Reply With Quote
  #5  
Old July 14th, 2004, 08:59 AM
GomerFusion GomerFusion is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GomerFusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 form code is in the Acrobat file.
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).

Reply With Quote
  #6  
Old July 14th, 2004, 09:46 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
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.

Reply With Quote
  #7  
Old July 14th, 2004, 11:56 AM
GomerFusion GomerFusion is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GomerFusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #8  
Old July 14th, 2004, 12:21 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
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.

Reply With Quote
  #9  
Old July 14th, 2004, 12:28 PM
GomerFusion GomerFusion is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GomerFusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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).

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Adobe complete PDF Posting Processing


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway