Portfolio funtionality on Linux

Hi Tilal,


Has this issue been fixed? We are facing a similar problem in Aspose PDF for Java 4.5 for PDFPortfolio functionality. It works as expected when we run it in Windows environment. However, when we deploy the same code in Ubuntu Linux 10.04, null pointer exception is thrown at doc.save() line. Appreciate your response.

Thank you,
Ashok

Code snippet attached below for reference:

com.aspose.pdf.Document doc = new com.aspose.pdf.Document();
doc.setCollection(new com.aspose.pdf.Collection());
String fileName="";
String out_file="";
try {
for (int i=0; i<key.size();i++)
{
fileName = dir_name + “rmp_fellows_” + i + “.pdf”;
ReadPdfFromUrl(key.get(i), fileName);
File f = new File(fileName);
System.out.println(“f.exists() - " + f.exists());
com.aspose.pdf.FileSpecification pdf = new com.aspose.pdf.FileSpecification(fileName);
pdf.setDescription(“Pdf File”+i);
doc.getCollection().add(pdf);
}
out_file = new java.util.Date().getTime()+ “.pdf”;
System.out.println(”# of pages :" + doc.getPages().size());

doc.save(out_dir_name+out_file);
System.out.println("Portfolio saved in " + out_file);


Exception:
java.lang.NullPointerException
at com.aspose.g.h.a(Unknown Source)
at com.aspose.pdf.ADocument.preSave(Unknown Source)
at com.aspose.pdf.ADocument.saveInternal(Unknown Source)
at com.aspose.pdf.Document.saveInternal(Unknown Source)
at com.aspose.pdf.ADocument.save(Unknown Source)
at com.aspose.pdf.Document.save(Unknown Source)
at org.ieee.pdfportfolio.PDFPortfolioResource.getKeys(PDFPortfolioResource.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)


Hi Ashok,


Thanks for your inquiry. We are looking into the issue and will get back to you soon.

Best Regards,

Hi Tilal,


Any update on this issue?

Regards,
Ashok

Hi Ashok,


We are sorry for the inconvenience caused. I am afraid I am unable to notice the exception, However, I am looking into issue on another machine and will update you shortly.

Best Regards,

Hi Tilal,


It is important that we have a resolution on this asap. Please provide an update. If you are unable to reproduce the issue, please share the Linux OS version that it works for you.

Thanks,
Ashok

Hi Ashok,


Sorry for the delayed response.

We are working on replicating this issue over another instance of Ubuntu Linux and will share our findings shortly.

Hi Ashok,


We are truly sorry for inconvenience. We have tested the scenario on following Ubuntu versions without any exception. Can you please confirm whether you are getting issue with all PDF documents or with some specific documents? We will appreciate if you please share a sample project along with sample documents, so we will try to replicate the issue at our end. I am afraid we can not suggest you anything without replicating the issue at our end.

Ubuntu 13.10 (64 bit) Server
Ubuntu 11.04 (32 bit) Desktop

Best Regards,