Aspose TextStamp - Aspose Java

Hello,

We have a production document that is failing when trying to apply aspose textstamp. We are using Aspose pdf for java 7 version 22.8. Attached the document and below is the error message. It basically is reading form data that is part of the pdf and complaining on that. Is there a way to manually override, to not read the pdf data before applying text stamp?

We tried the same document with newer version and it works fine. However, we are unable to upgrade to the latest version of aspose as the newer aspose jars are too large. We run our code as AWS lambda and they have limitation on how big the jar can be. Aspose jars are consuming 90% of allowed jar limit. We have raised a seperate ticket for that but no resolution has been provided yet.

Issue.pdf (2.0 MB)

ERROR:
[ BlueStampDocument-Lambda :: START ]
[ Lambda-Input :: {document={downstreamprocesses={elasticsearch=false, insertdb=true, textextract=false}, filesource=ECMTEST, objectmetadata={fileuuid=, entereduserid=SoapUI.automated, updateuserid=SoapUI.automated, enteredtimestamp=2023-08-24 12:49:29.796, casedata={caseid={docket={sequence=10508}}}, filepk=tstcase#TSTTC100508, filesk=tsttransaction#TSTTC202110508, filestatus=FA, filing={dt=2022-10-13 12:22:17}, custom={jefis={}, scrims={}}, bstamp={caseid=test, ts=10/15/2021 11:27:04:123 AM, pgcntr=3, totalpgcntr=6}, updatetimestamp=2023-08-24 12:49:29.796, ecmprocessname=commit}, objects3attributes={destinationbucket=njj-ecourts-dev-ecm-ecmtest, filepath=0TST/TST/2021/8, s3filename=334f3b0d-81e4-40e6-81a3-bd0674746156.pdf, stagingbucket=njj-ecourts-dev-ecm-staging}, processingflags={applybluestamp=true, bluestampaccessrestriction=CONFIDENTIAL, bluestamptimestamp=true, centralizedprinting=true, convertdocument=false, convertdocumentfrom=pdf, convertdocumentto=pdf, converteddocuuid=, printindex=1, storeorigandconverted=true}}} ]
[ sourceBucketPath: njj-ecourts-dev-ecm-staging/0TST/TST/2021/8, s3filename :334f3b0d-81e4-40e6-81a3-bd0674746156.pdf]
renamed file name :
[ efiling_status: FA ::: efilingDate:2022-10-13 12:22:17 ::: docketSeqNumber:10508]
bstampts : 10/15/2021 11:27:04:123 AM
filesource is : ECMTEST
Bluestamp docket number : TST-TC-010508-21
[ docketNumber: TST-TC-010508-21]
ConvertDocId:
[ userMetaData-size: 37]
[ downStreamProcesses-key:elasticsearch downStreamProcesses-value:false]
[ downStreamProcesses-key:insertdb downStreamProcesses-value:true]
[ downStreamProcesses-key:textextract downStreamProcesses-value:false]
[ transactionId: TST202210508]
[ Method :: applyBluestamp :: STRAT ]
bstamp-ts : 10/15/2021 11:27:04:123 AM
Flatten : true
Exception in BlueStampDocument :[Ljava.lang.StackTraceElement;@35ef1869Form field not found : Calculated Total Amount Due
class com.aspose.pdf.internal.ms.System.lh: Form field not found : Calculated Total Amount Due
com.aspose.pdf.Form.get_Item(Unknown Source)
com.aspose.pdf.Form.ld(Unknown Source)
com.aspose.pdf.Form.lb(Unknown Source)
com.aspose.pdf.Field.setValue(Unknown Source)
com.aspose.pdf.TextBoxField.setValue(Unknown Source)
com.aspose.pdf.JavascriptAction.lI(Unknown Source)
com.aspose.pdf.ADocument.lj(Unknown Source)
com.aspose.pdf.ADocument.lI(Unknown Source)
com.aspose.pdf.ADocument.l2v(Unknown Source)
com.aspose.pdf.ADocument.flatten(Unknown Source)
com.aspose.pdf.Document.flatten(Unknown Source)
com.aspose.pdf.ADocument.flatten(Unknown Source)
com.aspose.pdf.Document.flatten(Unknown Source)
nj.aoc.ito.ecm.lambda.BlueStampDocument.applyBluestamp(BlueStampDocument.java:536)
nj.aoc.ito.ecm.lambda.BlueStampDocument.handleRequest(BlueStampDocument.java:346)
nj.aoc.ito.ecm.lambda.BlueStampDocument.handleRequest(BlueStampDocument.java:49)
lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:180)
lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:903)
lambdainternal.AWSLambda.startRuntime(AWSLambda.java:355)
lambdainternal.AWSLambda.(AWSLambda.java:72)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:150)
at com.aspose.pdf.Form.get_Item(Unknown Source)
at com.aspose.pdf.Form.ld(Unknown Source)
at com.aspose.pdf.Form.lb(Unknown Source)
at com.aspose.pdf.Field.setValue(Unknown Source)
at com.aspose.pdf.TextBoxField.setValue(Unknown Source)
at com.aspose.pdf.JavascriptAction.lI(Unknown Source)
at com.aspose.pdf.ADocument.lj(Unknown Source)
at com.aspose.pdf.ADocument.lI(Unknown Source)
at com.aspose.pdf.ADocument.l2v(Unknown Source)
at com.aspose.pdf.ADocument.flatten(Unknown Source)
at com.aspose.pdf.Document.flatten(Unknown Source)
at com.aspose.pdf.ADocument.flatten(Unknown Source)
at com.aspose.pdf.Document.flatten(Unknown Source)
at nj.aoc.ito.ecm.lambda.BlueStampDocument.applyBluestamp(BlueStampDocument.java:536)
at nj.aoc.ito.ecm.lambda.BlueStampDocument.handleRequest(BlueStampDocument.java:346)
at nj.aoc.ito.ecm.lambda.BlueStampDocument.handleRequest(BlueStampDocument.java:49)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:180)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:903)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:355)
at lambdainternal.AWSLambda.(AWSLambda.java:72)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:150)
[ Method :: BlueStampDocument :: exception :: [Ljava.lang.StackTraceElement;@130161f7]: java.lang.RuntimeException
java.lang.RuntimeException: [ Method :: BlueStampDocument :: exception :: [Ljava.lang.StackTraceElement;@130161f7]
at nj.aoc.ito.ecm.lambda.BlueStampDocument.handleRequest(BlueStampDocument.java:466)
at nj.aoc.ito.ecm.lambda.BlueStampDocument.handleRequest(BlueStampDocument.java:49)
END RequestId: 18933295-f5f5-432d-a6d3-43d229bf8860
REPORT RequestId: 18933295-f5f5-432d-a6d3-43d229bf8860 Duration: 1204.10 ms Billed Duration: 1205 ms Memory Size: 4096 MB Max Memory Used: 271 MB

@judiciary

We are afraid that we cannot assist in this case as the issue is not occurring with the latest version. The support is provided on the basis of the latest available version because we cannot and do not fix any issues in the older versions. In fact, issues in the older versions are resolved in higher and latest version of the API. Furthermore, we assure you that your other ticket (related to the JAR size) would be resolved also. Can you please share your ticket ID with us here? We will check its status and update you.

Hello, Thank you for your response. We are just asking if there is any additional property that we can set to skip this validation by aspose when applying bluestamp. We understand and we are expecting any changes to be made to older version of aspose. This solution is to address the production problems until we are able to use the latest version of aspose.

Ticket related to aspose jar size. We have multiple issues at this point which are waiting on the reduced jar size. If this can be addressed quickly it will be much appreciated.

Thanks,
B

@judiciary

We are afraid that we cannot suggest any workaround to skip the validation an older version of the API is doing at your end.

Furthermore, we checked that JAR size related ticket is logged for Aspose.Words only. You did not report it for Aspose.PDF. Can you please share the JAR size that you expect OR that suits your needs? We will log an investigation ticket and share the ID with you.

We are expecting the jar size to be less than 50 MB at least for aspose PDF with java

@judiciary

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43086

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.