I am using trial version of Aspose and now I got two queries before purchasing it. Please help me out on these:
1: I want to convert word styles to pdf bookmarks. Is it possible with this API?
2: Word’s track changes are ignored by Aspose.word while converting document from word doc to PDF. Is this feature available in this API?
chandanluthra:
1: I want to convert word styles to pdf bookmarks. Is it possible with this API?
Document doc = new Document(getMyDir() + "Rendering.doc");
PdfSaveOptions options = new PdfSaveOptions();
options.setHeadingsOutlineLevels(3);
options.setExpandedOutlineLevels(1);
doc.save(getMyDir() + "Rendering.SaveToPdfWithOutline Out.pdf", options);
chandanluthra:
2: Word's track changes are ignored by Aspose.word while converting document from word doc to PDF. Is this feature available in this API?
Here are few more queries regarding this thread.
- Can I convert custom styles to PDF bookmarks?
- If I set outline level of custom style (like Subsection) with same level as of heading then does it get converted to bookmark in PDF with code snippet mentioned by you?
- Also, when I use the code snippet mentioned in your previous post, I saw weird behavior with headings. I set <span style=“font-size:
10.0pt;font-family:“Courier New”;mso-no-proof:yes”>options.setHeadingsOutlineLevels(1) and instead of heading(which has level 1), other style with level 1 gets bookmarked in PDF.
Help me out on this and let me know if I am making any mistake.
The following code example insert bookmark at each Paragraph (with custom style) and export individual bookmark with outline level in PDF file. Hope this helps you. Please let us know if you have any more queries.
// Use a blank document
Document doc = new Document();
//Add custom style
Style style = doc.getStyles().add(StyleType.PARAGRAPH, "CustomStyle");
style.getFont().setUnderline(Underline.SINGLE);
style.getFont().setSize(20);
// Create a document builder to insert content with into document.
DocumentBuilder builder = new DocumentBuilder(doc);
builder.getParagraphFormat().setStyle(style);
builder.writeln("Text 1");
builder.writeln("Text 2");
builder.writeln("Text 3");
builder.writeln("Text 4");
int i = 1;
PdfSaveOptions options = new PdfSaveOptions();
for (Paragraph para : (Iterable<Paragraph>)doc.getChildNodes(NodeType.PARAGRAPH, true))
{
//Add bookmarks for custom styles
if (para.getParagraphFormat().getStyle().getName().equals("CustomStyle"))
{
builder.moveTo(para);
builder.startBookmark("BM_" + i);
builder.endBookmark("BM_" + i);
options.getOutlineOptions().getBookmarksOutlineLevels().add("BM_" + i, i);
i++;
}
}
options.getOutlineOptions().setExpandedOutlineLevels(3);
doc.save(MyDir + "Out.pdf", options);
Hi Tahir,
Thanks a ton for support.
Now, I am want that track changes of word also gets reflected in PDF file. You told me that it in not possible now with Aspose. You also told me that an issue WORDSNET-2120 is logged for this feature.
So, could you please let me know, till when can I expect the that issue WORDSNET-2120 would resolved and track changes feature would be available for use?
–
Chandan
Will this feature would also be available for Java API?
The issues you have found earlier (filed as WORDSNET-2120) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
Hi Tahir/Aspose Team,
Its really good to know that Word track changes is now supported by the latest version of Aspose.Word.
However, I downloaded the latest API and try to see if it fits with my criteria but I went in to the problems. The trial version only converts only few pages of the Word to PDF. In my case, word documents (that I want to convert) contains more than 200 pages. And I want to see whether whole document gets converted into PDF and EXACTLY with same number of pages as in word doc.
This is because one of our client reported this issue with the existing solution therefore we are now looking out for a better solution and Aspose.Word seems to be a feasible solution as it supports “Track Changes” also.
Please (if possible) provide me license(a trial version) that converts full word document to PDF.
Thanks,
Chandan