Skip to content

Commit

Permalink
default font name/style/size documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Feb 5, 2024
1 parent 5b80f07 commit ef72a8b
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 7 deletions.
54 changes: 54 additions & 0 deletions docs/html/doc_meta_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,60 @@ <h2 style="font-weight: bold;">Properties for generic metadata</h2>
<td id="cell_9_4" style="width: 5%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>3.2.2</p>
</td>
</tr>
<tr>
<td id="cell_10_0" style="width: 20%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<span id="default-font-name"></span>
<p style="font-style: italic;">default-font-name</p>
</td>
<td id="cell_10_1" style="width: 40%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>Set the default font name</p>
</td>
<td id="cell_10_2" style="width: 25%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>fj-doc-mod-fop(pdf), fj-doc-mod-openpdf-ext(pdf), fj-doc-mod-openrtf-ext(rtf), </p>
</td>
<td id="cell_10_3" style="width: 10%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>helvetica</p>
</td>
<td id="cell_10_4" style="width: 5%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>1.4.5</p>
</td>
</tr>
<tr>
<td id="cell_11_0" style="width: 20%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<span id="default-font-size"></span>
<p style="font-style: italic;">default-font-size</p>
</td>
<td id="cell_11_1" style="width: 40%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>Set the default font size</p>
</td>
<td id="cell_11_2" style="width: 25%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>fj-doc-mod-fop(pdf), fj-doc-mod-openpdf-ext(pdf), fj-doc-mod-openrtf-ext(rtf), </p>
</td>
<td id="cell_11_3" style="width: 10%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>10</p>
</td>
<td id="cell_11_4" style="width: 5%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>1.4.5</p>
</td>
</tr>
<tr>
<td id="cell_12_0" style="width: 20%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<span id="default-font-style"></span>
<p style="font-style: italic;">default-font-style</p>
</td>
<td id="cell_12_1" style="width: 40%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>Set the default font style</p>
</td>
<td id="cell_12_2" style="width: 25%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>fj-doc-mod-fop(pdf), fj-doc-mod-openpdf-ext(pdf), fj-doc-mod-openrtf-ext(rtf), </p>
</td>
<td id="cell_12_3" style="width: 10%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>normal</p>
</td>
<td id="cell_12_4" style="width: 5%; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; padding: 2px;">
<p>1.4.5</p>
</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,22 @@ private GenericConsts() {}
*/
public static final String TABLE_BORDER_COLLAPSE_COLLAPSE = "collapse";

/**
* <a href="https://venusdocs.fugerit.org/docs/html/doc_meta_info.html#default-font-name">See 'default-font-name' documentation.</a>
*/
public static final String DOC_DEFAULT_FONT_NAME = "default-font-name";


/**
* <a href="https://venusdocs.fugerit.org/docs/html/doc_meta_info.html#default-font-size">See 'default-font-size' documentation.</a>
*/
public static final String DOC_DEFAULT_FONT_SIZE = "default-font-size";


/**
* <a href="https://venusdocs.fugerit.org/docs/html/doc_meta_info.html#default-font-style">See 'default-font-style' documentation.</a>
*/
public static final String DOC_DEFAULT_FONT_STYLE = "default-font-style";


}
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,39 @@
<admeta:supportedType>pdf</admeta:supportedType>
<admeta:supportedHandler>fj-doc-mod-fop(pdf)</admeta:supportedHandler>
</admeta:admMetaInfo>
<admeta:admMetaInfo>
<admeta:name>default-font-name</admeta:name>
<admeta:description>Set the default font name</admeta:description>
<admeta:defaultValue>helvetica</admeta:defaultValue>
<admeta:since>1.4.5</admeta:since>
<admeta:supportedType>pdf</admeta:supportedType>
<admeta:supportedType>rtf</admeta:supportedType>
<admeta:supportedHandler>fj-doc-mod-fop(pdf)</admeta:supportedHandler>
<admeta:supportedHandler>fj-doc-mod-openpdf-ext(pdf)</admeta:supportedHandler>
<admeta:supportedHandler>fj-doc-mod-openrtf-ext(rtf)</admeta:supportedHandler>
</admeta:admMetaInfo>
<admeta:admMetaInfo>
<admeta:name>default-font-size</admeta:name>
<admeta:description>Set the default font size</admeta:description>
<admeta:defaultValue>10</admeta:defaultValue>
<admeta:since>1.4.5</admeta:since>
<admeta:supportedType>pdf</admeta:supportedType>
<admeta:supportedType>rtf</admeta:supportedType>
<admeta:supportedHandler>fj-doc-mod-fop(pdf)</admeta:supportedHandler>
<admeta:supportedHandler>fj-doc-mod-openpdf-ext(pdf)</admeta:supportedHandler>
<admeta:supportedHandler>fj-doc-mod-openrtf-ext(rtf)</admeta:supportedHandler>
</admeta:admMetaInfo>
<admeta:admMetaInfo>
<admeta:name>default-font-style</admeta:name>
<admeta:description>Set the default font style</admeta:description>
<admeta:defaultValue>normal</admeta:defaultValue>
<admeta:since>1.4.5</admeta:since>
<admeta:supportedType>pdf</admeta:supportedType>
<admeta:supportedType>rtf</admeta:supportedType>
<admeta:supportedHandler>fj-doc-mod-fop(pdf)</admeta:supportedHandler>
<admeta:supportedHandler>fj-doc-mod-openpdf-ext(pdf)</admeta:supportedHandler>
<admeta:supportedHandler>fj-doc-mod-openrtf-ext(rtf)</admeta:supportedHandler>
</admeta:admMetaInfo>
</admeta:admSection>

<admeta:admSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.fugerit.java.doc.base.model.DocPhrase;
import org.fugerit.java.doc.base.model.DocStyle;
import org.fugerit.java.doc.base.model.DocTable;
import org.fugerit.java.doc.base.typehelper.generic.GenericConsts;
import org.fugerit.java.doc.base.xml.DocModelUtils;

import com.lowagie.text.Anchor;
Expand Down Expand Up @@ -98,10 +99,6 @@ protected static void setStyle( DocStyle parent, DocStyle current ) {
private String docType;

public static final String MODULE = "openpdf-ext";

public static final String DOC_DEFAULT_FONT_NAME = "default-font-name";
public static final String DOC_DEFAULT_FONT_SIZE = "default-font-size";
public static final String DOC_DEFAULT_FONT_STYLE = "default-font-style";

private int totalPageCount;

Expand Down Expand Up @@ -319,9 +316,9 @@ private void handleFooter( DocBase docBase, PdfHelper pdfHelper, OpenPdfHelper d
public void handleDoc(DocBase docBase) throws DocumentException, IOException {
Properties info = docBase.getInfo();

String defaultFontName = info.getProperty( DOC_DEFAULT_FONT_NAME, "helvetica" );
String defaultFontSize = info.getProperty( DOC_DEFAULT_FONT_SIZE, "10" );
String defaultFontStyle = info.getProperty( DOC_DEFAULT_FONT_STYLE, "normal" );
String defaultFontName = info.getProperty( GenericConsts.DOC_DEFAULT_FONT_NAME, "helvetica" );
String defaultFontSize = info.getProperty( GenericConsts.DOC_DEFAULT_FONT_SIZE, "10" );
String defaultFontStyle = info.getProperty( GenericConsts.DOC_DEFAULT_FONT_STYLE, "normal" );
OpenPdfHelper docHelper = new OpenPdfHelper();

if ( this.pdfWriter != null ) {
Expand Down

0 comments on commit ef72a8b

Please sign in to comment.