I did some modifications to your code and I was able reproduce the problem.
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.aspose.cells.CellsHelper;
import com.aspose.cells.PdfCompliance;
import com.aspose.cells.PdfSaveOptions;
import com.aspose.cells.SaveFormat;
import com.aspose.cells.Workbook;
public class ClsAsposeCells {
public class MyTask implements Runnable
{
private String srcFile;
private String dstFile;
public MyTask(String srcFile, String dstFile)
{
this.srcFile = srcFile;
this.dstFile = dstFile;
}
@Override
public void run()
{
try
{
Workbook wb = new Workbook(srcFile);
PdfSaveOptions pdfSaveOpt = new PdfSaveOptions(SaveFormat.PDF);
pdfSaveOpt.setCompliance(PdfCompliance.PDF_A_1_B);
wb.save(dstFile, pdfSaveOpt);
} catch (Exception e)
{
e.printStackTrace(System.err);
}
}
}
public static void main(String[] args) throws Exception {
SetLicense();
f1();
System.out.println("Done");
}
public static void SetLicense() {
String licPath = "F:/Download/Misc/Aspose/Licenses/Aspose.Total.Java.lic";
com.aspose.cells.License lic = new com.aspose.cells.License();
lic.setLicense(licPath);
System.out.println("Aspose.Cells for Java v" + CellsHelper.getVersion());
}
public static void f1() throws Exception {
ClsAsposeCells o = new ClsAsposeCells();
o.R();
}
void R() throws Exception
{
ExecutorService executorService = Executors.newFixedThreadPool(20);
MyTask task1 = new MyTask("F:\\Download\\Test1.xls", "F:\\Download\\Temp\\Test1.pdf");
MyTask task2 = new MyTask("F:\\Download\\Test1_toLandscape.xls", "F:\\Download\\Temp\\Test1_toLandscape.pdf");
executorService.execute(task1);
executorService.execute(task2);
executorService.shutdown();
}
}