@@ -1947,9 +1947,10 @@ public static Object[] splitDAelements(String da) {
1947
1947
*/
1948
1948
protected void drawTextAppearance (Rectangle rect , PdfFont font , int fontSize , String value , PdfFormXObject appearance ) {
1949
1949
PdfStream stream = new PdfStream ().makeIndirect (getDocument ());
1950
- PdfCanvas canvas = new PdfCanvas (stream , appearance .getResources (), getDocument ());
1950
+ PdfResources resources = appearance .getResources ();
1951
+ PdfCanvas canvas = new PdfCanvas (stream , resources , getDocument ());
1951
1952
1952
- setDefaultAppearance (generateDefaultAppearanceString (font , fontSize , appearance . getResources () ));
1953
+ setDefaultAppearance (generateDefaultAppearanceString (font , fontSize , resources ));
1953
1954
1954
1955
float height = rect .getHeight ();
1955
1956
float width = rect .getWidth ();
@@ -2004,13 +2005,13 @@ protected void drawTextAppearance(Rectangle rect, PdfFont font, int fontSize, St
2004
2005
*/
2005
2006
protected void drawMultiLineTextAppearance (Rectangle rect , PdfFont font , int fontSize , String value , PdfFormXObject appearance ) {
2006
2007
PdfStream stream = new PdfStream ().makeIndirect (getDocument ());
2007
- PdfCanvas canvas = new PdfCanvas (stream , new PdfResources (), getDocument ());
2008
+ PdfResources resources = appearance .getResources ();
2009
+ PdfCanvas canvas = new PdfCanvas (stream , resources , getDocument ());
2008
2010
2009
- setDefaultAppearance (generateDefaultAppearanceString (font , fontSize , appearance . getResources () ));
2011
+ setDefaultAppearance (generateDefaultAppearanceString (font , fontSize , resources ));
2010
2012
2011
2013
float width = rect .getWidth ();
2012
2014
float height = rect .getHeight ();
2013
- //PdfFormXObject xObject = new PdfFormXObject(new Rectangle(0, 0, width, height));
2014
2015
2015
2016
List <String > strings = font .splitString (value , fontSize , width - 6 );
2016
2017
0 commit comments