es.caib.ibkey.bpm.pdf.helper
Class PDFAFromImageGeneratorHelper
java.lang.Object
es.caib.ibkey.bpm.pdf.helper.PDFAGeneratorHelper
es.caib.ibkey.bpm.pdf.helper.PDFAFromImageGeneratorHelper
public class PDFAFromImageGeneratorHelper
- extends PDFAGeneratorHelper
Classe per generar PDF/A a partir d'imatges.
- Author:
- u91940
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
imageBytes
protected byte[] imageBytes
scaleImageToFitPage
protected boolean scaleImageToFitPage
pageSize
protected com.lowagie.text.Rectangle pageSize
rotateWhenWidthGreaterThanHeight
protected boolean rotateWhenWidthGreaterThanHeight
topMargin
protected float topMargin
leftMargin
protected float leftMargin
bottomMargin
protected float bottomMargin
rightMargin
protected float rightMargin
PDFAFromImageGeneratorHelper
public PDFAFromImageGeneratorHelper(byte[] imageBytes)
throws ConversionException
- Genera un PDF i hi incrusta una imatge.
- Parameters:
imageBytes -
- Throws:
ConversionException
getTopMargin
public float getTopMargin()
- Returns:
- the topMargin
setTopMargin
public void setTopMargin(float topMargin)
- Parameters:
topMargin - the topMargin to set
getLeftMargin
public float getLeftMargin()
- Returns:
- the leftMargin
setLeftMargin
public void setLeftMargin(float leftMargin)
- Parameters:
leftMargin - the leftMargin to set
getBottomMargin
public float getBottomMargin()
- Returns:
- the bottomMargin
setBottomMargin
public void setBottomMargin(float bottomMargin)
- Parameters:
bottomMargin - the bottomMargin to set
getRightMargin
public float getRightMargin()
- Returns:
- the rightMargin
setRightMargin
public void setRightMargin(float rightMargin)
- Parameters:
rightMargin - the rightMargin to set
setScaleImageToFitPage
public void setScaleImageToFitPage(boolean scaleImageToFitPage)
setPageSize
public void setPageSize(com.lowagie.text.Rectangle pageSize)
setRotateWhenWidthGreaterThanHeight
public void setRotateWhenWidthGreaterThanHeight(boolean rotateWhenWidthGreaterThanHeight)
customizeContent
protected void customizeContent(com.lowagie.text.Document doc,
com.lowagie.text.pdf.PdfWriter writer)
throws ConversionException
- Specified by:
customizeContent in class PDFAGeneratorHelper
- Throws:
ConversionException
scaleImageToFitPage
protected void scaleImageToFitPage(com.lowagie.text.Image image,
com.lowagie.text.Rectangle pageSize2)
pageSizeFromImage
protected com.lowagie.text.Rectangle pageSizeFromImage(float height,
float width,
boolean verticalOrientation,
boolean rotateWhenWidthGreaterThanHeight)
readBytes
protected static void readBytes(java.io.FileInputStream in,
java.io.ByteArrayOutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
getDocumentPageSize
public com.lowagie.text.Rectangle getDocumentPageSize()
- Specified by:
getDocumentPageSize in class PDFAGeneratorHelper
main
public static void main(java.lang.String[] args)
Copyright © 2012 Direcció General de Tecnologia i Comunicacions. Govern de les Illes Balears. All Rights Reserved.