LibreOffice Module vcl (master)  1
pdfwriter.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_VCL_PDFWRITER_HXX
20 #define INCLUDED_VCL_PDFWRITER_HXX
21 
22 #include <sal/types.h>
23 
24 #include <tools/gen.hxx>
25 #include <tools/color.hxx>
26 #include <rtl/strbuf.hxx>
27 
28 #include <vcl/dllapi.h>
29 #include <vcl/font.hxx>
30 #include <vcl/outdev.hxx>
31 #include <vcl/graph.hxx>
32 
33 #include <com/sun/star/lang/Locale.hpp>
34 
35 #include <memory>
36 #include <vector>
37 #include <set>
38 
39 namespace com { namespace sun { namespace star { namespace beans { class XMaterialHolder; } } } }
40 namespace com { namespace sun { namespace star { namespace io { class XOutputStream; } } } }
41 namespace com { namespace sun { namespace star { namespace security { class XCertificate; } } } }
42 
43 class GDIMetaFile;
44 class MapMode;
45 class LineInfo;
46 namespace tools {
47  class Polygon;
48  class PolyPolygon;
49 }
50 class Bitmap;
51 class BitmapEx;
52 class Gradient;
53 class Hatch;
54 class Wallpaper;
55 
56 namespace vcl
57 {
58 
59 class PDFExtOutDevData;
60 class PDFWriterImpl;
61 
62 struct PDFNote
63 {
64  OUString Title; // optional title for the popup containing the note
65  OUString Contents; // contents of the note
66 };
67 
69 {
70  public:
71  virtual ~PDFOutputStream();
72  virtual void write( const css::uno::Reference< css::io::XOutputStream >& xStream ) = 0;
73 };
74 
76 {
78 
79  PDFWriter(const PDFWriter&) = delete;
80  PDFWriter& operator=(const PDFWriter&) = delete;
81 
82 public:
83  // extended line info
84  enum CapType { capButt, capRound, capSquare };
85  enum JoinType { joinMiter, joinRound, joinBevel };
86  struct ExtLineInfo
87  {
88  double m_fLineWidth;
92  double m_fMiterLimit;
93  std::vector< double > m_aDashArray;
94 
95  ExtLineInfo() : m_fLineWidth( 0.0 ),
96  m_fTransparency( 0.0 ),
97  m_eCap( capButt ),
98  m_eJoin( joinMiter ),
99  m_fMiterLimit( 10.0 )
100  {}
101  };
102 
103  enum class Orientation { Portrait, Inherit };
104 
105  // in case the below enum is added PDF_1_6 PDF_1_7, please add them just after PDF_1_5
106  enum class PDFVersion { PDF_1_2, PDF_1_3, PDF_1_4, PDF_1_5, PDF_1_6, PDF_A_1, PDF_A_2 };//i59651, PDF/A-1b & -1a, only -1b implemented for now
107  // for the meaning of DestAreaType please look at PDF Reference Manual
108  // version 1.4 section 8.2.1, page 475
109  enum class DestAreaType { XYZ, FitRectangle };
110 
111  // for a definition of structural element types please refer to
112  // PDF Reference, 3rd ed. section 9.7.4
114  {
115  // special element to place outside the structure hierarchy
117  // Grouping elements
118  Document, Part, Article, Section, Division, BlockQuote,
119  Caption, TOC, TOCI, Index,
120 
121  // block level elements
122  Paragraph, Heading, H1, H2, H3, H4, H5, H6,
123  List, ListItem, LILabel, LIBody,
124  Table, TableRow, TableHeader, TableData,
125 
126  // inline level elements
127  Span, Quote, Note, Reference, BibEntry, Code, Link,
128 
129  // illustration elements
130  Figure, Formula, Form
131  };
132 
134  {
135  Placement, WritingMode, SpaceBefore, SpaceAfter, StartIndent, EndIndent,
136  TextIndent, TextAlign, Width, Height, BlockAlign, InlineAlign,
138  RowSpan, ColSpan,
139 
140  // link destination is an artificial attribute that sets
141  // the link annotation ID of a Link element
142  // further note: since structure attributes can only be
143  // set during content creation, but links can be
144  // created after the fact, it is possible to set
145  // an arbitrary id as structure attribute here. In this
146  // case the arbitrary id has to be passed again when the
147  // actual link annotation is created via SetLinkPropertyID
149  // Language currently sets a LanguageType (see i18nlangtag/lang.h)
150  // which will be internally changed to a corresponding locale
151  Language
152  };
153 
155  {
158  // Placement
159  Block, Inline, Before, After, Start, End,
160  // WritingMode
161  LrTb, RlTb, TbRl,
162  // TextAlign
164  // Width, Height,
166  // BlockAlign
168  // LineHeight
170  // TextDecorationType
171  Underline, Overline, LineThrough,
172  // ListNumbering
173  Disc, Circle, Square, Decimal, UpperRoman, LowerRoman, UpperAlpha, LowerAlpha
174  };
175 
176  enum class PageTransition
177  {
178  Regular,
179  SplitHorizontalInward, SplitHorizontalOutward,
180  SplitVerticalInward, SplitVerticalOutward,
181  BlindsHorizontal, BlindsVertical,
182  BoxInward, BoxOutward,
183  WipeLeftToRight, WipeBottomToTop, WipeRightToLeft, WipeTopToBottom,
184  Dissolve
185  };
186 
188  {
190  Signature
191  };
192 
194  {
195  // transparent object occurred and was draw opaque because
196  // PDF/A does not allow transparency
198 
199  // transparent object occurred but is only supported since
200  // PDF 1.4
202 
203  // a form action was exported that is not suitable for PDF/A
204  // the action was skipped
206 
207  // transparent objects were converted to a bitmap in order
208  // to removetransparencies from the output
210 
211  // signature generation failed
213  };
214 
216  {
217  WidgetType const Type; // primitive RTTI
218  public:
219  OUString Name; // a distinct name to identify the control
220  OUString Description;// descriptive text for the control (e.g. for tool tip)
221  OUString Text; // user text to appear on the control
222  DrawTextFlags TextStyle; // style flags
223  bool ReadOnly;
224  tools::Rectangle Location; // describes the area filled by the control
225  bool Border; // true: widget should have a border, false: no border
226  Color BorderColor;// COL_TRANSPARENT and Border=true means get color from application settings
227  bool Background; // true: widget shall draw its background, false: no background
228  Color BackgroundColor; // COL_TRANSPARENT and Background=true means get color from application settings
229  vcl::Font TextFont; // an empty font will be replaced by the
230  // appropriate font from the user settings
231  Color TextColor; // COL_TRANSPARENT will be replaced by the appropriate color from application settings
232  sal_Int32 TabOrder; // lowest number is first in tab order
233 
234  /* style flags for text are those for OutputDevice::DrawText
235  allowed values are:
236  DrawTextFlags::Left, DrawTextFlags::Center, DrawTextFlags::Right, DrawTextFlags::Top,
237  DrawTextFlags::VCenter, DrawTextFlags::Bottom,
238  DrawTextFlags::MultiLine, DrawTextFlags::WordBreak
239 
240  if TextStyle is 0, then each control will fill in default values
241  */
242 
243  // note: the Name member comprises the field name of the resulting
244  // PDF field names need to be globally unique. Therefore if any
245  // Widget with an already used name is created, the name will be
246  // made unique by adding an underscore ('_') and an ascending number
247  // to the name.
248 
250  Type( eType ),
251  TextStyle( DrawTextFlags::NONE ),
252  ReadOnly( false ),
253  Border( false ),
254  BorderColor( COL_TRANSPARENT ),
255  Background( false ),
256  BackgroundColor( COL_TRANSPARENT ),
257  TextColor( COL_TRANSPARENT ),
258  TabOrder( -1 )
259  {}
260  virtual ~AnyWidget();
261 
262  WidgetType getType() const { return Type; }
263 
264  virtual std::unique_ptr<AnyWidget> Clone() const = 0;
265 
266  protected:
267  // note that this equals the default compiler-generated copy-ctor, but we want to have it
268  // protected, to only allow sub classes to access it
269  AnyWidget( const AnyWidget& rSource )
270  :Type( rSource.Type )
271  ,Name( rSource.Name )
272  ,Description( rSource.Description )
273  ,Text( rSource.Text )
274  ,TextStyle( rSource.TextStyle )
275  ,ReadOnly( rSource.ReadOnly )
276  ,Location( rSource.Location )
277  ,Border( rSource.Border )
278  ,BorderColor( rSource.BorderColor )
279  ,Background( rSource.Background )
280  ,BackgroundColor( rSource.BackgroundColor )
281  ,TextFont( rSource.TextFont )
282  ,TextColor( rSource.TextColor )
283  ,TabOrder( rSource.TabOrder )
284  {
285  }
286  AnyWidget& operator=( const AnyWidget& ); // never implemented
287  };
288 
289  struct PushButtonWidget : public AnyWidget
290  {
291  /* If Dest is set to a valid link destination,
292  Then pressing the button will act as a goto
293  action within the document.
294 
295  Else:
296  An empty URL means this button will reset the form.
297 
298  If URL is not empty and Submit is set, then the URL
299  contained will be set as the URL to submit the
300  form to. In this case the submit method will be
301  either GET if SubmitGet is true or POST if
302  SubmitGet is false.
303 
304  If URL is not empty and Submit is clear, then
305  the URL contained will be interpreted as a
306  hyperlink to be executed on pushing the button.
307 
308  There will be no error checking or any kind of
309  conversion done to the URL parameter execept this:
310  it will be output as 7bit Ascii. The URL
311  will appear literally in the PDF file produced
312  */
313  sal_Int32 Dest;
314  OUString URL;
315  bool Submit;
316  bool SubmitGet;
317 
320  Dest( -1 ), Submit( false ), SubmitGet( false )
321  {}
322 
323  virtual std::unique_ptr<AnyWidget> Clone() const override
324  {
325  return std::unique_ptr<AnyWidget>(new PushButtonWidget( *this ));
326  }
327  };
328 
329  struct CheckBoxWidget : public AnyWidget
330  {
331  bool Checked;
332 
335  Checked( false )
336  {}
337 
338  virtual std::unique_ptr<AnyWidget> Clone() const override
339  {
340  return std::unique_ptr<AnyWidget>(new CheckBoxWidget( *this ));
341  }
342  };
343 
344  struct RadioButtonWidget : public AnyWidget
345  {
346  bool Selected;
347  sal_Int32 RadioGroup;
348  OUString OnValue; // the value of the radio button if it is selected
349 
352  Selected( false ),
353  RadioGroup( 0 )
354  {}
355 
356  virtual std::unique_ptr<AnyWidget> Clone() const override
357  {
358  return std::unique_ptr<AnyWidget>(new RadioButtonWidget( *this ));
359  }
360  // radio buttons having the same RadioGroup id comprise one
361  // logical radio button group, that is at most one of the RadioButtons
362  // in a group can be checked at any time
363  //
364  // note: a PDF radio button field consists of a named field
365  // containing unnamed checkbox child fields. The name of the
366  // radio button field is taken from the first RadioButtonWidget created
367  // in the group
368  };
369 
370  struct EditWidget : public AnyWidget
371  {
372  bool MultiLine; // whether multiple lines are allowed
373  bool Password; // visible echo off
374  bool FileSelect; // field is a file selector
375  sal_Int32 MaxLen; // maximum field length in characters, 0 means unlimited
376 
378  : AnyWidget( vcl::PDFWriter::Edit ),
379  MultiLine( false ),
380  Password( false ),
381  FileSelect( false ),
382  MaxLen( 0 )
383  {}
384 
385  virtual std::unique_ptr<AnyWidget> Clone() const override
386  {
387  return std::unique_ptr<AnyWidget>(new EditWidget( *this ));
388  }
389  };
390 
391  struct ListBoxWidget : public AnyWidget
392  {
393  bool DropDown;
395  std::vector<OUString> Entries;
396  std::vector<sal_Int32> SelectedEntries;
397  // if MultiSelect is false only the first entry of SelectedEntries
398  // will be taken into account. the same is implicit for PDF < 1.4
399  // since multiselect is a 1.4+ feature
400 
403  DropDown( false ),
404  MultiSelect( false )
405  {}
406 
407  virtual std::unique_ptr<AnyWidget> Clone() const override
408  {
409  return std::unique_ptr<AnyWidget>(new ListBoxWidget( *this ));
410  }
411  };
412 
413  // note: PDF only supports dropdown comboboxes
414  struct ComboBoxWidget : public AnyWidget
415  {
416  std::vector<OUString> Entries;
417  // set the current value in AnyWidget::Text
418 
421  {}
422 
423  virtual std::unique_ptr<AnyWidget> Clone() const override
424  {
425  return std::unique_ptr<AnyWidget>(new ComboBoxWidget( *this ));
426  }
427  };
428 
429  struct SignatureWidget: public AnyWidget
430  {
432  : AnyWidget( vcl::PDFWriter::Signature )
433  {}
434 
435  virtual std::unique_ptr<AnyWidget> Clone() const override
436  {
437  return std::unique_ptr<AnyWidget>(new SignatureWidget( *this ));
438  }
439  };
440 
441  enum ExportDataFormat { HTML, XML, FDF, PDF };
442 // see 3.6.1 of PDF 1.4 ref for details, used for 8.1 PDF v 1.4 ref also
443 // These emuns are treated as integer while reading/writing to configuration
445  {
448  UseThumbs
449  };
450 // These emuns are treated as integer while reading/writing to configuration
452  {
457  ActionZoom
458  };
459 // These enums are treated as integer while reading/writing to configuration
461  {
465  ContinuousFacing
466  };
467 
468  // These emuns are treated as integer while reading/writing to configuration
469  //what default action to generate in a PDF hyperlink to external document/site
471  {
474  LaunchAction
475  };
476 
477 /*
478 The following structure describes the permissions used in PDF security
479  */
481  {
482 
483  //for both 40 and 128 bit security, see 3.5.2 PDF v 1.4 table 3.15, v 1.5 and v 1.6 table 3.20.
488  //for revision 3 (bit 128 security) only
493 
494  // encryption will only happen if EncryptionKey is not empty
495  // EncryptionKey is actually a construct out of OValue, UValue and DocumentIdentifier
496  // if these do not match, behavior is undefined, most likely an invalid PDF will be produced
497  // OValue, UValue, EncryptionKey and DocumentIdentifier can be computed from
498  // PDFDocInfo, Owner password and User password used the InitEncryption method which
499  // implements the algorithms described in the PDF reference chapter 3.5: Encryption
500  std::vector<sal_uInt8> OValue;
501  std::vector<sal_uInt8> UValue;
502  std::vector<sal_uInt8> EncryptionKey;
503  std::vector<sal_uInt8> DocumentIdentifier;
504 
505  //permission default set for 128 bit, accessibility only
507  CanPrintTheDocument ( false ),
508  CanModifyTheContent ( false ),
509  CanCopyOrExtract ( false ),
510  CanAddOrModify ( false ),
511  CanFillInteractive ( false ),
512  CanExtractForAccessibility ( true ),
513  CanAssemble ( false ),
514  CanPrintFull ( false )
515  {}
516 
517 
518  bool Encrypt() const
519  { return ! OValue.empty() && ! UValue.empty() && ! DocumentIdentifier.empty(); }
520  };
521 
522  struct PDFDocInfo
523  {
524  OUString Title; // document title
525  OUString Author; // document author
526  OUString Subject; // subject
527  OUString Keywords; // keywords
528  OUString Creator; // application that created the original document
529  OUString Producer; // OpenOffice
530  };
531 
533  {
534  DrawColor, DrawGreyscale
535  };
536 
538  {
539  /* must be a valid file: URL usable by osl */
540  OUString URL;
541  /* the URL of the document being exported, used for relative links*/
542  OUString BaseURL;
543  /*if relative to file system should be formed*/
544  bool RelFsys;//i56629, i49415?, i64585?
545  /*the action to set the PDF hyperlink to*/
547  //convert the .od? target file type in a link to a .pdf type
548  //this is examined before doing anything else
550  //when the file type is .pdf, force the GoToR action
552 
553  /* decides the PDF language level to be produced */
555  /* valid for PDF >= 1.4
556  causes the MarkInfo entry in the document catalog to be set
557  */
558  bool Tagged;
559  /* determines in which format a form
560  will be submitted.
561  */
564  /* the following data members are used to customize the PDF viewer
565  preferences
566  */
567  /* see 3.6.1 PDF v 1.4 ref*/
570  // in percent, valid only if PDFDocumentAction == ActionZoom
571  sal_Int32 Zoom;
572 
573  /* see 8.6 PDF v 1.4 ref
574  specifies whether to hide the viewer tool
575  bars when the document is active.
576  */
580  bool FitWindow;
586  // initially visible page in viewer (starting with 0 for first page)
587  sal_Int32 InitialPage;
588  sal_Int32 OpenBookmarkLevels; // -1 means all levels
589 
592 
593  bool SignPDF;
594  OUString SignLocation;
595  OUString SignPassword;
596  OUString SignReason;
597  OUString SignContact;
598  css::lang::Locale DocumentLocale; // defines the document default language
599  sal_uInt32 DPIx, DPIy; // how to handle MapMode( MapUnit::MapPixel )
600  // 0 here specifies a default handling
602  css::uno::Reference< css::security::XCertificate> SignCertificate;
603  OUString SignTSA;
606 
608  RelFsys( false ), //i56629, i49415?, i64585?
609  DefaultLinkAction( PDFWriter::URIAction ),
610  ConvertOOoTargetToPDFTarget( false ),
611  ForcePDFAction( false ),
612  Version( PDFWriter::PDFVersion::PDF_1_5 ),
613  Tagged( false ),
614  SubmitFormat( PDFWriter::FDF ),
615  AllowDuplicateFieldNames( false ),
616  PDFDocumentMode( PDFWriter::ModeDefault ),
617  PDFDocumentAction( PDFWriter::ActionDefault ),
618  Zoom( 100 ),
619  HideViewerToolbar( false ),
620  HideViewerMenubar( false ),
621  HideViewerWindowControls( false ),
622  FitWindow( false ),
623  OpenInFullScreenMode( false ),
624  CenterWindow( false ),
625  DisplayPDFDocumentTitle( true ),
626  PageLayout( PDFWriter::DefaultLayout ),
627  FirstPageLeft( false ),
628  InitialPage( 1 ),
629  OpenBookmarkLevels( -1 ),
630  Encryption(),
631  SignPDF( false ),
632  DPIx( 0 ),
633  DPIy( 0 ),
634  ColorMode( PDFWriter::DrawColor ),
635  UseReferenceXObject( false )
636  {}
637  };
638 
639  PDFWriter( const PDFWriterContext& rContext, const css::uno::Reference< css::beans::XMaterialHolder >& );
640  ~PDFWriter();
641 
649  OutputDevice* GetReferenceDevice();
650 
659  void NewPage( double nPageWidth, double nPageHeight, Orientation eOrientation = Orientation::Inherit );
663  {
668 
670  : m_nMaxImageResolution( 0 )
671  , m_bOnlyLosslessCompression( false )
672  , m_nJPEGQuality( 90 )
673  , m_bTransparenciesWereRemoved( false )
674  {}
675 
676  };
677  void PlayMetafile( const GDIMetaFile&, const PlayMetafileContext&, vcl::PDFExtOutDevData* pDevDat = nullptr );
678 
679  /* sets the document locale originally passed with the context to a new value
680  * only affects the output if used before calling Emit.
681  */
682  void SetDocumentLocale( const css::lang::Locale& rDocLocale );
683 
684  /* finishes the file */
685  bool Emit();
686 
687  /*
688  * Get a list of errors that occurred during processing
689  * this should enable the producer to give feedback about
690  * any anomalies that might have occurred
691  */
692  std::set< ErrorCode > const & GetErrors() const;
693 
694  // uses 128bit encryption
695  static css::uno::Reference< css::beans::XMaterialHolder >
696  InitEncryption( const OUString& i_rOwnerPassword,
697  const OUString& i_rUserPassword
698  );
699 
700  /* functions for graphics state */
701  /* flag values: see vcl/outdev.hxx */
702  void Push( PushFlags nFlags = PushFlags::ALL );
703  void Pop();
704 
705  void SetClipRegion();
706  void SetClipRegion( const basegfx::B2DPolyPolygon& rRegion );
707  void MoveClipRegion( long nHorzMove, long nVertMove );
708  void IntersectClipRegion( const tools::Rectangle& rRect );
709  void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
710 
711  void SetLayoutMode( ComplexTextLayoutFlags nMode );
712  void SetDigitLanguage( LanguageType eLang );
713 
714  void SetLineColor( const Color& rColor );
716 
717  void SetFillColor( const Color& rColor );
719 
720  void SetFont( const vcl::Font& rNewFont );
721  void SetTextColor( const Color& rColor );
722  void SetTextFillColor();
723  void SetTextFillColor( const Color& rColor );
724 
725  void SetTextLineColor();
726  void SetTextLineColor( const Color& rColor );
727  void SetOverlineColor();
728  void SetOverlineColor( const Color& rColor );
729  void SetTextAlign( ::TextAlign eAlign );
730 
731  void SetMapMode( const MapMode& rNewMapMode );
732 
733 
734  /* actual drawing functions */
735  void DrawText( const Point& rPos, const OUString& rText );
736 
737  void DrawTextLine( const Point& rPos, long nWidth,
738  FontStrikeout eStrikeout,
739  FontLineStyle eUnderline,
740  FontLineStyle eOverline );
741  void DrawTextArray( const Point& rStartPt, const OUString& rStr,
742  const long* pDXAry,
743  sal_Int32 nIndex,
744  sal_Int32 nLen );
745  void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
746  const OUString& rStr,
747  sal_Int32 nIndex, sal_Int32 nLen );
748  void DrawText( const tools::Rectangle& rRect,
749  const OUString& rStr, DrawTextFlags nStyle );
750 
751  void DrawPixel( const Point& rPt, const Color& rColor );
752  void DrawPixel( const Point& rPt )
753  { DrawPixel( rPt, COL_TRANSPARENT ); }
754 
755  void DrawLine( const Point& rStartPt, const Point& rEndPt );
756  void DrawLine( const Point& rStartPt, const Point& rEndPt,
757  const LineInfo& rLineInfo );
758  void DrawPolyLine( const tools::Polygon& rPoly );
759  void DrawPolyLine( const tools::Polygon& rPoly,
760  const LineInfo& rLineInfo );
761  void DrawPolyLine( const tools::Polygon& rPoly, const ExtLineInfo& rInfo );
762  void DrawPolygon( const tools::Polygon& rPoly );
763  void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
764  void DrawRect( const tools::Rectangle& rRect );
765  void DrawRect( const tools::Rectangle& rRect,
766  sal_uLong nHorzRount, sal_uLong nVertRound );
767  void DrawEllipse( const tools::Rectangle& rRect );
768  void DrawArc( const tools::Rectangle& rRect,
769  const Point& rStartPt, const Point& rEndPt );
770  void DrawPie( const tools::Rectangle& rRect,
771  const Point& rStartPt, const Point& rEndPt );
772  void DrawChord( const tools::Rectangle& rRect,
773  const Point& rStartPt, const Point& rEndPt );
774 
775  void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
776  const Bitmap& rBitmap, const Graphic& rGraphic );
777 
778  void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
779  const BitmapEx& rBitmapEx );
780 
781  void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
782  void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
783 
784  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
785 
786  void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
787  void DrawTransparent( const tools::PolyPolygon& rPolyPoly,
788  sal_uInt16 nTransparencePercent );
789 
808  void BeginTransparencyGroup();
809 
821  void EndTransparencyGroup( const tools::Rectangle& rBoundRect, sal_uInt16 nTransparencePercent );
822 
842  void DrawJPGBitmap( SvStream& rJPGData, bool bIsTrueColor, const Size& rSrcSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic );
843 
863  sal_Int32 CreateNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
880  sal_Int32 CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
895  sal_Int32 CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr );
896 
898  sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr);
899 
922  sal_Int32 RegisterDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
923 
924 
934  void SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
945  void SetLinkURL( sal_Int32 nLinkId, const OUString& rURL );
946 
948  void SetScreenURL(sal_Int32 nScreenId, const OUString& rURL);
950  void SetScreenStream(sal_Int32 nScreenId, const OUString& rURL);
951 
978  void SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyID );
995  sal_Int32 CreateOutlineItem( sal_Int32 nParent, const OUString& rText, sal_Int32 nDestID );
996 
1010  void CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr );
1011 
1054  sal_Int32 BeginStructureElement( enum StructElement eType, const OUString& rAlias );
1062  void EndStructureElement();
1075  void SetCurrentStructureElement( sal_Int32 nElement );
1076 
1090  void SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal );
1104  void SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue );
1115  void SetStructureBoundingBox( const tools::Rectangle& rRect );
1116 
1127  void SetActualText( const OUString& rText );
1128 
1138  void SetAlternateText( const OUString& rText );
1139 
1153  void SetPageTransition( PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr );
1154 
1167  sal_Int32 CreateControl( const AnyWidget& rControlType );
1168 
1186  void AddStream( const OUString& rMimeType, PDFOutputStream* pStream );
1187 
1189  static void AppendUnicodeTextString(const OUString& rString, OStringBuffer& rBuffer);
1190 
1192  static OString GetDateTime();
1193 };
1194 
1195 }
1196 
1197 #endif // INCLUDED_VCL_PDFWRITER_HXX
1198 
1199 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
PDFWriter::PDFViewerAction PDFDocumentAction
Definition: pdfwriter.hxx:569
std::vector< sal_Int32 > SelectedEntries
Definition: pdfwriter.hxx:396
bool UseReferenceXObject
Use reference XObject markup for PDF images.
Definition: pdfwriter.hxx:605
Definition: hatch.hxx:44
void DrawPixel(const Point &rPt)
Definition: pdfwriter.hxx:752
Orientation
Definition: Exif.hxx:25
OUString Title
Definition: pdfwriter.hxx:64
OUString Contents
Definition: pdfwriter.hxx:65
virtual std::unique_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:323
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for refer...
Definition: button.hxx:32
A widget used to choose from a list of items and which has no entry.
Definition: lstbox.hxx:78
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_uIntPtr sal_uLong
PDFWriter::ExportDataFormat SubmitFormat
Definition: pdfwriter.hxx:562
Regular
css::uno::Reference< css::security::XCertificate > SignCertificate
Definition: pdfwriter.hxx:602
Reference
PDFWriter::PDFDocInfo DocumentInfo
Definition: pdfwriter.hxx:591
DateTime GetDateTime(const css::util::DateTime &_rDT)
Center
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
PDFWriter::ColorMode ColorMode
Definition: pdfwriter.hxx:601
Play a metafile like an outputdevice would do.
Definition: pdfwriter.hxx:662
Reference< XInputStream > xStream
virtual std::unique_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:338
PushFlags
Definition: outdevstate.hxx:38
Definition: edit.hxx:58
std::vector< sal_uInt8 > DocumentIdentifier
Definition: pdfwriter.hxx:503
WidgetType getType() const
Definition: pdfwriter.hxx:262
virtual std::unique_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:385
void DrawLine(OutputDevice &rDev, const basegfx::B2DPoint &rP1, const basegfx::B2DPoint &rP2, sal_uInt32 nWidth, SvxBorderLineStyle nDashing)
NONE
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
AnyWidget(WidgetType eType)
Definition: pdfwriter.hxx:249
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
tools::Rectangle Location
Definition: pdfwriter.hxx:224
BaselineShift
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
PDFWriter::PDFEncryptionProperties Encryption
Definition: pdfwriter.hxx:590
std::vector< sal_uInt8 > EncryptionKey
Definition: pdfwriter.hxx:502
DrawTextFlags
Definition: outdev.hxx:144
std::vector< OUString > Entries
Definition: pdfwriter.hxx:395
void SetLineColor()
Definition: pdfwriter.hxx:715
std::vector< OUString > Entries
Definition: pdfwriter.hxx:416
VclPtr< PDFWriterImpl > xImplementation
Definition: pdfwriter.hxx:77
void SetFillColor()
Definition: pdfwriter.hxx:718
virtual std::unique_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:407
AnyWidget(const AnyWidget &rSource)
Definition: pdfwriter.hxx:269
WidgetType const Type
Definition: pdfwriter.hxx:217
PDFWriter::PDFLinkDefaultAction DefaultLinkAction
Definition: pdfwriter.hxx:546
A widget used to choose from a list of items and which has an entry.
Definition: combobox.hxx:34
std::vector< double > m_aDashArray
Definition: pdfwriter.hxx:93
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
PDFWriter::PDFViewerPageMode PDFDocumentMode
Definition: pdfwriter.hxx:568
virtual std::unique_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:356
virtual std::unique_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:435
FontLineStyle
virtual std::unique_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:423
std::vector< sal_uInt8 > UValue
Definition: pdfwriter.hxx:501
css::lang::Locale DocumentLocale
Definition: pdfwriter.hxx:598
FontStrikeout
TextAlign
std::vector< sal_uInt8 > OValue
Definition: pdfwriter.hxx:500