1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef MOZILLA_GFX_PRINTTARGETPDF_H
7 #define MOZILLA_GFX_PRINTTARGETPDF_H
10 #include "nsIOutputStream.h"
11 #include "PrintTarget.h"
17 * PDF printing target.
19 class PrintTargetPDF final
: public PrintTarget
{
21 static already_AddRefed
<PrintTargetPDF
> CreateOrNull(
22 nsIOutputStream
* aStream
, const IntSize
& aSizeInPoints
);
24 nsresult
EndPage() override
;
25 void Finish() override
;
28 PrintTargetPDF(cairo_surface_t
* aCairoSurface
, const IntSize
& aSize
,
29 nsIOutputStream
* aStream
);
30 virtual ~PrintTargetPDF();
32 nsCOMPtr
<nsIOutputStream
> mStream
;
36 } // namespace mozilla
38 #endif /* MOZILLA_GFX_PRINTTARGETPDF_H */