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, Scope,
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 // Scope
177 // ListNumbering
178 Disc, Circle, Square, Decimal, UpperRoman, LowerRoman, UpperAlpha, LowerAlpha
179 };
180
181 enum class PageTransition
182 {
183 Regular,
184 SplitHorizontalInward, SplitHorizontalOutward,
185 SplitVerticalInward, SplitVerticalOutward,
186 BlindsHorizontal, BlindsVertical,
187 BoxInward, BoxOutward,
188 WipeLeftToRight, WipeBottomToTop, WipeRightToLeft, WipeTopToBottom,
189 Dissolve
190 };
191
193 {
196 };
197
199 {
201 };
202
204 {
205 // transparent object occurred and was draw opaque because
206 // PDF/A does not allow transparency
208
209 // transparent object occurred but is only supported since
210 // PDF 1.4
212
213 // a form action was exported that is not suitable for PDF/A
214 // the action was skipped
216
217 // transparent objects were converted to a bitmap in order
218 // to removetransparencies from the output
220
221 // signature generation failed
223 };
224
226 {
227 WidgetType Type; // primitive RTTI
228 public:
229 OUString Name; // a distinct name to identify the control
230 OUString Description;// descriptive text for the control (e.g. for tool tip)
231 OUString Text; // user text to appear on the control
232 DrawTextFlags TextStyle; // style flags
234 tools::Rectangle Location; // describes the area filled by the control
235 bool Border; // true: widget should have a border, false: no border
236 Color BorderColor;// COL_TRANSPARENT and Border=true means get color from application settings
237 bool Background; // true: widget shall draw its background, false: no background
238 Color BackgroundColor; // COL_TRANSPARENT and Background=true means get color from application settings
239 vcl::Font TextFont; // an empty font will be replaced by the
240 // appropriate font from the user settings
241 Color TextColor; // COL_TRANSPARENT will be replaced by the appropriate color from application settings
242 sal_Int32 TabOrder; // lowest number is first in tab order
243
244 /* style flags for text are those for OutputDevice::DrawText
245 allowed values are:
246 DrawTextFlags::Left, DrawTextFlags::Center, DrawTextFlags::Right, DrawTextFlags::Top,
247 DrawTextFlags::VCenter, DrawTextFlags::Bottom,
248 DrawTextFlags::MultiLine, DrawTextFlags::WordBreak
249
250 if TextStyle is 0, then each control will fill in default values
251 */
252
253 // note: the Name member comprises the field name of the resulting
254 // PDF field names need to be globally unique. Therefore if any
255 // Widget with an already used name is created, the name will be
256 // made unique by adding an underscore ('_') and an ascending number
257 // to the name.
258
260 Type( eType ),
261 TextStyle( DrawTextFlags::NONE ),
262 ReadOnly( false ),
263 Border( false ),
264 BorderColor( COL_TRANSPARENT ),
265 Background( false ),
266 BackgroundColor( COL_TRANSPARENT ),
267 TextColor( COL_TRANSPARENT ),
268 TabOrder( -1 )
269 {}
270 virtual ~AnyWidget();
271
272 WidgetType getType() const { return Type; }
273
274 virtual std::shared_ptr<AnyWidget> Clone() const = 0;
275
276 protected:
277 // note that this equals the default compiler-generated copy-ctor, but we want to have it
278 // protected, to only allow sub classes to access it
279 AnyWidget( const AnyWidget& rSource )
280 :Type( rSource.Type )
281 ,Name( rSource.Name )
282 ,Description( rSource.Description )
283 ,Text( rSource.Text )
284 ,TextStyle( rSource.TextStyle )
285 ,ReadOnly( rSource.ReadOnly )
286 ,Location( rSource.Location )
287 ,Border( rSource.Border )
288 ,BorderColor( rSource.BorderColor )
289 ,Background( rSource.Background )
290 ,BackgroundColor( rSource.BackgroundColor )
291 ,TextFont( rSource.TextFont )
292 ,TextColor( rSource.TextColor )
293 ,TabOrder( rSource.TabOrder )
294 {
295 }
296 AnyWidget& operator=( const AnyWidget& ) = delete; // never implemented
297 };
298
299 struct PushButtonWidget final : public AnyWidget
300 {
301 /* If Dest is set to a valid link destination,
302 Then pressing the button will act as a goto
303 action within the document.
304
305 Else:
306 An empty URL means this button will reset the form.
307
308 If URL is not empty and Submit is set, then the URL
309 contained will be set as the URL to submit the
310 form to. In this case the submit method will be
311 either GET if SubmitGet is true or POST if
312 SubmitGet is false.
313
314 If URL is not empty and Submit is clear, then
315 the URL contained will be interpreted as a
316 hyperlink to be executed on pushing the button.
317
318 There will be no error checking or any kind of
319 conversion done to the URL parameter execept this:
320 it will be output as 7bit Ascii. The URL
321 will appear literally in the PDF file produced
322 */
323 sal_Int32 Dest;
324 OUString URL;
325 bool Submit;
327
330 Dest( -1 ), Submit( false ), SubmitGet( false )
331 {}
332
333 virtual std::shared_ptr<AnyWidget> Clone() const override
334 {
335 return std::make_shared<PushButtonWidget>( *this );
336 }
337 };
338
340 {
342 OUString OnValue; // the value of the checkbox if it is selected
343 OUString OffValue; // the value of the checkbox if it is not selected
344
347 Checked( false )
348 {}
349
350 virtual std::shared_ptr<AnyWidget> Clone() const override
351 {
352 return std::make_shared<CheckBoxWidget>( *this );
353 }
354 };
355
356 struct RadioButtonWidget final : public AnyWidget
357 {
359 sal_Int32 RadioGroup;
360 OUString OnValue; // the value of the radio button if it is selected
361 OUString OffValue; // the value of the radio button if it is not selected
362
365 Selected( false ),
366 RadioGroup( 0 )
367 {}
368
369 virtual std::shared_ptr<AnyWidget> Clone() const override
370 {
371 return std::make_shared<RadioButtonWidget>( *this );
372 }
373 // radio buttons having the same RadioGroup id comprise one
374 // logical radio button group, that is at most one of the RadioButtons
375 // in a group can be checked at any time
376 //
377 // note: a PDF radio button field consists of a named field
378 // containing unnamed checkbox child fields. The name of the
379 // radio button field is taken from the first RadioButtonWidget created
380 // in the group
381 };
382
383 struct VCL_DLLPUBLIC EditWidget final : public AnyWidget
384 {
385 bool MultiLine; // whether multiple lines are allowed
386 bool Password; // visible echo off
387 bool FileSelect; // field is a file selector
388 sal_Int32 MaxLen; // maximum field length in characters, 0 means unlimited
393 OUString TimeFormat;
394 OUString DateFormat;
395
398 MultiLine( false ),
399 Password( false ),
400 FileSelect( false ),
401 MaxLen( 0 ),
403 DecimalAccuracy ( 0 ),
404 PrependCurrencySymbol( false )
405 {}
406
407 virtual std::shared_ptr<AnyWidget> Clone() const override
408 {
409 return std::make_shared<EditWidget>( *this );
410 }
411 };
412
414 {
417 std::vector<OUString> Entries;
418 std::vector<sal_Int32> SelectedEntries;
419 // if MultiSelect is false only the first entry of SelectedEntries
420 // will be taken into account. the same is implicit for PDF < 1.4
421 // since multiselect is a 1.4+ feature
422
425 DropDown( false ),
426 MultiSelect( false )
427 {}
428
429 virtual std::shared_ptr<AnyWidget> Clone() const override
430 {
431 return std::make_shared<ListBoxWidget>( *this );
432 }
433 };
434
435 // note: PDF only supports dropdown comboboxes
436 struct ComboBoxWidget final : public AnyWidget
437 {
438 std::vector<OUString> Entries;
439 // set the current value in AnyWidget::Text
440
443 {}
444
445 virtual std::shared_ptr<AnyWidget> Clone() const override
446 {
447 return std::make_shared<ComboBoxWidget>( *this );
448 }
449 };
450
451 struct SignatureWidget final : public AnyWidget
452 {
455 {}
456
457 virtual std::shared_ptr<AnyWidget> Clone() const override
458 {
459 return std::make_shared<SignatureWidget>( *this );
460 }
461 };
462
463 enum ExportDataFormat { HTML, XML, FDF, PDF };
464// see 3.6.1 of PDF 1.4 ref for details, used for 8.1 PDF v 1.4 ref also
465// These emuns are treated as integer while reading/writing to configuration
467 {
470 UseThumbs
471 };
472// These emuns are treated as integer while reading/writing to configuration
474 {
479 ActionZoom
480 };
481// These enums are treated as integer while reading/writing to configuration
483 {
487 ContinuousFacing
488 };
489
490 // These emuns are treated as integer while reading/writing to configuration
491 //what default action to generate in a PDF hyperlink to external document/site
493 {
496 LaunchAction
497 };
498
499/*
500The following structure describes the permissions used in PDF security
501 */
503 {
504
505 //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.
510 //for revision 3 (bit 128 security) only
515
516 // encryption will only happen if EncryptionKey is not empty
517 // EncryptionKey is actually a construct out of OValue, UValue and DocumentIdentifier
518 // if these do not match, behavior is undefined, most likely an invalid PDF will be produced
519 // OValue, UValue, EncryptionKey and DocumentIdentifier can be computed from
520 // PDFDocInfo, Owner password and User password used the InitEncryption method which
521 // implements the algorithms described in the PDF reference chapter 3.5: Encryption
522 std::vector<sal_uInt8> OValue;
523 std::vector<sal_uInt8> UValue;
524 std::vector<sal_uInt8> EncryptionKey;
525 std::vector<sal_uInt8> DocumentIdentifier;
526
527 //permission default set for 128 bit, accessibility only
529 CanPrintTheDocument ( false ),
530 CanModifyTheContent ( false ),
531 CanCopyOrExtract ( false ),
532 CanAddOrModify ( false ),
533 CanFillInteractive ( false ),
534 CanExtractForAccessibility ( true ),
535 CanAssemble ( false ),
536 CanPrintFull ( false )
537 {}
538
539
540 bool Encrypt() const
541 { return ! OValue.empty() && ! UValue.empty() && ! DocumentIdentifier.empty(); }
542 };
543
545 {
546 OUString Title; // document title
547 OUString Author; // document author
548 OUString Subject; // subject
549 OUString Keywords; // keywords
550 OUString Creator; // application that created the original document
551 OUString Producer; // OpenOffice
552 };
553
555 {
556 DrawColor, DrawGreyscale
557 };
558
560 {
561 /* must be a valid file: URL usable by osl */
562 OUString URL;
563 /* the URL of the document being exported, used for relative links*/
564 OUString BaseURL;
565 /*if relative to file system should be formed*/
566 bool RelFsys;//i56629, i49415?, i64585?
567 /*the action to set the PDF hyperlink to*/
569 //convert the .od? target file type in a link to a .pdf type
570 //this is examined before doing anything else
572 //when the file type is .pdf, force the GoToR action
574
575 /* decides the PDF language level to be produced */
577
578 /* PDF/UA compliance */
580
581 /* valid for PDF >= 1.4
582 causes the MarkInfo entry in the document catalog to be set
583 */
584 bool Tagged;
585 /* determines in which format a form
586 will be submitted.
587 */
590 /* the following data members are used to customize the PDF viewer
591 preferences
592 */
593 /* see 3.6.1 PDF v 1.4 ref*/
596 // in percent, valid only if PDFDocumentAction == ActionZoom
597 sal_Int32 Zoom;
598
599 /* see 8.6 PDF v 1.4 ref
600 specifies whether to hide the viewer tool
601 bars when the document is active.
602 */
612 // initially visible page in viewer (starting with 0 for first page)
613 sal_Int32 InitialPage;
614 sal_Int32 OpenBookmarkLevels; // -1 means all levels
615
618
620 OUString SignLocation;
621 OUString SignPassword;
622 OUString SignReason;
623 OUString SignContact;
624 css::lang::Locale DocumentLocale; // defines the document default language
625 sal_uInt32 DPIx, DPIy; // how to handle MapMode( MapUnit::MapPixel )
626 // 0 here specifies a default handling
628 css::uno::Reference< css::security::XCertificate> SignCertificate;
629 OUString SignTSA;
632
634 RelFsys( false ), //i56629, i49415?, i64585?
635 DefaultLinkAction( PDFWriter::URIAction ),
636 ConvertOOoTargetToPDFTarget( false ),
637 ForcePDFAction( false ),
638 Version( PDFWriter::PDFVersion::PDF_1_6 ),
639 UniversalAccessibilityCompliance( false ),
640 Tagged( false ),
641 SubmitFormat( PDFWriter::FDF ),
642 AllowDuplicateFieldNames( false ),
643 PDFDocumentMode( PDFWriter::ModeDefault ),
644 PDFDocumentAction( PDFWriter::ActionDefault ),
645 Zoom( 100 ),
646 HideViewerToolbar( false ),
647 HideViewerMenubar( false ),
648 HideViewerWindowControls( false ),
649 FitWindow( false ),
650 OpenInFullScreenMode( false ),
651 CenterWindow( false ),
652 DisplayPDFDocumentTitle( true ),
653 PageLayout( PDFWriter::DefaultLayout ),
654 FirstPageLeft( false ),
655 InitialPage( 1 ),
656 OpenBookmarkLevels( -1 ),
657 SignPDF( false ),
658 DPIx( 0 ),
659 DPIy( 0 ),
660 ColorMode( PDFWriter::DrawColor ),
661 UseReferenceXObject( false )
662 {}
663 };
664
665 PDFWriter( const PDFWriterContext& rContext, const css::uno::Reference< css::beans::XMaterialHolder >& );
666 ~PDFWriter();
667
675 OutputDevice* GetReferenceDevice();
676
685 void NewPage( double nPageWidth, double nPageHeight, Orientation eOrientation = Orientation::Inherit );
689 {
694
696 : m_nMaxImageResolution( 0 )
697 , m_bOnlyLosslessCompression( false )
698 , m_nJPEGQuality( 90 )
699 , m_bTransparenciesWereRemoved( false )
700 {}
701
702 };
703 void PlayMetafile( const GDIMetaFile&, const PlayMetafileContext&, vcl::PDFExtOutDevData* pDevDat = nullptr );
704
705 /* sets the document locale originally passed with the context to a new value
706 * only affects the output if used before calling Emit.
707 */
708 void SetDocumentLocale( const css::lang::Locale& rDocLocale );
709
710 /* finishes the file */
711 bool Emit();
712
713 /*
714 * Get a list of errors that occurred during processing
715 * this should enable the producer to give feedback about
716 * any anomalies that might have occurred
717 */
718 std::set< ErrorCode > const & GetErrors() const;
719
720 // uses 128bit encryption
721 static css::uno::Reference< css::beans::XMaterialHolder >
722 InitEncryption( const OUString& i_rOwnerPassword,
723 const OUString& i_rUserPassword
724 );
725
726 /* functions for graphics state */
727 /* flag values: see vcl/outdev.hxx */
728 void Push( PushFlags nFlags = PushFlags::ALL );
729 void Pop();
730
731 void SetClipRegion();
732 void SetClipRegion( const basegfx::B2DPolyPolygon& rRegion );
733 void MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove );
734 void IntersectClipRegion( const tools::Rectangle& rRect );
735 void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
736
737 void SetLayoutMode( vcl::text::ComplexTextLayoutFlags nMode );
738 void SetDigitLanguage( LanguageType eLang );
739
740 void SetLineColor( const Color& rColor );
742
743 void SetFillColor( const Color& rColor );
745
746 void SetFont( const vcl::Font& rNewFont );
747 void SetTextColor( const Color& rColor );
748 void SetTextFillColor();
749 void SetTextFillColor( const Color& rColor );
750
751 void SetTextLineColor();
752 void SetTextLineColor( const Color& rColor );
753 void SetOverlineColor();
754 void SetOverlineColor( const Color& rColor );
755 void SetTextAlign( ::TextAlign eAlign );
756
757 void SetMapMode( const MapMode& rNewMapMode );
758
759
760 /* actual drawing functions */
761 void DrawText( const Point& rPos, const OUString& rText );
762
763 void DrawTextLine( const Point& rPos, tools::Long nWidth,
764 FontStrikeout eStrikeout,
765 FontLineStyle eUnderline,
766 FontLineStyle eOverline );
767 void DrawTextArray( const Point& rStartPt, const OUString& rStr,
768 KernArraySpan aKernArray,
769 o3tl::span<const sal_Bool> pKashidaAry,
770 sal_Int32 nIndex,
771 sal_Int32 nLen );
772 void DrawStretchText( const Point& rStartPt, sal_Int32 nWidth,
773 const OUString& rStr,
774 sal_Int32 nIndex, sal_Int32 nLen );
775 void DrawText( const tools::Rectangle& rRect,
776 const OUString& rStr, DrawTextFlags nStyle );
777
778 void DrawPixel( const Point& rPt, const Color& rColor );
779 void DrawPixel( const Point& rPt )
780 { DrawPixel( rPt, COL_TRANSPARENT ); }
781
782 void DrawLine( const Point& rStartPt, const Point& rEndPt );
783 void DrawLine( const Point& rStartPt, const Point& rEndPt,
784 const LineInfo& rLineInfo );
785 void DrawPolyLine( const tools::Polygon& rPoly );
786 void DrawPolyLine( const tools::Polygon& rPoly,
787 const LineInfo& rLineInfo );
788 void DrawPolyLine( const tools::Polygon& rPoly, const ExtLineInfo& rInfo );
789 void DrawPolygon( const tools::Polygon& rPoly );
790 void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
791 void DrawRect( const tools::Rectangle& rRect );
792 void DrawRect( const tools::Rectangle& rRect,
793 sal_uLong nHorzRount, sal_uLong nVertRound );
794 void DrawEllipse( const tools::Rectangle& rRect );
795 void DrawArc( const tools::Rectangle& rRect,
796 const Point& rStartPt, const Point& rEndPt );
797 void DrawPie( const tools::Rectangle& rRect,
798 const Point& rStartPt, const Point& rEndPt );
799 void DrawChord( const tools::Rectangle& rRect,
800 const Point& rStartPt, const Point& rEndPt );
801
802 void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
803 const Bitmap& rBitmap, const Graphic& rGraphic );
804
805 void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
806 const BitmapEx& rBitmapEx );
807
808 void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
809 void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
810
811 void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
812
813 void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
814 void DrawTransparent( const tools::PolyPolygon& rPolyPoly,
815 sal_uInt16 nTransparencePercent );
816
835 void BeginTransparencyGroup();
836
848 void EndTransparencyGroup( const tools::Rectangle& rBoundRect, sal_uInt16 nTransparencePercent );
849
869 void DrawJPGBitmap( SvStream& rJPGData, bool bIsTrueColor, const Size& rSrcSizePixel, const tools::Rectangle& rTargetArea, const AlphaMask& rAlphaMask, const Graphic& rGraphic );
870
890 sal_Int32 CreateNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
907 sal_Int32 CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
922 sal_Int32 CreateLink(const tools::Rectangle& rRect, sal_Int32 nPageNr, OUString const& rAltText);
923
925 sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr);
926
949 sal_Int32 RegisterDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
950
951
961 void SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
972 void SetLinkURL( sal_Int32 nLinkId, const OUString& rURL );
973
975 void SetScreenURL(sal_Int32 nScreenId, const OUString& rURL);
977 void SetScreenStream(sal_Int32 nScreenId, const OUString& rURL);
978
1005 void SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyID );
1022 sal_Int32 CreateOutlineItem( sal_Int32 nParent, std::u16string_view rText, sal_Int32 nDestID );
1023
1037 void CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr );
1038
1081 sal_Int32 BeginStructureElement( enum StructElement eType, std::u16string_view rAlias );
1089 void EndStructureElement();
1102 void SetCurrentStructureElement( sal_Int32 nElement );
1103
1117 void SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal );
1131 void SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue );
1142 void SetStructureBoundingBox( const tools::Rectangle& rRect );
1143
1154 void SetActualText( const OUString& rText );
1155
1165 void SetAlternateText( const OUString& rText );
1166
1180 void SetPageTransition( PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr );
1181
1194 sal_Int32 CreateControl( const AnyWidget& rControlType );
1195
1213 void AddAttachedFile(OUString const& rFileName, const OUString& rMimeType, std::unique_ptr<PDFOutputStream> pStream);
1214
1216 static void AppendUnicodeTextString(const OUString& rString, OStringBuffer& rBuffer);
1217
1219 static OString GetDateTime();
1220};
1221
1222VCL_DLLPUBLIC void escapeStringXML( const OUString& rStr, OUString &rValue);
1223
1224}
1225
1226#endif // INCLUDED_VCL_PDFWRITER_HXX
1227
1228/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOColumn Column
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:741
PDFWriter & operator=(const PDFWriter &)=delete
PDFWriter(const PDFWriter &)=delete
@ Warning_Transparency_Omitted_PDFA
Definition: pdfwriter.hxx:207
@ Warning_Transparency_Omitted_PDF13
Definition: pdfwriter.hxx:211
@ Warning_Transparency_Converted
Definition: pdfwriter.hxx:219
@ Warning_FormAction_Omitted_PDFA
Definition: pdfwriter.hxx:215
void SetFillColor()
Definition: pdfwriter.hxx:744
void DrawPixel(const Point &rPt)
Definition: pdfwriter.hxx:779
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
NONE
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
Type
Reference
Regular
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:2354
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 =0
tools::Rectangle Location
Definition: pdfwriter.hxx:234
WidgetType getType() const
Definition: pdfwriter.hxx:272
AnyWidget & operator=(const AnyWidget &)=delete
AnyWidget(const AnyWidget &rSource)
Definition: pdfwriter.hxx:279
AnyWidget(WidgetType eType)
Definition: pdfwriter.hxx:259
virtual std::shared_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:350
virtual std::shared_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:445
std::vector< OUString > Entries
Definition: pdfwriter.hxx:438
virtual std::shared_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:407
std::vector< double > m_aDashArray
Definition: pdfwriter.hxx:96
std::vector< OUString > Entries
Definition: pdfwriter.hxx:417
std::vector< sal_Int32 > SelectedEntries
Definition: pdfwriter.hxx:418
virtual std::shared_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:429
std::vector< sal_uInt8 > UValue
Definition: pdfwriter.hxx:523
std::vector< sal_uInt8 > DocumentIdentifier
Definition: pdfwriter.hxx:525
std::vector< sal_uInt8 > EncryptionKey
Definition: pdfwriter.hxx:524
std::vector< sal_uInt8 > OValue
Definition: pdfwriter.hxx:522
PDFWriter::PDFLinkDefaultAction DefaultLinkAction
Definition: pdfwriter.hxx:568
PDFWriter::ExportDataFormat SubmitFormat
Definition: pdfwriter.hxx:588
css::uno::Reference< css::security::XCertificate > SignCertificate
Definition: pdfwriter.hxx:628
bool UseReferenceXObject
Use reference XObject markup for PDF images.
Definition: pdfwriter.hxx:631
PDFWriter::PDFViewerPageMode PDFDocumentMode
Definition: pdfwriter.hxx:594
PDFWriter::PDFViewerAction PDFDocumentAction
Definition: pdfwriter.hxx:595
PDFWriter::PDFEncryptionProperties Encryption
Definition: pdfwriter.hxx:616
PDFWriter::PDFDocInfo DocumentInfo
Definition: pdfwriter.hxx:617
PDFWriter::ColorMode ColorMode
Definition: pdfwriter.hxx:627
css::lang::Locale DocumentLocale
Definition: pdfwriter.hxx:624
Play a metafile like an outputdevice would do.
Definition: pdfwriter.hxx:689
virtual std::shared_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:333
virtual std::shared_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:369
virtual std::shared_ptr< AnyWidget > Clone() const override
Definition: pdfwriter.hxx:457
OUString Name