Hi,
We are facing an issue.while we are trying to merge two pdfs, its throwing an Exception.
code:
MergeDocument document = MergeDocument.merge ( "D:\\InvoicePdf\\4500.pdf","D:\\InvoicePdf\\1018.pdf");
Error that we are getting :
java.lang.ArrayIndexOutOfBoundsException
at com.cete.dynamicpdf.merger.cb.isWhiteSpace(I)Z(Unknown Source)
at com.cete.dynamicpdf.merger.cb.skipWhiteSpace(I)I(Unknown Source)
at com.cete.dynamicpdf.merger.gb.(Lcom.cete.dynamicpdf.merger.t;[BI)V(Unknown Source)
at com.cete.dynamicpdf.merger.x.b(Lcom.cete.dynamicpdf.merger.e;)V(Unknown Source)
at com.cete.dynamicpdf.merger.x.a(Lcom.cete.dynamicpdf.merger.e;I)V(Unknown Source)
at com.cete.dynamicpdf.merger.x.c(Lcom.cete.dynamicpdf.merger.e;)V(Unknown Source)
at com.cete.dynamicpdf.merger.x.(Lcom.cete.dynamicpdf.merger.PdfDocument;Lcom.cete.dynamicpdf.merger.m;)V(Unknown Source)
at com.cete.dynamicpdf.merger.PdfDocument.j()V(Unknown Source)
at com.cete.dynamicpdf.merger.PdfDocument.(Lcom.cete.dynamicpdf.merger.h;Ljava.lang.String;)V(Unknown Source)
at com.cete.dynamicpdf.merger.PdfDocument.(Ljava.lang.String;)V(Unknown Source)
at com.cete.dynamicpdf.merger.MergeDocument.merge(Ljava.lang.String;Ljava.lang.String;)Lcom.cete.dynamicpdf.merger.MergeDocument;(Unknown Source)
at com.hearst.coin.util.MergeDocuments.MergePDF(Ljava.util.ArrayList;Ljava.lang.String;)Ljava.lang.String;(MergeDocuments.java:43)
at com.hearst.coin.util.ConvertMergToPDF.pdfMerging(Ljava.util.ArrayList;Ljava.lang.String;)Ljava.lang.String;(ConvertMergToPDF.java:169)
at com.hearst.coin.util.ConvertMergToPDF.GoToConverMergeToPDF(Ljava.util.ArrayList;Ljava.lang.String;)Ljava.lang.String;(ConvertMergToPDF.java:87)
at com.hearst.coin.web.action.PrintInvoiceAction.takeAction(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Z(PrintInvoiceAction.java:590)
at com.hearst.coin.web.servlets.ControllerServlet.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ControllerServlet.java:219)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6452)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
Thanks,
Priya.
Issue with DynamicPDF Merge.
Re: Issue with DynamicPDF Merge.
Forum member · May 8, 2007As a continuation to my previous post, the jar files I am using is DPDFGen.jar and DPDFMer.jar and I have imported the following in my java file:
import com.cete.dynamicpdf.merger.*;
import com.cete.dynamicpdf.merger.PdfDocument;
import com.cete.dynamicpdf.merger.MergeDocument;
import com.cete.dynamicpdf.merger.forms.*;
import com.cete.dynamicpdf.*;
Re: Issue with DynamicPDF Merge.
Support · May 8, 2007Hello Priya,
Can you please make sure that you are using the latest build jar files. You can download the latest build from the Customer Area
by loggin in using your serial number.
If you still have problem with the latest build product then please send over the PDF documents to our [^a|mailto:support@cete.com|Support Team^] so that they can take a look at it.
Thanks,
ceTe Software Support Team.
Re: Issue with DynamicPDF Merge.
Forum member · May 8, 2007Thanks for the response. Should I make any change in the classpath? We have tried with the latest jar files yesterday.
Re: Issue with DynamicPDF Merge.
Support · May 8, 2007Hello Priya,
It is not required to change the ClassPath. Can you please send over the PDF documents with which you have problem to our [^a|mailto:support@cete.com|Support Team^] so that they can try to find out the cause for the error to occur.
Thanks,
ceTe Software Support Team.
Re: Issue with DynamicPDF Merge.
Forum member · May 10, 2007Hi,
Code:
MergeDocument document = MergeDocument.merge("D:\\Pdfs\\DocumentA.pdf", "D:\\Pdfs\\DocumentB.pdf");
Exception:
java.io.IOException: position: cannot do relative query
Please let me know why I am getting this exception: Am I missing something? I am able to create the pdf document, but not able to merge.
Re: Issue with DynamicPDF Merge.
Support · May 10, 2007Hello,
What version of JDK are you using? Are you using JRockit JDK? Also what version and build of our product are you using?
Thanks,
ceTe Software Support Team.
Re: Issue with DynamicPDF Merge.
Forum member · May 10, 2007Thanks for all the responses.. We have resolved the issue. It was pointing to jrockit which will support native code. Now we are trying to reinstall weblogic and make it point to jdk1.4.