Style Intelligence v12.0

inetsoft.report.pdf
Class PDF3Printer

java.lang.Object
  extended by java.awt.Graphics
      extended by java.awt.Graphics2D
          extended by inetsoft.report.PDFPrinter
              extended by inetsoft.report.pdf.PDF3Printer
All Implemented Interfaces:
inetsoft.report.internal.CustomGraphics, PDFDevice, PrintGraphics, Serializable, Cloneable
Direct Known Subclasses:
PDF4Printer

public class PDF3Printer
extends PDFPrinter

PDF3Printer implements the full PDF file format, including font embedding. It has the same API as the regular PDFPrinter. It should not be used directly to generate a PDF. Use PDF3Generator.getPDFGenerator() and generate a PDF from the generator.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class inetsoft.report.PDFPrinter
PDFPrinter.CountWriter, PDFPrinter.ImageInfoCache, PDFPrinter.PDFWriter, PDFPrinter.RadioButtonGroup, PDFPrinter.StructurePart
 
Field Summary
 
Fields inherited from class inetsoft.report.PDFPrinter
afm, annots, annotsIds, charname, charRanges, fm, fnList, fnObj, fontFn, fontmap, fontObj, insetx, others, outlines, pageheight, pageIds, pagewidth, pg, psFontName, RESOLUTION
 
Fields inherited from interface inetsoft.report.internal.CustomGraphics
G_DASH_LINE, JPEG_EXPORT
 
Constructor Summary
PDF3Printer()
          Create an empty PDF3Printer.
PDF3Printer(OutputStream out)
          Create a PDF3Printer to the specified output.
 
Method Summary
 void addBookmark(inetsoft.report.pdf.Node node)
          Add bookmark.
 void close()
          Close the pdf output stream.
 char[] drawString(String str, double sx, double sy)
          Draw string with double coordinate values.
protected  String emitFont(Font font)
          Send the set font command to output.
protected  void emitFont2(Font font)
          Send the set font command to output.
protected  String getEmitFontName(inetsoft.report.pdf.FontInfo finfo, Font font)
          Get the font name used to emit font descriptor.
 String getFontName(Font font)
          Get the PDF font name.
 String[] getFullyEmbeddedFonts()
          Gets the names of the fonts that should be fully embedded.
protected  String getPSName(String name, Font font)
           
protected  String getRegularFontName(String fname)
          Remove the pending style string from font name, such as Bold, Italic.
 boolean isBase14Only()
          Check whether to use base14 fonts only.
 boolean isEmbedFont()
          Check whether to embed fonts in PDF.
 void setBase14Only(boolean base14)
          Set whether to use base14 fonts only.
 void setEmbedFont(boolean embed)
          Set whether to embed fonts in PDF.
 void setFullyEmbeddedFonts(String[] fullyEmbeddedFonts)
          Sets the names of the fonts that should be fully embedded.
protected  float stringWidth(String str)
          Return the string width.
 
