BUG [3104044] - Fix NPE in PrintService
see: https://sourceforge.net/tracker/?func=detail&aid=3104044&group_id=176962&atid=879332 Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3104044
This commit is contained in:
parent
efd0b768fd
commit
934462de8e
|
@ -365,16 +365,23 @@ public class CPaper extends Paper
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
// Print Media size
|
// Print Media size
|
||||||
//AA Goodwill : Custom Paper Support
|
//AA Goodwill : Custom Paper Support
|
||||||
if (m_mediaSize != null){
|
if (m_mediaSize != null && m_mediaSize.getMediaSizeName() != null)
|
||||||
sb.append(m_mediaSize.getMediaSizeName());
|
{
|
||||||
|
|
||||||
// Print dimension
|
// Print dimension
|
||||||
|
sb.append(m_mediaSize.getMediaSizeName());
|
||||||
String name = m_mediaSize.getMediaSizeName().toString();
|
String name = m_mediaSize.getMediaSizeName().toString();
|
||||||
|
|
||||||
|
if(name != null)
|
||||||
|
{
|
||||||
if (!name.startsWith("iso"))
|
if (!name.startsWith("iso"))
|
||||||
sb.append(" - ").append(m_mediaSize.toString(MediaSize.INCH,"\""))
|
sb.append(" - ").append(m_mediaSize.toString(MediaSize.INCH,"\""))
|
||||||
.append(" (").append(getMediaPrintableArea().toString(MediaPrintableArea.INCH,"\""));
|
.append(" (").append(getMediaPrintableArea().toString(MediaPrintableArea.INCH,"\""));
|
||||||
if (!name.startsWith("na"))
|
if (!name.startsWith("na"))
|
||||||
sb.append(" - ").append(m_mediaSize.toString(MediaSize.MM,"mm"))
|
sb.append(" - ").append(m_mediaSize.toString(MediaSize.MM,"mm"))
|
||||||
.append(" (").append(getMediaPrintableArea().toString(MediaPrintableArea.MM,"mm"));
|
.append(" (").append(getMediaPrintableArea().toString(MediaPrintableArea.MM,"mm"));
|
||||||
|
}
|
||||||
|
|
||||||
// Print Orientation
|
// Print Orientation
|
||||||
sb.append(") - ")
|
sb.append(") - ")
|
||||||
.append(Msg.getMsg(ctx, m_landscape ? "Landscape" : "Portrait"));
|
.append(Msg.getMsg(ctx, m_landscape ? "Landscape" : "Portrait"));
|
||||||
|
|
Loading…
Reference in New Issue