19 #ifndef INCLUDED_VCL_PDFWRITER_HXX
20 #define INCLUDED_VCL_PDFWRITER_HXX
22 #include <config_options.h>
27 #include <rtl/strbuf.hxx>
34 #include <com/sun/star/lang/Locale.hpp>
35 #include <com/sun/star/util/DateTime.hpp>
61 class PDFExtOutDevData;
75 virtual void write(
const css::uno::Reference< css::io::XOutputStream >&
xStream ) = 0;
87 enum CapType { capButt, capRound, capSquare };
88 enum JoinType { joinMiter, joinRound, joinBevel };
99 m_fTransparency( 0.0 ),
101 m_eJoin( joinMiter ),
102 m_fMiterLimit( 10.0 )
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 };
138 Placement,
WritingMode, SpaceBefore, SpaceAfter, StartIndent, EndIndent,
182 SplitHorizontalInward, SplitHorizontalOutward,
183 SplitVerticalInward, SplitVerticalOutward,
184 BlindsHorizontal, BlindsVertical,
185 BoxInward, BoxOutward,
186 WipeLeftToRight, WipeBottomToTop, WipeRightToLeft, WipeTopToBottom,
218 struct UNLESS_MERGELIBS(VCL_DLLPUBLIC) AnyWidget
231 Color BackgroundColor;
263 virtual ~AnyWidget();
267 virtual std::shared_ptr<AnyWidget>
Clone()
const = 0;
272 AnyWidget(
const AnyWidget& rSource )
273 :Type( rSource.Type )
274 ,Name( rSource.Name )
275 ,Description( rSource.Description )
276 ,Text( rSource.Text )
277 ,TextStyle( rSource.TextStyle )
278 ,ReadOnly( rSource.ReadOnly )
279 ,Location( rSource.Location )
280 ,Border( rSource.Border )
281 ,BorderColor( rSource.BorderColor )
282 ,Background( rSource.Background )
283 ,BackgroundColor( rSource.BackgroundColor )
284 ,TextFont( rSource.TextFont )
285 ,TextColor( rSource.TextColor )
286 ,TabOrder( rSource.TabOrder )
289 AnyWidget& operator=(
const AnyWidget& );
323 Dest( -1 ), Submit( false ), SubmitGet( false )
326 virtual std::shared_ptr<AnyWidget>
Clone()
const override
328 return std::make_shared<PushButtonWidget>( *this );
341 virtual std::shared_ptr<AnyWidget>
Clone()
const override
343 return std::make_shared<CheckBoxWidget>( *this );
359 virtual std::shared_ptr<AnyWidget>
Clone()
const override
361 return std::make_shared<RadioButtonWidget>( *this );
388 virtual std::shared_ptr<AnyWidget>
Clone()
const override
390 return std::make_shared<EditWidget>( *this );
410 virtual std::shared_ptr<AnyWidget>
Clone()
const override
412 return std::make_shared<ListBoxWidget>( *this );
426 virtual std::shared_ptr<AnyWidget>
Clone()
const override
428 return std::make_shared<ComboBoxWidget>( *this );
438 virtual std::shared_ptr<AnyWidget>
Clone()
const override
440 return std::make_shared<SignatureWidget>( *this );
510 CanPrintTheDocument ( false ),
511 CanModifyTheContent ( false ),
512 CanCopyOrExtract ( false ),
513 CanAddOrModify ( false ),
514 CanFillInteractive ( false ),
515 CanExtractForAccessibility ( true ),
516 CanAssemble ( false ),
517 CanPrintFull ( false )
522 {
return ! OValue.empty() && ! UValue.empty() && ! DocumentIdentifier.empty(); }
537 DrawColor, DrawGreyscale
616 DefaultLinkAction(
PDFWriter::URIAction ),
617 ConvertOOoTargetToPDFTarget( false ),
618 ForcePDFAction( false ),
620 UniversalAccessibilityCompliance( false ),
623 AllowDuplicateFieldNames( false ),
624 PDFDocumentMode(
PDFWriter::ModeDefault ),
625 PDFDocumentAction(
PDFWriter::ActionDefault ),
627 HideViewerToolbar( false ),
628 HideViewerMenubar( false ),
629 HideViewerWindowControls( false ),
631 OpenInFullScreenMode( false ),
632 CenterWindow( false ),
633 DisplayPDFDocumentTitle( true ),
635 FirstPageLeft( false ),
637 OpenBookmarkLevels( -1 ),
643 UseReferenceXObject( false )
647 PDFWriter(
const PDFWriterContext& rContext,
const css::uno::Reference< css::beans::XMaterialHolder >& );
667 void NewPage(
double nPageWidth,
double nPageHeight,
Orientation eOrientation = Orientation::Inherit );
678 : m_nMaxImageResolution( 0 )
679 , m_bOnlyLosslessCompression( false )
680 , m_nJPEGQuality( 90 )
681 , m_bTransparenciesWereRemoved( false )
690 void SetDocumentLocale(
const css::lang::Locale& rDocLocale );
700 std::set< ErrorCode >
const & GetErrors()
const;
703 static css::uno::Reference< css::beans::XMaterialHolder >
704 InitEncryption(
const OUString& i_rOwnerPassword,
705 const OUString& i_rUserPassword
713 void SetClipRegion();
725 void SetFillColor(
const Color& rColor );
728 void SetFont(
const vcl::Font& rNewFont );
729 void SetTextColor(
const Color& rColor );
730 void SetTextFillColor();
731 void SetTextFillColor(
const Color& rColor );
733 void SetTextLineColor();
734 void SetTextLineColor(
const Color& rColor );
735 void SetOverlineColor();
736 void SetOverlineColor(
const Color& rColor );
739 void SetMapMode(
const MapMode& rNewMapMode );
743 void DrawText(
const Point& rPos,
const OUString& rText );
745 void DrawTextLine(
const Point& rPos,
tools::Long nWidth,
749 void DrawTextArray(
const Point& rStartPt,
const OUString& rStr,
753 void DrawStretchText(
const Point& rStartPt,
sal_uLong nWidth,
754 const OUString& rStr,
755 sal_Int32 nIndex, sal_Int32 nLen );
759 void DrawPixel(
const Point& rPt,
const Color& rColor );
763 void DrawLine(
const Point& rStartPt,
const Point& rEndPt );
764 void DrawLine(
const Point& rStartPt,
const Point& rEndPt,
769 void DrawPolyLine(
const tools::Polygon& rPoly,
const ExtLineInfo& rInfo );
777 const Point& rStartPt,
const Point& rEndPt );
779 const Point& rStartPt,
const Point& rEndPt );
781 const Point& rStartPt,
const Point& rEndPt );
783 void DrawBitmap(
const Point& rDestPt,
const Size& rDestSize,
786 void DrawBitmapEx(
const Point& rDestPt,
const Size& rDestSize,
796 sal_uInt16 nTransparencePercent );
816 void BeginTransparencyGroup();
829 void EndTransparencyGroup(
const tools::Rectangle& rBoundRect, sal_uInt16 nTransparencePercent );
871 sal_Int32 CreateNamedDest(
const OUString& sDestName,
const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
888 sal_Int32 CreateDest(
const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
930 sal_Int32 RegisterDestReference( sal_Int32 nDestId,
const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType );
942 void SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
953 void SetLinkURL( sal_Int32 nLinkId,
const OUString& rURL );
956 void SetScreenURL(sal_Int32 nScreenId,
const OUString& rURL);
958 void SetScreenStream(sal_Int32 nScreenId,
const OUString& rURL);
986 void SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyID );
1003 sal_Int32 CreateOutlineItem( sal_Int32 nParent,
const OUString& rText, sal_Int32 nDestID );
1062 sal_Int32 BeginStructureElement(
enum StructElement eType,
const OUString& rAlias );
1070 void EndStructureElement();
1083 void SetCurrentStructureElement( sal_Int32 nElement );
1098 void SetStructureAttribute(
enum StructAttribute eAttr,
enum StructAttributeValue eVal );
1112 void SetStructureAttributeNumerical(
enum StructAttribute eAttr, sal_Int32 nValue );
1135 void SetActualText(
const OUString& rText );
1146 void SetAlternateText(
const OUString& rText );
1161 void SetPageTransition( PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr );
1175 sal_Int32 CreateControl(
const AnyWidget& rControlType );
1194 void AddStream(
const OUString& rMimeType,
PDFOutputStream* pStream );
1197 static void AppendUnicodeTextString(
const OUString& rString, OStringBuffer& rBuffer);
1205 #endif // INCLUDED_VCL_PDFWRITER_HXX
PDFWriter::PDFViewerAction PDFDocumentAction
bool UseReferenceXObject
Use reference XObject markup for PDF images.
bool HideViewerWindowControls
void DrawPixel(const Point &rPt)
bool getType(BSTR name, Type &type)
A widget used to choose from a list of items and which has no entry.
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
PDFWriter::ExportDataFormat SubmitFormat
bool OpenInFullScreenMode
css::uno::Reference< css::security::XCertificate > SignCertificate
bool ConvertOOoTargetToPDFTarget
bool CanExtractForAccessibility
css::util::DateTime maModificationDate
PDFWriter::PDFDocInfo DocumentInfo
DateTime GetDateTime(const css::util::DateTime &_rDT)
bool m_bTransparenciesWereRemoved
PDFWriter::ColorMode ColorMode
Play a metafile like an outputdevice would do.
std::vector< sal_uInt8 > DocumentIdentifier
sal_Int32 OpenBookmarkLevels
int m_nMaxImageResolution
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
bool DisplayPDFDocumentTitle
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
bool m_bOnlyLosslessCompression
PDFWriter::PDFEncryptionProperties Encryption
std::vector< sal_uInt8 > EncryptionKey
bool UniversalAccessibilityCompliance
PDFEncryptionProperties()
ScopedVclPtr< PDFWriterImpl > xImplementation
SQLUSMALLINT SQLCHAR SQLSMALLINT SQLSMALLINT SQLCHAR * Description
PDFWriter::PDFLinkDefaultAction DefaultLinkAction
A widget used to choose from a list of items and which has an entry.
std::vector< double > m_aDashArray
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
PDFWriter::PDFViewerPageMode PDFDocumentMode
bool AllowDuplicateFieldNames
std::vector< sal_uInt8 > UValue
css::lang::Locale DocumentLocale
std::vector< sal_uInt8 > OValue