Hi Team.,
When i have extract the image from document, the label content was misplaced. Please give solution.
I have attached tested output document.label Misplaced.zip (140.4 KB)
Thank you.,
Hi Team.,
When i have extract the image from document, the label content was misplaced. Please give solution.
I have attached tested output document.label Misplaced.zip (140.4 KB)
Thank you.,
Thanks for your inquiry. You have shared your output document, we will appreciate it if you please share following resources as well. You may ZIP the documents and attach to the post. We will look into these and will guide you accordingly.
Hi @tilal.ahmad,
Thanks for your timely replying.
My input document is Test.zip (2.5 MB)
The resultant output of extracted images having error in label layout misplaced.so I am getting mismatched output images compared with input document.
The resultant output folder isB11_Fig_3.zip (138.4 KB).
How to get exact output images matched with input document.please, kindly provide solution for this.
Thanks & regards,
vadivel
Thanks for sharing your source documents. Please share your sample code here as well. It will help us to replicate and address your issue exactly.
Thanks for your feedback. Sure, I am working on our scenario and will update you as soon as possible.
Thanks for being patient. Please replace generateDocument method in NewAip.java with the following code:
public static Document generateDocument(Document srcDoc, ArrayList nodes) throws Exception
{
Document dstDoc = srcDoc.deepClone();
dstDoc.removeAllChildren();
dstDoc.ensureMinimum();
// Remove the first paragraph from the empty document.
dstDoc.getFirstSection().getBody().removeAllChildren();
// Import each node from the list into the new document. Keep the
// original formatting of the node.
NodeImporter importer = new NodeImporter(srcDoc, dstDoc, ImportFormatMode.KEEP_SOURCE_FORMATTING);
for (Node node : (Iterable<Node>) nodes) {
Node importNode = importer.importNode(node, true);
dstDoc.getFirstSection().getBody().appendChild(importNode);
}
// Return the generated document.
return dstDoc;
}
Hope, this helps.
Best regards,
Thanks your effort hafeez. I will try and update you soon.
Regards.,
S S Vadivel