When a license is issued message "Evaluation Only"

Hi!
I work with the package Aspose.Pdf, license orderID 130801102820 . In the formation of the document a message "Evaluation Only"
What could be the problem?

package aspose.pdf.new-4.0.0


Hi Igor,


Thanks for your inquiry. Please open your license file in a text editor and double check subscription expiry date of license. If it is a valid license then please validated whether you are referring correct license file in your application. Even then issue persist then please share your license file via email as suggested in purchase FAQS, we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

Thank you for your quick response to my request, sent you a license file and a description of the problem.

Hi Igor,


Thanks for your patience. We have investigated the issue and found that you are using new license with old release i.e. Aspose.Pdf for Java 4.0.0, so getting the issue. If you want to use old release then please keep using your old license with it.

Moreover we have tested your shared license with Aspose.Pdf for .Java 9.3.1 and its working fine. You are entitle to use any release published between 01-Aug-2013 to 01-Aug-2014 with current license.

Please feel free to contact us for any further assistance.

Best Regards,

And how to get 9.3.1? The site is available only 4.5.1 and 9.5.2

Hi Igor,


Please visit the following link to download Aspose.Pdf for Java 9.3.1. In case of any further query, please feel free to contact.

After the transition from version 4.0.0 to 9.3.1 when opening the pdf document prompted a password to open.
The code uses the following construction:
...
pdf.setSecurity(new Security());
pdf.getSecurity().isCopyingAllowed(false);
...

In version 4.0.0 this code did not lead to request a password, how to change the code?


Hi Igor,


Thanks for your feedback. Please share your sample working code here, we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,
package test;

import aspose.pdf.Pdf;
import aspose.pdf.Section;
import aspose.pdf.Security;
import aspose.pdf.Text;
import com.aspose.pdf.License;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;


public class Test931 {

private static final Logger log = Logger.getLogger(Test931.class);

public static void main(String[] args) throws Exception {

PropertyConfigurator.configure("log4j.properties");

testAspose931();

}

static void testAspose931(){

License license = new License();

Pdf pdf = new Pdf();

File asposeLicenseFile = new File("Aspose.Pdf.lic");
try {
license.setLicense(new FileInputStream(asposeLicenseFile));
} catch (Exception e) {
log.error("The license is invalid", e);
}

// If you comment out the following 2 lines, the password prompt is not issued
pdf.setSecurity(new Security());
pdf.getSecurity().isCopyingAllowed(false);

Section section = pdf.getSections().add();
Text text = new Text("qwertyQWERTY");
section.getParagraphs().add(text);

File file;
FileOutputStream fileOutputStream;

try {
file = new File("testAsposePdf931.pdf");
fileOutputStream = new FileOutputStream(file);
pdf.save(fileOutputStream);
}
catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug("save", e);
}
}
}
}

Hi,

I have tested the scenario using the following code snippet and have observed that when viewing the PDF file, a prompt for the password appears. For the sake of correction, I have logged it in our issue tracking system as PDFNEWJAVA-34530. We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience.

[Java]

aspose.pdf.Pdf pdf = new aspose.pdf.Pdf();
pdf.getSections().add();
pdf.setSecurity(new aspose.pdf.Security());
pdf.getSecurity().setCopyingAllowed(false);
pdf.getSecurity().setDefaultAllAllowed(false);
pdf.getSections().get_Item(0).getParagraphs().add(new aspose.pdf.Text("Hello World..."));
pdf.save("c:/pdftest/SecureFile.pdf");

However, as a workaround, you may consider using the following code snippet based on the new Document Object Model (DOM) of com.aspose.pdf package.

[Java]

com.aspose.pdf.Document doc = new com.aspose.pdf.Document();
doc.getPages().add();
doc.getPages().get_Item(0).getParagraphs().add(new com.aspose.pdf.TextFragment("Hello World.. with DOM"));

try {
    com.aspose.pdf.facades.DocumentPrivilege documentPrivilege = com.aspose.pdf.facades.DocumentPrivilege.forbidAll();
    documentPrivilege.setAllowCopy(false);
    documentPrivilege.setAllowPrint(true);
    doc.encrypt("", "", documentPrivilege, CryptoAlgorithm.AESx128, false);
    doc.save("c:/pdftest/DOM_Secured.pdf");
} finally {
    if (doc != null) doc.dispose();
}

The issues you have found earlier (filed as PDFNEWJAVA-34530) have been fixed in Aspose.Pdf for Java 10.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.