public interface IBibliographyStylesProvider
Example:
public void changeBibliographyStyles() throws Exception
{
Document doc = new Document(getMyDir() + "Bibliography.docx");
doc.getFieldOptions().setBibliographyStylesProvider(new BibliographyStylesProvider());
doc.updateFields();
doc.save(getArtifactsDir() + "Field.ChangeBibliographyStyles.docx");
}
public static class BibliographyStylesProvider implements IBibliographyStylesProvider
{
public FileInputStream getStyle(String styleFileName) throws Exception
{
return new FileInputStream(getMyDir() + "Bibliography custom style.xsl");
}
}
| Method Summary | ||
|---|---|---|
abstract System.IO.Stream | getStyle(java.lang.String styleFileName) | |
| Returns bibliography style. | ||
| Method Detail |
|---|
getStyle | |
public abstract System.IO.Stream getStyle(java.lang.String styleFileName)
throws java.lang.Exception | |
null to indicate that
the MS Word version of specified style should be used.
styleFileName - The bibliography style file name.Example:
Shows how to override built-in styles or provide custom one.
public void changeBibliographyStyles() throws Exception
{
Document doc = new Document(getMyDir() + "Bibliography.docx");
doc.getFieldOptions().setBibliographyStylesProvider(new BibliographyStylesProvider());
doc.updateFields();
doc.save(getArtifactsDir() + "Field.ChangeBibliographyStyles.docx");
}
public static class BibliographyStylesProvider implements IBibliographyStylesProvider
{
public FileInputStream getStyle(String styleFileName) throws Exception
{
return new FileInputStream(getMyDir() + "Bibliography custom style.xsl");
}
}