Hi Aspose team,
aspose_bookmarks.zip (5.0 MB)
In the attached zip you can find a sample code that should do the following:
- for bookmark in template find bookmark with the same name in source
- copy all nodes between BookmarkStart and End in source and import it to output document
- Inline first and last paragraph with bookmark in template
- remove bookmark and it’s content from template
All of the above is done, however the output document looks different than the expected one. There are two main points that are my concern:
-
all three merged paragraphs have different font from the ones used in both source and template. This font is coming from Normal style in template (I guess) and paragraphs in source use normal style as well, but with different formatting. The output is unchanged regardless of used ImportFormatMode in NodeImporter. In this case I’d like to have style copied from source and used on imported paragraphs.
-
The middle merged paragraph have also different font size. For paragraphs 1 and 3 I’m merging paragraphs child nodes one by one, and I’d expect the same font size when importing whole paragraph using isImportChildren = true.
Could you please point me in the right direction of how to achieve desired document output?
Thanks,
Mateusz