LibreOffice Module vcl (master)  1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
vcl::PDFWriter Class Reference

#include <pdfwriter.hxx>

Collaboration diagram for vcl::PDFWriter:
[legend]

Classes

struct  AnyWidget
 
struct  CheckBoxWidget
 
struct  ComboBoxWidget
 
struct  EditWidget
 
struct  ExtLineInfo
 
struct  ListBoxWidget
 
struct  PDFDocInfo
 
struct  PDFEncryptionProperties
 
struct  PDFWriterContext
 
struct  PlayMetafileContext
 Play a metafile like an outputdevice would do. More...
 
struct  PushButtonWidget
 
struct  RadioButtonWidget
 
struct  SignatureWidget
 

Public Types

enum  CapType {
  capButt,
  capRound,
  capSquare
}
 
enum  JoinType {
  joinMiter,
  joinRound,
  joinBevel
}
 
enum  Orientation {
  Orientation::Portrait,
  Orientation::Inherit
}
 
enum  PDFVersion {
  PDFVersion::PDF_1_2,
  PDFVersion::PDF_1_3,
  PDFVersion::PDF_1_4,
  PDFVersion::PDF_1_5,
  PDFVersion::PDF_1_6,
  PDFVersion::PDF_A_1,
  PDFVersion::PDF_A_2
}
 
enum  DestAreaType {
  DestAreaType::XYZ,
  DestAreaType::FitRectangle
}
 
enum  StructElement {
  NonStructElement,
  Document,
  Part,
  Article,
  Section,
  Division,
  BlockQuote,
  Caption,
  TOC,
  TOCI,
  Index,
  Paragraph,
  Heading,
  H1,
  H2,
  H3,
  H4,
  H5,
  H6,
  List,
  ListItem,
  LILabel,
  LIBody,
  Table,
  TableRow,
  TableHeader,
  TableData,
  Span,
  Quote,
  Note,
  Reference,
  BibEntry,
  Code,
  Link,
  Figure,
  Formula,
  Form
}
 
enum  StructAttribute {
  Placement,
  WritingMode,
  SpaceBefore,
  SpaceAfter,
  StartIndent,
  EndIndent,
  TextIndent,
  TextAlign,
  Width,
  Height,
  BlockAlign,
  InlineAlign,
  LineHeight,
  BaselineShift,
  TextDecorationType,
  ListNumbering,
  RowSpan,
  ColSpan,
  LinkAnnotation,
  Language
}
 
enum  StructAttributeValue {
  Invalid,
  NONE,
  Block,
  Inline,
  Before,
  After,
  Start,
  End,
  LrTb,
  RlTb,
  TbRl,
  Center,
  Justify,
  Auto,
  Middle,
  Normal,
  Underline,
  Overline,
  LineThrough,
  Disc,
  Circle,
  Square,
  Decimal,
  UpperRoman,
  LowerRoman,
  UpperAlpha,
  LowerAlpha
}
 
enum  PageTransition {
  PageTransition::Regular,
  PageTransition::SplitHorizontalInward,
  PageTransition::SplitHorizontalOutward,
  PageTransition::SplitVerticalInward,
  PageTransition::SplitVerticalOutward,
  PageTransition::BlindsHorizontal,
  PageTransition::BlindsVertical,
  PageTransition::BoxInward,
  PageTransition::BoxOutward,
  PageTransition::WipeLeftToRight,
  PageTransition::WipeBottomToTop,
  PageTransition::WipeRightToLeft,
  PageTransition::WipeTopToBottom,
  PageTransition::Dissolve
}
 
enum  WidgetType {
  PushButton,
  RadioButton,
  CheckBox,
  Edit,
  ListBox,
  ComboBox,
  Hierarchy,
  Signature
}
 
enum  ErrorCode {
  Warning_Transparency_Omitted_PDFA,
  Warning_Transparency_Omitted_PDF13,
  Warning_FormAction_Omitted_PDFA,
  Warning_Transparency_Converted,
  Error_Signature_Failed
}
 
enum  ExportDataFormat {
  HTML,
  XML,
  FDF,
  PDF
}
 
enum  PDFViewerPageMode {
  ModeDefault,
  UseOutlines,
  UseThumbs
}
 
enum  PDFViewerAction {
  ActionDefault,
  FitInWindow,
  FitWidth,
  FitVisible,
  ActionZoom
}
 
enum  PDFPageLayout {
  DefaultLayout,
  SinglePage,
  Continuous,
  ContinuousFacing
}
 
enum  PDFLinkDefaultAction {
  URIAction,
  URIActionDestination,
  LaunchAction
}
 
enum  ColorMode {
  DrawColor,
  DrawGreyscale
}
 

Public Member Functions

 PDFWriter (const PDFWriterContext &rContext, const css::uno::Reference< css::beans::XMaterialHolder > &)
 
 ~PDFWriter ()
 
