Hello, I’m running a test on the ExtractContent example shown here.
I’m using PHP with JavaBridge and Aspose Words for Java. I’m using the attached document: RFPSampleAspose.docx (452.0 KB)
Notice it has one bookmark, TestBookmark1. The bookmark start and end contain the contents one table cell in the included table.
I want to extract the content contained by the bookmark, and convert it to HTML format.
$b=$doc->getRange()->getBookmarks()->get("TestBookmark1");
$asposeCommon=new Java("AsposeWordsCommon"); // I compiled this directly from the example
$contentArray=$asposeCommon->extractContent($b->getBookmarkStart(),$b->getBookmarkEnd(),true);
$genDoc=$asposeCommon->generateDocument($doc,$contentArray);
echo "extractcontents of " . $b->getName() . ":" . $genDoc->toString($saveFormat->HTML);
However the content of that’s displayed seems to include the last two rows of the table, far away from the named bookmark.
Can you help me understand if I’m doing something wrong? Thank you.