Hi ,
We are working on a pdf templates where in we are replacing the placeholders with the database value.
Do you have any updates on the above query. As we are in the important phase of our project, It would be very helpful if you could help us on the above.
We found that the above issue resolution is available in Aspose pdf .NET
Hi Srinivas,
Could you please share some example code that will help us?
TextReplaceOptions textReplaceOptions=new TextReplaceOptions(ReplaceAdjustment.WholeWordsHyphenation,Scope.REPLACE_FIRST);
We found that the above issue resolution is available in Aspose pdf .NET
textFragmentAbsorber.TextReplaceOptions.ReplaceAdjustmentAction = TextReplaceOptions.ReplaceAdjustment.WholeWordsHyphenation
Currently we were not able to find the Replace adjustment action is not available in the version Aspose pdf java 9.3.0
Please let us know which Aspose-Java version would have the above funtionality and also share us the link from which we could download the latest jar.
Hi Srinivas,
Thanks for contacting support.
The feature to replace text and re-arrange page contents in order to avoid extra space or content overlapping issue was logged as PDFNEWNET-29860 and is implemented in Aspose.Pdf for .NET 9.6.0. See Text Replacement should Automatically Re-arrange Page Contents section over this [blog post]https://blog.aspose.com/2014/09/18/change-page-orientation-single-resultant-html-with-all-resources-rearrange-page-contents-after-text-replace-and-much-more-with-aspose.pdf-for-.net-9.6.0)
. However, in order to support similar feature in Aspose.Pdf for Java, we have logged this requirement as PDFNEWJAVA-34490 in our issue tracking system. We will further look into the details of this requirement and will keep you posted on the status of correction. Please be patient and spare us little time.
Any ETA on when this will be available for JAVA ? Approximate date?
srinivas.dasari@citi.com:Could you please share some example code that will help us?
Hi Srinivas,srinivas.dasari@citi.com:Any ETA on when this will be available for JAVA ? Approximate date?
srinivas.dasari@citi.com:Could you please share some example code that will help us?
// open document
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(myDir
+ "Lorem_lpsum.pdf");
// create TextAbsorber object to find all instances of the input search
// phrase
com.aspose.pdf.TextFragmentAbsorber textFragmentAbsorber = new com.aspose.pdf.TextFragmentAbsorber(
"popularised");
// accept the absorber for first page of document
pdfDocument.getPages().accept(textFragmentAbsorber);
// get the extracted text fragments into collection
com.aspose.pdf.TextFragmentCollection textFragmentCollection = textFragmentAbsorber
.getTextFragments();
// get first occurrence of text and replace
com.aspose.pdf.TextFragment textFragment = textFragmentCollection
.get_Item(1);
// update text and other properties
textFragment.setText("XXX");
// save updated PDF file
pdfDocument.save(myDir + "Text_Updated.pdf");
We are sorry for the inconvenience caused.
Best Regards,
We are attaching the sample template that you use and share us the generated output pdf. Please find the placeholder and their corresponding values to be replaced.
Hi Srinivas,
The issues you have found earlier (filed as PDFNEWJAVA-34491) have been fixed in Aspose.Pdf for Java 9.7.1.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(2)
The issues you have found earlier (filed as PDFNEWJAVA-34490) have been fixed in Aspose.Pdf for Java 10.2.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)