Methods inherited from class inetsoft.report.PDFPrinter
addAnnotation, addField, addLink, addObject, addObject, addRenderingHints, checkTextObj, clearRect, clearRect, clip, clipRect, clipRect, clone, containsArabicCombinCharacter, copyArea, create, create, debug, dispose, doImage, doImage, draw, draw3DRect, draw3DRect, drawArc, drawArc, drawBytes, drawChars, drawGlyphVector, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawLine, drawOval, drawOval, drawPolygon, drawPolygon, drawPolyline, drawPolyline, drawRect, drawRect, drawRenderableImage, drawRenderedImage, drawRoundRect, drawRoundRect, drawString, drawString, drawString, drawString, emit, emitClip, emitcm, emitImage, emitImage, emitTj, endArtifact, endFigure, endHeading, endParagraph, endTable, endTableCell, endTableHeader, fill, fill3DRect, fill3DRect, fillArc, fillArc, fillOval, fillOval, fillPolygon, fillPolygon, fillRect, fillRect, fillRoundRect, fillRoundRect, getBackground, getBaseFontName, getClip, getClipBounds, getColor, getComposite, getDeviceConfiguration, getDocumentInfo, getEncryptInfo, getFont, getFontMetrics, getFontMetrics, getFontRenderContext, getNaturalLanguage, getNextFontIndex, getNextObjectID, getNextPatternID, getOutputSize, getPageSize, getPaint, getPDFVersion, getPrinterJob, getPrintJob, getPSFontNameWithInsetx, getRenderingHint, getRenderingHints, getReportLocale, getStroke, getTextString, getTextString, getTextString, getTransform, grestore, gsave, hit, isAccessible, isAsciiOnly, isBase14Font, isCompressImage, isCompressText, isCurrentCJKFont, isEncrypted, isInsetxNeeded, isMapSymbols, isOpenBookmark, isOpenThumbnail, isPrintScaling, isSupported, isWideCharString, putFontName, rotate, rotate, scale, setAccessible, setAsciiOnly, setBackground, setClip, setClip, setClip, setColor, setComposite, setCompressImage, setCompressText, setDocumentInfo, setEncryptInfo, setFont, setLineWidth, setMac, setMapSymbols, setOpenBookmark, setOpenThumbnail, setOrientation, setOutput, setPageSize, setPageSize, setPaint, setPaintMode, setPrinterJob, setPrintScaling, setRenderingHint, setRenderingHints, setReportLocale, setStroke, setStructurePart, setTransform, setXORMode, shear, splitWords, startArtifact, startDoc, startFigure, startHeading, startPage, startParagraph, startTable, startTableCell, startTableHeader, startTableRow, toString, transform, transformRect, transformX, transformY, translate, translate, updateCharacterSet, writeAdditionalResources, writeAnnotations, writeEncoding, writeGradientPaint, writeOthers, writePattern, writePatternResources
 
Methods inherited from class java.awt.Graphics
finalize, getClipBounds, getClipRect, hitClip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PDF3Printer

public PDF3Printer()
Create an empty PDF3Printer. The setOutput() and startDoc() must be called before the PDF3Printer can be used.


PDF3Printer

public PDF3Printer(OutputStream out)
Create a PDF3Printer to the specified output.

Method Detail

setBase14Only

public void setBase14Only(boolean base14)
Set whether to use base14 fonts only.

Parameters:
base14 - true to use base14 fonts only.

isBase14Only

public boolean isBase14Only()
Check whether to use base14 fonts only.


setEmbedFont

public void setEmbedFont(boolean embed)
Set whether to embed fonts in PDF.

Parameters:
embed - true to embed fonts.

isEmbedFont

public boolean isEmbedFont()
Check whether to embed fonts in PDF.


setFullyEmbeddedFonts

public void setFullyEmbeddedFonts(String[] fullyEmbeddedFonts)
Sets the names of the fonts that should be fully embedded. All other fonts will only have the subset of those characters used in the PDF embedded.

Parameters:
fullyEmbeddedFonts - the font names.

getFullyEmbeddedFonts

public String[] getFullyEmbeddedFonts()
Gets the names of the fonts that should be fully embedded. All other fonts will only have the subset of those characters used in the PDF embedded.

Returns:
the font names.

getFontName

public String getFontName(Font font)
Get the PDF font name.

Specified by:
getFontName in interface PDFDevice
Overrides:
getFontName in class PDFPrinter
Parameters:
font - font object.
Returns:
pdf font name.

getPSName

protected String getPSName(String name,
                           Font font)

addBookmark

public void addBookmark(inetsoft.report.pdf.Node node)
Add bookmark.


emitFont

protected String emitFont(Font font)
Send the set font command to output.

Overrides:
emitFont in class PDFPrinter

getRegularFontName

protected String getRegularFontName(String fname)
Remove the pending style string from font name, such as Bold, Italic.


stringWidth

protected float stringWidth(String str)
Return the string width.

Overrides:
stringWidth in class PDFPrinter

emitFont2

protected void emitFont2(Font font)
Send the set font command to output.


close

public void close()
Close the pdf output stream. This MUST be called to complete the file.

Specified by:
close in interface PDFDevice
Overrides:
close in class PDFPrinter

drawString

public char[] drawString(String str,
                         double sx,
                         double sy)
Draw string with double coordinate values.

Overrides:
drawString in class PDFPrinter

getEmitFontName

protected String getEmitFontName(inetsoft.report.pdf.FontInfo finfo,
                                 Font font)
Get the font name used to emit font descriptor.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.