IDEMPIERE-4683 : Report : missing logo for PDF output (#562)
This commit is contained in:
parent
ddd1c40eb2
commit
91fb2dacb9
|
@ -83,6 +83,8 @@ public final class Adempiere
|
||||||
/** 48*15 Product Image. */
|
/** 48*15 Product Image. */
|
||||||
static private final String s_file48x15 = "images/iDempiere.png";
|
static private final String s_file48x15 = "images/iDempiere.png";
|
||||||
static private final String s_file48x15HR = "images/iDempiereHR.png";
|
static private final String s_file48x15HR = "images/iDempiereHR.png";
|
||||||
|
/** Header Logo */
|
||||||
|
static private final String s_fileHeaderLogo= "images/header-logo.png";
|
||||||
/** Support Email */
|
/** Support Email */
|
||||||
static private String s_supportEmail = "";
|
static private String s_supportEmail = "";
|
||||||
|
|
||||||
|
@ -99,6 +101,7 @@ public final class Adempiere
|
||||||
static private Image s_imageLogo;
|
static private Image s_imageLogo;
|
||||||
static private ImageIcon s_imageIcon32;
|
static private ImageIcon s_imageIcon32;
|
||||||
static private ImageIcon s_imageIconLogo;
|
static private ImageIcon s_imageIconLogo;
|
||||||
|
static private Image s_headerLogo;
|
||||||
|
|
||||||
static private final String ONLINE_HELP_URL = "http://wiki.idempiere.org";
|
static private final String ONLINE_HELP_URL = "http://wiki.idempiere.org";
|
||||||
|
|
||||||
|
@ -393,6 +396,20 @@ public final class Adempiere
|
||||||
return s_image48x15;
|
return s_image48x15;
|
||||||
} // getImageLogoSmall
|
} // getImageLogoSmall
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Header logo
|
||||||
|
* @return Image
|
||||||
|
*/
|
||||||
|
public static Image getHeaderLogo() {
|
||||||
|
if (s_headerLogo == null) {
|
||||||
|
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||||
|
URL url = Core.getResourceFinder().getResource(s_fileHeaderLogo);
|
||||||
|
if (url != null)
|
||||||
|
s_headerLogo = tk.getImage(url);
|
||||||
|
}
|
||||||
|
return s_headerLogo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Logo Image.
|
* Get Logo Image.
|
||||||
* @return Image Logo
|
* @return Image Logo
|
||||||
|
|
|
@ -948,7 +948,7 @@ public class LayoutEngine implements Pageable, Printable, Doc
|
||||||
if (ci.getLogoReport_ID() > 0) {
|
if (ci.getLogoReport_ID() > 0) {
|
||||||
element = new ImageElement(ci.getLogoReport_ID(), false);
|
element = new ImageElement(ci.getLogoReport_ID(), false);
|
||||||
} else {
|
} else {
|
||||||
element = new ImageElement(org.compiere.Adempiere.getImageLogoSmall(true)); // 48x15
|
element = new ImageElement(org.compiere.Adempiere.getHeaderLogo());
|
||||||
}
|
}
|
||||||
// element = new ImageElement(org.compiere.Adempiere.getImageLogo()); // 100x30
|
// element = new ImageElement(org.compiere.Adempiere.getImageLogo()); // 100x30
|
||||||
element.layout(48, 15, false, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft);
|
element.layout(48, 15, false, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft);
|
||||||
|
|
Loading…
Reference in New Issue