1 //========================================================================
3 // StdinPDFDocBuilder.cc
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 //========================================================================
14 #include "StdinPDFDocBuilder.h"
15 #include "CachedFile.h"
16 #include "StdinCachedFile.h"
18 //------------------------------------------------------------------------
20 //------------------------------------------------------------------------
23 StdinPDFDocBuilder::buildPDFDoc(const GooString
&uri
, GooString
*ownerPassword
,
24 GooString
*userPassword
, void *guiDataA
)
29 CachedFile
*cachedFile
= new CachedFile(new StdinCacheLoader(), NULL
);
30 return new PDFDoc(new CachedFileStream(cachedFile
, 0, gFalse
,
31 cachedFile
->getLength(), &obj
),
32 ownerPassword
, userPassword
);
35 GBool
StdinPDFDocBuilder::supports(const GooString
&uri
)
37 if (uri
.cmpN("fd://0", 6) == 0) {