Style Intelligence v12.0

inetsoft.report.pdf
Class PDF4Printer

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

public class PDF4Printer
extends PDF3Printer

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.

PDF4Printer generates PDF files confirming to the PDF 1.3 (Acrobat 4.0) specification. It supports CJK fonts using the Acrobat 4.0 Asian language support pack.

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
PDF4Printer()
          Create an empty PDF4Printer.
PDF4Printer(OutputStream out)
          Create a PDF4Printer to the specified output.
 
Method Summary
 void close()
          Close the pdf output stream.
protected  String emitFont(Font font)
          Send the set font command to output.
protected  void emitTj(String txt)
          Output the Tj command.
 String getFontName(Font font)
          Get the PDF font name.
 String getPDFVersion()
          Return the PDF version of the documents generated by this class.
protected  String getPSName(String name, Font font)
          Format font name.
protected  boolean isCurrentCJKFont()
          Check if current using font is CJK font.
 boolean isEmbedCMap()
          Check whether to embed cmaps in PDF.
 void setEmbedCMap(boolean embed)
          Set whether to embed cmaps in PDF.
protected  float stringWidth(String str)
          Return the string width.
protected  void updateCharacterSet(String s)
          Updates the set of characters used for the current font to include the characters of the specified string.
 
Methods inherited from class inetsoft.report.pdf.PDF3Printer
addBookmark, drawString, emitFont2, getEmitFontName, getFullyEmbeddedFonts, getRegularFontName, isBase14Only, isEmbedFont, setBase14Only, setEmbedFont, setFullyEmbeddedFonts
 
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, 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, getPrinterJob, getPrintJob, getPSFontNameWithInsetx, getRenderingHint, getRenderingHints, getReportLocale, getStroke, getTextString, getTextString, getTextString, getTransform, grestore, gsave, hit, isAccessible, isAsciiOnly, isBase14Font, isCompressImage, isCompressText, 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, 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

PDF4Printer

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


PDF4Printer

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

Method Detail

setEmbedCMap

public void setEmbedCMap(boolean embed)
Set whether to embed cmaps in PDF.

Parameters:
embed - true to embed cmaps.

isEmbedCMap

public boolean isEmbedCMap()
Check whether to embed cmaps in PDF.


getFontName

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

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

stringWidth

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

Overrides:
stringWidth in class PDF3Printer

emitFont

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

Overrides:
emitFont in class PDF3Printer

isCurrentCJKFont

protected boolean isCurrentCJKFont()
Check if current using font is CJK font.

Overrides:
isCurrentCJKFont in class PDFPrinter

updateCharacterSet

protected void updateCharacterSet(String s)
Updates the set of characters used for the current font to include the characters of the specified string.

Overrides:
updateCharacterSet in class PDFPrinter
Parameters:
s - the string to add.

emitTj

protected void emitTj(String txt)
Output the Tj command.

Overrides:
emitTj in class PDFPrinter

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 PDF3Printer

getPDFVersion

public String getPDFVersion()
Return the PDF version of the documents generated by this class. Acrobat 3.0 is PDF 1.2, and Acrobat 4.0 is PDF 1.3.

Overrides:
getPDFVersion in class PDFPrinter
Returns:
PDF version number, e.g., "1.2".

getPSName

protected String getPSName(String name,
                           Font font)
Format font name.

Overrides:
getPSName in class PDF3Printer

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