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