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