Solved

Javascript to save a pdf to a network share

Posted on 2008-10-28
6
459 Views
Last Modified: 2012-08-14
I need assistance with the java script necessary to perform the following:
I have a PDF that I need to add a button to which saves the completed pdf to a network share.
I need to have the script save the file to the share and create the filename using the following:
Document Name (constant) plus the associate's name (currently TextField1) plus the class date (currently TextField2) so it would look like this: "DRP Certification - John Smith - 10.28.2008.pdf".

Any assistance would be greatly appreciated.
0
Comment
Question by:chryo4096
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 250 total points
ID: 22828664
Are you looking for Java or JavaScript as they are distinct differences?

For java, these links may be helpful.

Free Libraries for PDF in Java:
http://java-source.net/open-source/pdf-libraries

More Detail on iText:
http://www.lowagie.com/iText/
http://www.ibm.com/developerworks/opensource/library/os-javapdf/

Regards,
Kevin
0
 

Author Comment

by:chryo4096
ID: 22830887
Javascript.

Thanks, Kevin
Chris
0
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 250 total points
ID: 22831072
You may want to add some of JavaScript zones to the question to attract experts in those areas since this zone will pull the Java types like myself. :)
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 250 total points
ID: 22839056
1. I am pretty sure you cannot have javascript inside or outside the pdf save anything
2. I am pretty sure you also cannot access a share from a normal web page - WSH could but that is not a normal web page
3. if the form you are filling in is inside the pdf, make the form action go to the server with the data and return a new pdf with the following headers:



header("Content-Disposition", "attachment; filename=" + "DRP Certification - John Smith - 10.28.2008.pdf"); // these strings should come from the request of course
header("Content-Length", length of the file);
header("ContentType: application/octet-stream");
 
write the file to output here

Open in new window

0
 

Author Comment

by:chryo4096
ID: 23485810
I was able to address this request by adding a button to the form to open a network share.  I could not have the file save automatically as requested but instructed the user to enter the appropriate file name in the Save As dialog.

I appreciate all the suggestions provided.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to filter by key press ? 6 54
Javascript Regex 7 20
Html split(text) Part2 6 20
sort Multi-dimensional array 6 9
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question