1 //========================================================================
5 // This file is licensed under the GPLv2 or later
7 // Copyright 2010 Hib Eris <hib@hiberis.nl>
8 // Copyright 2010 Albert Astals Cid <aacid@kde.org>
10 //========================================================================
12 #ifndef PDFDOCFACTORY_H
13 #define PDFDOCFACTORY_H
21 //------------------------------------------------------------------------
24 // PDFDocFactory allows the construction of PDFDocs from different URIs.
26 // By default, it supports local files, 'file://' and 'fd:0' (stdin). When
27 // compiled with libcurl, it also supports 'http://' and 'https://'.
29 // You can extend the supported URIs by giving a list of PDFDocBuilders to
30 // the constructor, or by registering a new PDFDocBuilder afterwards.
31 //------------------------------------------------------------------------
37 PDFDocFactory(GooList
*pdfDocBuilders
= NULL
);
40 // Create a PDFDoc. Returns a PDFDoc. You should check this PDFDoc
41 // with PDFDoc::isOk() for failures.
42 // The caller is responsible for deleting ownerPassword, userPassWord and guiData.
43 PDFDoc
*createPDFDoc(const GooString
&uri
, GooString
*ownerPassword
= NULL
,
44 GooString
*userPassword
= NULL
, void *guiDataA
= NULL
);
46 // Extend supported URIs with the ones from the PDFDocBuilder.
47 void registerPDFDocBuilder(PDFDocBuilder
*pdfDocBuilder
);
55 #endif /* PDFDOCFACTORY_H */