Unable To Save PDF File Locally


Hi,

I’m using Aspose to create a copy of an existing PDF file, autopopulate the required form fields and then using Javascript display the PDF file in a new browser window.

At this point in time, the user completes the form by filling in other form fields manually. Then they save the file to their local machine.

When they save it and reopen it, none of the data that they input is shown, however any data that was autopopulated is shown IE saved.

Is there anyway to save the data that the user inputs as well as the autopopulated data?

Thanks for your assistance

Hi

				<span id="ctl00_bcr_up___TextboxFirstName">Galahad,<br><br>Thank you very much for considering Aspose.<br><br>Can you please share a sample project with us so we could look into the problem in context?<br><br>We're looking forward to help you out.<br>Regards,<br><br></span>


Thanks for the timely response. From what I can understand as related to Adobe products, you cannot auto fill a form and then also save data that was input by the user.

Here’s the code sample:

StringBuilder sbJS = new StringBuilder();
License license = new License();

string licPath;
string fullLicPath;
string templatePath;
string templateName = @“Templates\” + ddlTemplates.SelectedValue.ToString();
string randomGeneratedName = Common.RandomString(10, true);

//set license file directory and name
licPath = Server.MapPath(Common.getConfigKey(“siteBasePath”));
templatePath = Server.MapPath(Common.getConfigKey(“siteBasePath”));
fullLicPath = licPath + “Aspose.Total.lic”;
license.SetLicense(fullLicPath);

randomGeneratedName = randomGeneratedName + “_RXLMN”;

Form form = new Form(templatePath + templateName, templatePath + “/Templates/” + randomGeneratedName + “.pdf”);

//auto fill Ordering Physician Fields
form.FillField(“Facility #”, Session[“facId”].ToString());
form.FillField(“Facility Name”, Session[“facName”].ToString());
form.FillField(“Name”, lbDoctors.SelectedItem.ToString());
form.FillField(“Address_2”, Session[“facAddress”].ToString());
form.FillField(“City_2”, Session[“facCity”].ToString());
form.FillField(“State_2”, Session[“facState”].ToString());
form.FillField(“Zip_2”, Session[“facZip”].ToString());
form.FillField(“Phone_2”, Session[“facPhone”].ToString());
form.FillField(“Fax”, Session[“facFax”].ToString());

//auto fill Ordering Physician Fields
form.FillField(“Facility Name_2”, Session[“facName”].ToString());
form.FillField(“Name_2”, lbDoctors.SelectedItem.ToString());
form.FillField(“Address_3”, Session[“facAddress”].ToString());
form.FillField(“City_3”, Session[“facCity”].ToString());
form.FillField(“State_3”, Session[“facState”].ToString());
form.FillField(“Zip_3”, Session[“facZip”].ToString());
form.FillField(“Phone_3”, Session[“facPhone”].ToString());
form.FillField(“Fax_2”, Session[“facFax”].ToString());

form.Save();

sbJS.Append("");

ScriptManager.RegisterStartupScript(upGetTemplate, this.GetType(), “openTemplate”, sbJS.ToString(), false);

I get the following Adobe Reader message when the file opens in the new window:

"Please fill out the following form. You cannot save data typed into this form. Please print your completed form if you would like a copy for your records"

When I take the original PDF and enable usage rights, I’m unable to interact with the form at all, althougth the form fields are still auto fill by Aspose. This the message generated when the user rights enabled form opens in the new window:

"This document contained certain rights to enable special features in Adobe Reader. The document has been changed since it was created and these rights are no longer valid. Please contact the author for the original version of this document."

Thanks alot for your help in this matter.




Hi Galahad,

I’m afraid that we’ll also need the PDF file (form template) you’re having problem with in order to reproduce and investigate the problem at our end. Kindly share the PDF with us so could continue working on this issue.

We appreciate your patience and cooperation.
Regards,


Thanks for the help, it turns out it an Adobe Reader specific issue related to security. Adobe support suggested buying license for Adobe Reader Extensions which allows user with Reader to save form locally and still retain any info they have input.

Phase II of the project will solve the issue by saving user data to db and then retrieving the db results to fully autopopulate the form from db results. The form will be read only but user can still save it locally for archiving purposes.

shahzad,

I too am unable to manipulate a pdf document using PDFKit, then output a pdf with form fields that can be saved by the end user.

As an example, I attached an input file that we use. It contains text fields that can be edited. When opened in Adobe Reader, the Reader says at the top "Please fill out the following form. You can save data typed into this form."

However, after I use PDFKit (latest version) to fill in data on the form using code such as...

MyAsposeForm.FillField("ShippingAddressState", strShipToState)

or if I do anything else with PDFKit, such as concatenate, the output file now says "You cannot save data typed into this form". No errors or other problems, no problem printing, but the user just can't save changes.

I tried setting file security to "DocumentPrivilege.AllowAll", but that didn't make any difference. Seems like it ought to be a common issue and something simple.

Thanks,

Richard

Hi Richard,

I’m seeing a different message on opening the PDF file after filling it using Aspose.Pdf.Kit. I have attached the message snapshot with this post. Kindly confirm that this is the same message you’re receiving at your end.

We’re sorry for the inconvenience.
Regards,

shahzad,

I don't see any attachment to your post?

Richard

Hi Richard,

Please find the error message snapshot attached with this post.

I’m sorry for the inconvenience.
Regards,

No, I haven’t seen that message. Acutally we don’t get any “error” messages, just the message that “You cannot save data typed into this form…” (see attached screenshot)

Hi Richard,

This issue is caused due to the fact that Adobe Reader Extensions are not enabled. In order to achieve this functionality you’ll need Adobe LiveCycle Reader Extensions. I’m afraid that this feature is not supported by Aspose.Pdf.Kit; Our team will be looking into the matter that whether this feature can be supported or not.

We’re sorry for the inconvenience.
Regards,

Thanks for the information.

The issues you have found earlier (filed as 10356) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.