OutputDeviceGetReferenceDevice ()
 Returns an OutputDevice for formatting This Output device is guaranteed to use the same font metrics as the resulting PDF file. More...
 
void NewPage (double nPageWidth, double nPageHeight, Orientation eOrientation=Orientation::Inherit)
 Creates a new page to fill If width and height are not set the page size is inherited from the page tree other effects: resets the graphics state: MapMode, Font Colors and other state information MUST be set again or are undefined. More...
 
void PlayMetafile (const GDIMetaFile &, const PlayMetafileContext &, vcl::PDFExtOutDevData *pDevDat=nullptr)
 
void SetDocumentLocale (const css::lang::Locale &rDocLocale)
 
bool Emit ()
 
std::set< ErrorCode > const & GetErrors () const
 
void Push (PushFlags nFlags=PushFlags::ALL)
 
void Pop ()
 
void SetClipRegion ()
 
void SetClipRegion (const basegfx::B2DPolyPolygon &rRegion)
 
void MoveClipRegion (long nHorzMove, long nVertMove)
 
void IntersectClipRegion (const tools::Rectangle &rRect)
 
void IntersectClipRegion (const basegfx::B2DPolyPolygon &rRegion)
 
void SetLayoutMode (ComplexTextLayoutFlags nMode)
 
void SetDigitLanguage (LanguageType eLang)
 
void SetLineColor (const Color &rColor)
 
void SetLineColor ()
 
void SetFillColor (const Color &rColor)
 
void SetFillColor ()
 
void SetFont (const vcl::Font &rNewFont)
 
void SetTextColor (const Color &rColor)
 
void SetTextFillColor ()
 
void SetTextFillColor (const Color &rColor)
 
void SetTextLineColor ()
 
void SetTextLineColor (const Color &rColor)
 
void SetOverlineColor ()
 
void SetOverlineColor (const Color &rColor)
 
void SetTextAlign (::TextAlign eAlign)
 
void SetMapMode (const MapMode &rNewMapMode)
 
void DrawText (const Point &rPos, const OUString &rText)
 
void DrawTextLine (const Point &rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline)
 
void DrawTextArray (const Point &rStartPt, const OUString &rStr, const long *pDXAry, sal_Int32 nIndex, sal_Int32 nLen)
 
void DrawStretchText (const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex, sal_Int32 nLen)
 
void DrawText (const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle)
 
void DrawPixel (const Point &rPt, const Color &rColor)
 
void DrawPixel (const Point &rPt)
 
void DrawLine (const Point &rStartPt, const Point &rEndPt)
 
void DrawLine (const Point &rStartPt, const Point &rEndPt, const LineInfo &rLineInfo)
 
void DrawPolyLine (const tools::Polygon &rPoly)
 
void DrawPolyLine (const tools::Polygon &rPoly, const LineInfo &rLineInfo)
 
void DrawPolyLine (const tools::Polygon &rPoly, const ExtLineInfo &rInfo)
 
void DrawPolygon (const tools::Polygon &rPoly)
 
void DrawPolyPolygon (const tools::PolyPolygon &rPolyPoly)
 
void DrawRect (const tools::Rectangle &rRect)
 
void DrawRect (const tools::Rectangle &rRect, sal_uLong nHorzRount, sal_uLong nVertRound)
 
void DrawEllipse (const tools::Rectangle &rRect)
 
