We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.PDF - Preserve Extended Rights feature while working with Forms Issue

Hello, I am using a trial version of Aspose.PDF version 7.6.0. When I try tp populate a pdf fillable form and save it using Aspose.PDF I lose the extended rights feature in the pdf and it can no longer be filled out. I have followed the example code provided in your "Preserve Extended Rights feature while working with Forms Preserve Extended Rights feature while working with Forms" article but this does not fix the problem.

Preserve Extended Rights feature while working with FormsPreserve Extended Rights feature while working with Forms

http://www.aspose.com/docs/display/pdfnet/Preserve+Extended+Rights+feature+while+working+with+Formsv

We are looking to purchase this control but we need to know that this will work before we buy it so I am hoping that this is just a side effect of using the trail version.

Please let me know as soon as you can because we are ready to purchase if you can verify that this will not be an issue eith the paid version of the library.

Thanks!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Hi Rod,


Sorry for the inconvenience. Could you please share your source pdf document? so we test it at our end provide you further information.

Best Regards,

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

The pdf file is just a simple test PDF Form created using Adobe ProXI. The reader used was Adobe Reader 9. The version of Aspose used to fill the PDF Form was 7.6.0 Trial Version.

I have attached 2 files.

1. This is the original fillable pdf form as it was before setting filling data with Aspose: PdfFormTest_Before.pdfPdfFormTest_Before.pdf

2. This is the result after filling in the file using Aspose: PdfFormTest_After.pdfPdfFormTest_After.pdf

This is the code that I used to read and fill the form:

string pdfFile = @"C:\PdfFormTest.pdf"

FileStream fs = new FileStream(pdfFile, FileMode.Open, FileAccess.ReadWrite);

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fs);

TextBoxField txtFld = pdfDocument.Form["SingleLineTextField"] as TextBoxField;

txtFld = "single line answer";

pdfDocument.Save();

fs.Close();

I also tried doing the same thing using the facade approach.

Aspose.Pdf.Facades.Form pdfFormEdit = new Aspose.Pdf.Facades.Form(pdfFile);

pdfFormEdit.FillField("SingleLineTextField", "single line answer");

pdfFormEdit.Save();

Thanks,

Rod

Hi Rod,


Thanks for additional information. Unfortunately, I couldn’t reproduce the issue using your provided code snippet. Please find attached the filled Pdf document. Please request a temporary license and re-evaluate your scenario. If issue persist then please share the error message for further investigation.

Please feel free to contact us for any further assistance.

Best Regard,

Hi,

Thanks for checking this but I realized that I sent you the wrong pdf file to test. The trial version of Aspose.PDF for .NET limits you to 3 fields that it can read. The field that I am changing in the code can't be read or changed because of this limitation so I had to remove some of the fields from the form in order to read and write to that field.

The problem only occurs when using the trial version of the contorl and because you where able to change the document this indicates that you did not do so by using the trial version. If you use the trial version I confident you will have the same problem.

I have applied for a temporary license however so hopfully if that is granted I should be able to confirm if this is just an issue with the trial version which I suspect that it is.

Thanks,

Rod

Hi Rod,


Hopefully you have received the temporary license and your issue is resolved otherwise please confirm. We will be more than happy to help you.

Best Regards,

Hello,

Problem Fixed!
This did turn out to be an issue with the trial version and I am now able to do this using a purchased version of the software.

New Issue
I however have another issue that is related to this same problem. I am using version 7.9.0. When I concatenate multiple pdf documents that have “Extended Rights” the extended rights feature is not preserved.

I have tried this using file paths and file streams. This however creates a new pdf document without the extended rights feature.

I have also tried adding the pages from one document to another. When I do this I get the following message when I open the pdf document.
“This document enabled extended feature in Adobe Reader. The document has been changed since it was created and use of the extended feature is no longer available. Please contact the author for the original version of this document.”

Is there anyway to preserve the extended rights when concatenating documents?

I have included some sample test code and have attached 3 Adobe PDF forms that have “Extended Rights” for you to test with.

// TEST 1
string input1 = @“inputFile1.pdf”;
string input2 = @“inputFile2.pdf”;
string output = @“output.pdf”;
Aspose.Pdf.Facades.PdfFileEditor pdfEditor = new Aspose.Pdf.Facades.PdfFileEditor();
pdfEditor.Concatenate(“inputfile1”, “inputfile2”, “outputfile”);

// TEST 2
string inputfile1 = @“inputFile1.pdf”;
string inputfile2 = @“inputFile2.pdf”;
string outputfile = @“output.pdf”;
using (System.IO.FileStream input1Stream = new System.IO.FileStream(inputfile1, System.IO.FileMode.Open))
using (System.IO.FileStream input2Stream = new System.IO.FileStream(inputfile2, System.IO.FileMode.Open))
using (System.IO.FileStream outputStream = new System.IO.FileStream(outputfile, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite))
{
System.IO.FileStream[] inputStream2 = new System.IO.FileStream[2];
inputStreams[0] = input1Stream;
inputStreams[1] = input2Stream;
//create PdfFileEditor object
Aspose.Pdf.Facades.PdfFileEditor pdfEditor4 = new Aspose.Pdf.Facades.PdfFileEditor();
//concatenate file
pdfEditor4.Concatenate(inputStreams, outputStream);
}

// TEST 3
string outputFile = @“inputFile1.pdf”;
string inputFile = @“inputFile2.pdf”;
using (System.IO.FileStream inputStream = new System.IO.FileStream(inputFile, System.IO.FileMode.Open))
using (System.IO.FileStream outputStream = new System.IO.FileStream(outputFile, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite))
{
Document outputDocument = new Document(outputStream);
Document inputDocument = new Document(inputStream);
outputDocument.Pages.Add(inputDocument.Pages);
outputDocument.Save();
}

Hi Rod,


Sorry for the inconvenience faced. I've managed to reproduce the reported issues on my side and logged the issue in our bug tracking system for further investigation and resolution, the issue ID is PDFNEWNET-35307. I've also linked your request to this issue and you will be notified via this forum thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>Best Regards,

We have been working around this issue for a very long time but it is still an issue for some of our users who are required to use PDF Reader 10 and earlier. Has there been any progress on resolving this issue yet?

Hi Rod,


Thanks for your inquiry. Our product team had investigate the issue and found that the feature to preserve extended rights during concatenation of PDF documents can not be implemented.

This feature can not be implemented because concatenation of document changes document and digital signature may not be updated. Changes to document are disabled in Extended Rights, any change to the document breaks extended rights and that’s why we can not add pages to the document with preserving extended rights.

Best Regards,