Class JsPdf
- java.lang.Object
-
- org.uberfire.ext.editor.commons.client.file.exports.jso.JsPdf
-
-
Constructor Summary
Constructors Constructor Description JsPdf(JsPdfSettings settings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImage(String imgData, String imgType, int x, int y, int width, int height)Adds an image to the document.static JsPdfcreate(JsPdfSettings settings)Factory method for JsPdf.voidsave(String fileName)Saves the document into a PDF file.voidtext(String text, int x, int y)Adds text to the document.
-
-
-
Constructor Detail
-
JsPdf
@JsConstructor public JsPdf(JsPdfSettings settings)
-
-
Method Detail
-
create
@JsOverlay public static final JsPdf create(JsPdfSettings settings)
Factory method for JsPdf.- Parameters:
settings- The settings for the new document's.- Returns:
- A new JsPdf instance.
-
text
public void text(String text, int x, int y)
Adds text to the document.- Parameters:
text- The text to add.x- Coordinate (in units declared at inception of PDF document) against left edge of the page.y- Coordinate (in units declared at inception of PDF document) against upper edge of the page.
-
addImage
public void addImage(String imgData, String imgType, int x, int y, int width, int height)
Adds an image to the document.- Parameters:
imgData- The url data for the image.x- Coordinate (in units declared at inception of PDF document) against left edge of the page.y- Coordinate (in units declared at inception of PDF document) against upper edge of the page.width- The image's width.height- The image's height.
-
save
public void save(String fileName)
Saves the document into a PDF file.- Parameters:
fileName- The name for the generated file.
-
-