void DrawArc (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
void DrawPie (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
void DrawChord (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
void DrawBitmap (const Point &rDestPt, const Size &rDestSize, const Bitmap &rBitmap, const Graphic &rGraphic)
 
void DrawBitmapEx (const Point &rDestPt, const Size &rDestSize, const BitmapEx &rBitmapEx)
 
void DrawGradient (const tools::Rectangle &rRect, const Gradient &rGradient)
 
void DrawGradient (const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)
 
void DrawHatch (const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
 
void DrawWallpaper (const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
 
void DrawTransparent (const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
 
void BeginTransparencyGroup ()
 Start a transparency group. More...
 
void EndTransparencyGroup (const tools::Rectangle &rBoundRect, sal_uInt16 nTransparencePercent)
 End a transparency group with constant transparency factor. More...
 
void DrawJPGBitmap (SvStream &rJPGData, bool bIsTrueColor, const Size &rSrcSizePixel, const tools::Rectangle &rTargetArea, const Bitmap &rMask, const Graphic &rGraphic)
 Insert a JPG encoded image (optionally with mask) More...
 
sal_Int32 CreateNamedDest (const OUString &sDestName, const tools::Rectangle &rRect, sal_Int32 nPageNr, DestAreaType eType)
 Create a new named destination to be used in a link from another PDF document. More...
 
sal_Int32 CreateDest (const tools::Rectangle &rRect, sal_Int32 nPageNr, DestAreaType eType)
 Create a new destination to be used in a link. More...
 
sal_Int32 CreateLink (const tools::Rectangle &rRect, sal_Int32 nPageNr)
 Create a new link on a page. More...
 
sal_Int32 CreateScreen (const tools::Rectangle &rRect, sal_Int32 nPageNr)
 Creates a screen annotation. More...
 
sal_Int32 RegisterDestReference (sal_Int32 nDestId, const tools::Rectangle &rRect, sal_Int32 nPageNr, DestAreaType eType)
 creates a destination which is not intended to be referred to by a link, but by a public destination Id. More...
 
void SetLinkDest (sal_Int32 nLinkId, sal_Int32 nDestId)
 Set the destination for a link will change a URL type link to a dest link if necessary. More...
 
void SetLinkURL (sal_Int32 nLinkId, const OUString &rURL)
 Set the URL for a link will change a dest type link to a URL type link if necessary. More...
 
void SetScreenURL (sal_Int32 nScreenId, const OUString &rURL)
 Sets the URL of a linked screen annotation. More...
 
void SetScreenStream (sal_Int32 nScreenId, const OUString &rURL)
 Sets the URL of an embedded screen annotation. More...
 
void SetLinkPropertyID (sal_Int32 nLinkId, sal_Int32 nPropertyID)
 Resolve link in logical structure. More...
 
sal_Int32 CreateOutlineItem (sal_Int32 nParent, const OUString &rText, sal_Int32 nDestID)
 Create a new outline item. More...
 
void CreateNote (const tools::Rectangle &rRect, const PDFNote &rNote, sal_Int32 nPageNr)
 Create a new note on a page. More...
 
sal_Int32 BeginStructureElement (enum StructElement eType, const OUString &rAlias)
 begin a new logical structure element More...
 
void EndStructureElement ()
 end the current logical structure element More...
 
void SetCurrentStructureElement (sal_Int32 nElement)
 set the current structure element More...
 
void SetStructureAttribute (enum StructAttribute eAttr, enum StructAttributeValue eVal)
 set a structure attribute on the current structural element More...
 
void SetStructureAttributeNumerical (enum StructAttribute eAttr, sal_Int32 nValue)
 set a structure attribute on the current structural element More...
 
void SetStructureBoundingBox (const tools::Rectangle &rRect)
 set the bounding box of a structural element More...
 
void SetActualText (const OUString &rText)
 set the ActualText attribute of a structural element More...
 
void SetAlternateText (const OUString &rText)
 set the Alt attribute of a strutural element More...
 
void SetPageTransition (PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr)
 Sets the transitional effect to be applied when the current page gets shown. More...
 
sal_Int32 CreateControl (const AnyWidget &rControlType)
 create a new form control More...
 
void AddStream (const OUString &rMimeType, PDFOutputStream *pStream)
 Inserts an additional stream to the PDF file. More...
 

Static Public Member Functions

static css::uno::Reference< css::beans::XMaterialHolder > InitEncryption (const OUString &i_rOwnerPassword, const OUString &i_rUserPassword)
 
static void AppendUnicodeTextString (const OUString &rString, OStringBuffer &rBuffer)
 Write rString as a PDF hex string into rBuffer. More...
 
static OString GetDateTime ()
 Get current date/time in PDF D:YYYYMMDDHHMMSS form. More...
 

Private Member Functions

 PDFWriter (const PDFWriter &)=delete
 
PDFWriteroperator= (const PDFWriter &)=delete
 

Private Attributes

ScopedVclPtr< PDFWriterImplxImplementation
 

Detailed Description

Definition at line 75 of file pdfwriter.hxx.

Member Enumeration Documentation

Enumerator
capButt 
capRound 
capSquare 

Definition at line 84 of file pdfwriter.hxx.

Enumerator
DrawColor 
DrawGreyscale 

Definition at line 532 of file pdfwriter.hxx.

Enumerator
XYZ 
FitRectangle 

Definition at line 109 of file pdfwriter.hxx.

Enumerator
Warning_Transparency_Omitted_PDFA 
Warning_Transparency_Omitted_PDF13 
Warning_FormAction_Omitted_PDFA 
Warning_Transparency_Converted 
Error_Signature_Failed 

Definition at line 193 of file pdfwriter.hxx.

Enumerator
HTML 
XML 
FDF 
PDF 

Definition at line 441 of file pdfwriter.hxx.

Enumerator
joinMiter 
joinRound 
joinBevel 

Definition at line 85 of file pdfwriter.hxx.

Enumerator
Portrait 
Inherit 

Definition at line 103 of file pdfwriter.hxx.

Enumerator
Regular 
SplitHorizontalInward 
SplitHorizontalOutward 
SplitVerticalInward 
SplitVerticalOutward 
BlindsHorizontal 
BlindsVertical 
BoxInward 
BoxOutward 
WipeLeftToRight 
WipeBottomToTop 
WipeRightToLeft 
WipeTopToBottom 
Dissolve 

Definition at line 176 of file pdfwriter.hxx.

Enumerator
URIAction 
URIActionDestination 
LaunchAction 

Definition at line 470 of file pdfwriter.hxx.

Enumerator
DefaultLayout 
SinglePage 
Continuous 
ContinuousFacing 

Definition at line 460 of file pdfwriter.hxx.

Enumerator
PDF_1_2 
PDF_1_3 
PDF_1_4 
PDF_1_5 
PDF_1_6 
PDF_A_1 
PDF_A_2 

Definition at line 106 of file pdfwriter.hxx.

Enumerator
ActionDefault 
FitInWindow 
FitWidth 
FitVisible 
ActionZoom 

Definition at line 451 of file pdfwriter.hxx.

Enumerator
ModeDefault 
UseOutlines 
UseThumbs 

Definition at line 444 of file pdfwriter.hxx.

Enumerator
Placement 
WritingMode 
SpaceBefore 
SpaceAfter 
StartIndent 
EndIndent 
TextIndent 
TextAlign 
Width 
Height 
BlockAlign 
InlineAlign 
LineHeight 
BaselineShift 
TextDecorationType 
ListNumbering 
RowSpan 
ColSpan 
LinkAnnotation 
Language 

Definition at line 133 of file pdfwriter.hxx.

Enumerator
Invalid 
NONE 
Block 
Inline 
Before 
After 
Start 
End 
LrTb 
RlTb 
TbRl 
Center 
Justify 
Auto 
Middle 
Normal 
Underline 
Overline 
LineThrough 
Disc 
Circle 
Square 
Decimal 
UpperRoman 
LowerRoman 
UpperAlpha 
LowerAlpha 

Definition at line 154 of file pdfwriter.hxx.

Enumerator
NonStructElement 
Document 
Part 
Article 
Section 
Division 
BlockQuote 
Caption 
TOC 
TOCI 
Index 
Paragraph 
Heading 
H1 
H2 
H3 
H4 
H5 
H6 
List 
ListItem 
LILabel 
LIBody 
Table 
TableRow 
TableHeader 
TableData 
Span 
Quote 
Note 
Reference 
BibEntry 
Code 
Link 
Figure 
Formula 
Form 

Definition at line 113 of file pdfwriter.hxx.

Enumerator
PushButton 
RadioButton 
CheckBox 
Edit 
ListBox 
ComboBox 
Hierarchy 
Signature 

Definition at line 187 of file pdfwriter.hxx.

Constructor & Destructor Documentation

vcl::PDFWriter::PDFWriter ( const PDFWriter )
privatedelete
PDFWriter::PDFWriter ( const PDFWriterContext rContext,
const css::uno::Reference< css::beans::XMaterialHolder > &  xEnc 
)

Definition at line 29 of file pdfwriter.cxx.

References Create().

PDFWriter::~PDFWriter ( )

Definition at line 35 of file pdfwriter.cxx.

References xImplementation.

Member Function Documentation

void PDFWriter::AddStream ( const OUString &  rMimeType,
PDFOutputStream pStream 
)

Inserts an additional stream to the PDF file.

This function adds an arbitrary stream to the produced PDF file. May be called any time before Emit(). The stream will be written during Emit by calling the PDFOutputStream Object's write method. After the call the PDFOutputStream will be deleted.

All additional streams and their mimetypes will be entered into an array in the trailer dictionary.

Parameters
rMimeTypethe mimetype of the stream
pStreamthe interface to the additional stream

Definition at line 444 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::AppendUnicodeTextString ( const OUString &  rString,
OStringBuffer &  rBuffer 
)
static

Write rString as a PDF hex string into rBuffer.

Definition at line 271 of file pdfwriter_impl.cxx.

References appendHex(), and i.

Referenced by vcl::PDFWriterImpl::appendUnicodeTextStringEncrypt(), vcl::PDFWriterImpl::computeDocumentIdentifier(), and vcl::filter::PDFDocument::WriteSignatureObject().

sal_Int32 PDFWriter::BeginStructureElement ( enum StructElement  eType,
const OUString &  rAlias 
)

begin a new logical structure element

BeginStructureElement/EndStructureElement calls build the logical structure of the PDF - the basis for tagged PDF. Structural elements are implemented using marked content tags. Each structural element can contain sub elements (e.g. a section can contain a heading and a paragraph). The structure hierarchy is build automatically from the Begin/EndStructureElement calls.

A structural element need not be contained on one page; e.g. paragraphs often run from one page to the next. In this case the corresponding EndStructureElement must be called while drawing the next page.

BeginStructureElement and EndStructureElement must be called only after PDFWriter::NewPage has been called and before PDFWriter::Emit gets called. The current page number is an implicit context parameter for Begin/EndStructureElement.

For pagination artifacts that are not part of the logical structure of the document (like header, footer or page number) the special StructElement NonStructElement exists. To place content outside of the structure tree simply call BeginStructureElement( NonStructElement ) then draw your content and then call EndStructureElement(). All children of a NonStructElement will not be part of the structure. Nonetheless if you add a child structural element to a NonStructElement you will still have to call EndStructureElement for it. Best think of the structure tree as a stack.

Note: there is always one structural element in existence without having called BeginStructureElement; this is the root of the structure tree (called StructTreeRoot). The StructTreeRoot has always the id 0.

Parameters
eTypedenotes what kind of element to begin (e.g. a heading or paragraph)
rAliasthe specified alias will be used as structure tag. Also an entry in the PDF's role map will be created mapping alias to regular structure type.
Returns
the new structure element's id for use in SetCurrentStructureElement

Definition at line 390 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::BeginTransparencyGroup ( )

Start a transparency group.

Drawing operations can be grouped together to acquire a common transparency behaviour; after calling BeginTransparencyGroup all drawing operations will be grouped together into a transparent object.

The transparency behaviour is set with one of the EndTransparencyGroup calls and can be either a constant transparency factor or a transparent soft mask in form of an 8 bit gray scale bitmap.

It is permissible to nest transparency group.

Transparency groups MUST NOT span multiple pages

Transparency is a feature introduced in PDF1.4, so transparency group will be ignored if the produced PDF has a lower version. The drawing operations will be emitted normally.

Definition at line 216 of file pdfwriter.cxx.

References xImplementation.

sal_Int32 PDFWriter::CreateControl ( const AnyWidget rControlType)

create a new form control

This function creates a new form control in the PDF and sets its various properties. Do not pass an actual AnyWidget as rControlType will be cast to the type described by the type member.

Parameters
rControlTypea descendant of AnyWidget determining the control's properties
Returns
the new control's id for reference purposes

Definition at line 435 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

sal_Int32 PDFWriter::CreateDest ( const tools::Rectangle rRect,
sal_Int32  nPageNr,
PDFWriter::DestAreaType  eType 
)

Create a new destination to be used in a link.

Parameters
rRecttarget rectangle on page to be displayed if dest is jumped to
nPageNrnumber of page the dest is on (as returned by NewPage) or -1 in which case the current page is used
eTypewhat dest type to use
Returns
the destination id (to be used in SetLinkDest) or -1 if page id does not exist

Definition at line 350 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

sal_Int32 PDFWriter::CreateLink ( const tools::Rectangle rRect,
sal_Int32  nPageNr 
)

Create a new link on a page.

Parameters
rRectactive rectangle of the link (that is the area that has to be hit to activate the link)
nPageNrnumber of page the link is on (as returned by NewPage) or -1 in which case the current page is used
Returns
the link id (to be used in SetLinkDest, SetLinkURL) or -1 if page id does not exist

Definition at line 331 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

sal_Int32 PDFWriter::CreateNamedDest ( const OUString &  sDestName,
const tools::Rectangle rRect,
sal_Int32  nPageNr,
PDFWriter::DestAreaType  eType 
)

Create a new named destination to be used in a link from another PDF document.

Parameters
sDestNamethe name (label) of the bookmark, to be used to jump to
rRecttarget rectangle on page to be displayed if dest is jumped to
nPageNrnumber of page the dest is on (as returned by NewPage) or -1 in which case the current page is used
eTypewhat dest type to use
Returns
the destination id (to be used in SetLinkDest) or -1 if page id does not exist

Definition at line 346 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::CreateNote ( const tools::Rectangle rRect,
const PDFNote rNote,
sal_Int32  nPageNr 
)

Create a new note on a page.

Parameters
rRectactive rectangle of the note (that is the area that has to be hit to popup the annotation)
rNotespecifies the contents of the note
nPageNrnumber of page the note is on (as returned by NewPage) or -1 in which case the current page is used

Definition at line 385 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

sal_Int32 PDFWriter::CreateOutlineItem ( sal_Int32  nParent,
const OUString &  rText,
sal_Int32  nDestID 
)

Create a new outline item.

Parameters
nParentdeclares the parent of the new item in the outline hierarchy. An invalid value will result in a new toplevel item.
rTextsets the title text of the item
nDestIDdeclares which Dest (created with CreateDest) the outline item will point to
Returns
the outline item id of the new item

Definition at line 380 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

sal_Int32 PDFWriter::CreateScreen ( const tools::Rectangle rRect,
sal_Int32  nPageNr 
)

Creates a screen annotation.

Definition at line 336 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::DrawArc ( const tools::Rectangle rRect,
const Point rStartPt,
const Point rEndPt 
)

Definition at line 143 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawBitmap ( const Point rDestPt,
const Size rDestSize,
const Bitmap rBitmap,
const Graphic rGraphic 
)

Definition at line 178 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawBitmapEx ( const Point rDestPt,
const Size rDestSize,
const BitmapEx rBitmapEx 
)

Definition at line 183 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawChord ( const tools::Rectangle rRect,
const Point rStartPt,
const Point rEndPt 
)

Definition at line 153 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawEllipse ( const tools::Rectangle rRect)

Definition at line 138 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawGradient ( const tools::Rectangle rRect,
const Gradient rGradient 
)

Definition at line 193 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawGradient ( const tools::PolyPolygon rPolyPoly,
const Gradient rGradient 
)
void PDFWriter::DrawHatch ( const tools::PolyPolygon rPolyPoly,
const Hatch rHatch 
)

Definition at line 188 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawJPGBitmap ( SvStream rJPGData,
bool  bIsTrueColor,
const Size rSrcSizePixel,
const tools::Rectangle rTargetArea,
const Bitmap rMask,
const Graphic rGraphic 
)

Insert a JPG encoded image (optionally with mask)

Parameters
rJPGDataa Stream containing the encoded image
bIsTrueColortrue: jpeg is 24 bit true color, false: jpeg is 8 bit greyscale
rSrcSizePixelsize in pixel of the image
rTargetAreawhere to put the image
rMaskoptional mask; if not empty it must have the same pixel size as the image and be either 1 bit black&white or 8 bit grey

Definition at line 326 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::DrawLine ( const Point rStartPt,
const Point rEndPt 
)

Definition at line 108 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawLine ( const Point rStartPt,
const Point rEndPt,
const LineInfo rLineInfo 
)

Definition at line 113 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawPie ( const tools::Rectangle rRect,
const Point rStartPt,
const Point rEndPt 
)

Definition at line 148 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawPixel ( const Point rPt,
const Color rColor 
)

Definition at line 173 of file pdfwriter.cxx.

References xImplementation.

void vcl::PDFWriter::DrawPixel ( const Point rPt)
inline

Definition at line 752 of file pdfwriter.hxx.

References COL_TRANSPARENT().

void PDFWriter::DrawPolygon ( const tools::Polygon rPoly)

Definition at line 118 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawPolyLine ( const tools::Polygon rPoly)

Definition at line 123 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawPolyLine ( const tools::Polygon rPoly,
const LineInfo rLineInfo 
)

Definition at line 158 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawPolyLine ( const tools::Polygon rPoly,
const ExtLineInfo rInfo 
)

Definition at line 163 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawPolyPolygon ( const tools::PolyPolygon rPolyPoly)

Definition at line 168 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawRect ( const tools::Rectangle rRect)

Definition at line 128 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawRect ( const tools::Rectangle rRect,
sal_uLong  nHorzRount,
sal_uLong  nVertRound 
)

Definition at line 133 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawStretchText ( const Point rStartPt,
sal_uLong  nWidth,
const OUString &  rStr,
sal_Int32  nIndex,
sal_Int32  nLen 
)

Definition at line 90 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawText ( const Point rPos,
const OUString &  rText 
)

Definition at line 65 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawText ( const tools::Rectangle rRect,
const OUString &  rStr,
DrawTextFlags  nStyle 
)

Definition at line 100 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawTextArray ( const Point rStartPt,
const OUString &  rStr,
const long *  pDXAry,
sal_Int32  nIndex,
sal_Int32  nLen 
)

Definition at line 80 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawTextLine ( const Point rPos,
long  nWidth,
FontStrikeout  eStrikeout,
FontLineStyle  eUnderline,
FontLineStyle  eOverline 
)

Definition at line 70 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawTransparent ( const tools::PolyPolygon rPolyPoly,
sal_uInt16  nTransparencePercent 
)

Definition at line 211 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::DrawWallpaper ( const tools::Rectangle rRect,
const Wallpaper rWallpaper 
)

Definition at line 206 of file pdfwriter.cxx.

References xImplementation.

bool PDFWriter::Emit ( )

Definition at line 50 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::EndStructureElement ( )

end the current logical structure element

Close the current structure element. The current element's parent becomes the current structure element again.

See also
BeginStructureElement

Definition at line 395 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::EndTransparencyGroup ( const tools::Rectangle rBoundRect,
sal_uInt16  nTransparencePercent 
)

End a transparency group with constant transparency factor.

This ends a transparency group and inserts it on the current page. The coordinates of the group result out of the grouped drawing operations.

Parameters
rBoundRectThe bounding rectangle of the group
nTransparencePercentThe transparency factor

Definition at line 221 of file pdfwriter.cxx.

References xImplementation.

OString PDFWriter::GetDateTime ( )
static

Get current date/time in PDF D:YYYYMMDDHHMMSS form.

Definition at line 1434 of file pdfwriter_impl.cxx.

Referenced by vcl::PDFWriterImpl::setupDocInfo(), and vcl::filter::PDFDocument::WriteSignatureObject().

std::set< PDFWriter::ErrorCode > const & PDFWriter::GetErrors ( ) const

Definition at line 449 of file pdfwriter.cxx.

References xImplementation.

OutputDevice * PDFWriter::GetReferenceDevice ( )

Returns an OutputDevice for formatting This Output device is guaranteed to use the same font metrics as the resulting PDF file.

Returns
the reference output device

Definition at line 40 of file pdfwriter.cxx.

References xImplementation.

css::uno::Reference< css::beans::XMaterialHolder > PDFWriter::InitEncryption ( const OUString &  i_rOwnerPassword,
const OUString &  i_rUserPassword 
)
static

Definition at line 455 of file pdfwriter.cxx.

References vcl::PDFWriterImpl::initEncryption().

void PDFWriter::IntersectClipRegion ( const tools::Rectangle rRect)

Definition at line 271 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::IntersectClipRegion ( const basegfx::B2DPolyPolygon rRegion)

Definition at line 266 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::MoveClipRegion ( long  nHorzMove,
long  nVertMove 
)

Definition at line 261 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::NewPage ( double  nPageWidth,
double  nPageHeight,
Orientation  eOrientation = Orientation::Inherit 
)

Creates a new page to fill If width and height are not set the page size is inherited from the page tree other effects: resets the graphics state: MapMode, Font Colors and other state information MUST be set again or are undefined.

Definition at line 45 of file pdfwriter.cxx.

References xImplementation.

PDFWriter& vcl::PDFWriter::operator= ( const PDFWriter )
privatedelete
void PDFWriter::PlayMetafile ( const GDIMetaFile i_rMTF,
const PlayMetafileContext i_rPlayContext,
vcl::PDFExtOutDevData pDevDat = nullptr 
)

Definition at line 462 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::Pop ( )
void PDFWriter::Push ( PushFlags  nFlags = PushFlags::ALL)
sal_Int32 PDFWriter::RegisterDestReference ( sal_Int32  nDestId,
const tools::Rectangle rRect,
sal_Int32  nPageNr,
DestAreaType  eType 
)

creates a destination which is not intended to be referred to by a link, but by a public destination Id.

Form widgets, for instance, might refer to a destination, without ever actually creating a source link to point to this destination. In such cases, a public destination Id will be assigned to the form widget, and later on, the concrete destination data for this public Id will be registered using RegisterDestReference.

Parameters
nDestIddestination ID
rRecttarget rectangle on page to be displayed if dest is jumped to
nPageNrnumber of page the dest is on (as returned by NewPage) or -1 in which case the current page is used
eTypewhat dest type to use
Returns
the internal destination Id.

Definition at line 341 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetActualText ( const OUString &  rText)

set the ActualText attribute of a structural element

ActualText contains the Unicode text without layout artifacts that is shown by a structural element. For example if a line is ended prematurely with a break in a word and continued on the next line (e.g. "happen-<newline>stance") the corresponding ActualText would contain the unbroken line (e.g. "happenstance").

Parameters
rTextcontains the complete logical text the structural element displays.

Definition at line 420 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::SetAlternateText ( const OUString &  rText)

set the Alt attribute of a strutural element

Alt is s replacement text describing the contents of a structural element. This is mainly used by accessibility applications; e.g. a screen reader would read the Alt replacement text for an image to a visually impaired user.

Parameters
rTextcontains the replacement text for the structural element

Definition at line 425 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::SetClipRegion ( )

Definition at line 251 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::SetClipRegion ( const basegfx::B2DPolyPolygon rRegion)

Definition at line 256 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetCurrentStructureElement ( sal_Int32  nElement)

set the current structure element

For different purposes it may be useful to paint a structure element's content discontinously. In that case an already existing structure element can be appended to by using SetCurrentStructureElement. The referenced structure element becomes the current structure element with all consequences: all following structure elements are appended as children of the current element.

Parameters
nElementthe id of the new current structure element

Definition at line 400 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::SetDigitLanguage ( LanguageType  eLang)

Definition at line 281 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetDocumentLocale ( const css::lang::Locale &  rDocLocale)

Definition at line 55 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetFillColor ( const Color rColor)

Definition at line 246 of file pdfwriter.cxx.

References xImplementation.

void vcl::PDFWriter::SetFillColor ( )
inline

Definition at line 718 of file pdfwriter.hxx.

References COL_TRANSPARENT(), and SetFillColor().

Referenced by SetFillColor().

void PDFWriter::SetFont ( const vcl::Font rNewFont)

Definition at line 60 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetLayoutMode ( ComplexTextLayoutFlags  nMode)

Definition at line 276 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetLineColor ( const Color rColor)

Definition at line 241 of file pdfwriter.cxx.

References xImplementation.

void vcl::PDFWriter::SetLineColor ( )
inline

Definition at line 715 of file pdfwriter.hxx.

References COL_TRANSPARENT(), and SetLineColor().

Referenced by SetLineColor().

void PDFWriter::SetLinkDest ( sal_Int32  nLinkId,
sal_Int32  nDestId 
)

Set the destination for a link will change a URL type link to a dest link if necessary.

Parameters
nLinkIdthe link to be changed
nDestIdthe dest the link shall point to

Definition at line 355 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetLinkPropertyID ( sal_Int32  nLinkId,
sal_Int32  nPropertyID 
)

Resolve link in logical structure.

If a link is created after the corresponding visual appearance was drawn it is not possible to set the link id as a property attribute to the link structure item that should be created in tagged PDF around the visual appearance of a link.

For this reason an arbitrary id can be given to SetStructureAttributeNumerical at the time the text for the link is drawn. To resolve this arbitrary id again when the actual link annotation is created use SetLinkPropertyID. When Emit finally gets called all LinkAnnotation type structure attributes will be replaced with the correct link id.

CAUTION: this technique must be used either for all or none of the links in a document since the link id space and arbitrary property id space could overlap and it would be impossible to resolve whether a Link structure attribute value was arbitrary or already a real id.

Parameters
nLinkIdthe link to be mapped
nPropertyIDthe arbitrary id set in a Link structure element to address the link with real id nLinkId

Definition at line 375 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetLinkURL ( sal_Int32  nLinkId,
const OUString &  rURL 
)

Set the URL for a link will change a dest type link to a URL type link if necessary.

Parameters
nLinkIdthe link to be changed
rURLthe URL the link shall point to. The URL will be parsed (and corrected) by the com.sun.star.util.URLTransformer service; the result will then appear literally in the PDF file produced

Definition at line 360 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetMapMode ( const MapMode rNewMapMode)

Definition at line 236 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetOverlineColor ( )

Definition at line 311 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetOverlineColor ( const Color rColor)

Definition at line 316 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetPageTransition ( PDFWriter::PageTransition  eType,
sal_uInt32  nMilliSec,
sal_Int32  nPageNr 
)

Sets the transitional effect to be applied when the current page gets shown.

Parameters
eTypethe kind of effect to be used; use Regular to disable transitional effects for this page
nMilliSecthe duration of the transitional effect in milliseconds; set 0 to disable transitional effects
nPageNrthe page number to apply the effect to; -1 denotes the current page

Definition at line 430 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetScreenStream ( sal_Int32  nScreenId,
const OUString &  rURL 
)

Sets the URL of an embedded screen annotation.

Definition at line 370 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetScreenURL ( sal_Int32  nScreenId,
const OUString &  rURL 
)

Sets the URL of a linked screen annotation.

Definition at line 365 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::GlobalSyncData::PlayGlobalActions().

void PDFWriter::SetStructureAttribute ( enum StructAttribute  eAttr,
enum StructAttributeValue  eVal 
)

set a structure attribute on the current structural element

SetStructureAttribute sets an attribute of the current structural element to a new value. A consistency check is performed before actually setting the value; if the check fails, the function returns False and the attribute remains unchanged.

Parameters
eAttrdenotes what attribute to change
eValthe value to set the attribute to

Definition at line 405 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::SetStructureAttributeNumerical ( enum StructAttribute  eAttr,
sal_Int32  nValue 
)

set a structure attribute on the current structural element

SetStructureAttributeNumerical sets an attribute of the current structural element to a new numerical value. A consistency check is performed before actually setting the value; if the check fails, the function returns False and the attribute remains unchanged.

Parameters
eAttrdenotes what attribute to change
nValuethe value to set the attribute to

Definition at line 410 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::SetStructureBoundingBox ( const tools::Rectangle rRect)

set the bounding box of a structural element

SetStructureBoundingBox sets the BBox attribute to a new value. Since the BBox attribute can only be applied to Table, Figure, Form and Formula elements, a call of this function for other element types will be ignored and the BBox attribute not be set.

Parameters
rRectthe new bounding box for the structural element

Definition at line 415 of file pdfwriter.cxx.

References xImplementation.

Referenced by vcl::PageSyncData::PlaySyncPageAct().

void PDFWriter::SetTextAlign ( ::TextAlign  eAlign)

Definition at line 321 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetTextColor ( const Color rColor)

Definition at line 286 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetTextFillColor ( )

Definition at line 291 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetTextFillColor ( const Color rColor)

Definition at line 296 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetTextLineColor ( )

Definition at line 301 of file pdfwriter.cxx.

References xImplementation.

void PDFWriter::SetTextLineColor ( const Color rColor)

Definition at line 306 of file pdfwriter.cxx.

References xImplementation.

Member Data Documentation

ScopedVclPtr<PDFWriterImpl> vcl::PDFWriter::xImplementation
private

The documentation for this class was generated from the following files: