2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-31 09:20:52 +00:00
git-svn-id: svn+q:///qpdf/trunk@1033 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2010-09-24 20:47:58 +00:00
parent 88706995c8
commit 359999a59c

38
TODO
View File

@ -1,3 +1,41 @@
2.2.1
=====
Add interface for working with in-memory PDF files. Here's some code
to work with.
Pl_Buffer b("b");
FILE* f = QUtil::fopen_wrapper(std::string("open ") + filename,
fopen(filename, "rb"));
unsigned char buf[1024];
size_t bytes_read = 0;
while (true)
{
size_t len = fread(buf, 1, sizeof(buf), f);
if (len == 0)
{
if (ferror(f))
{
throw QPDFExc(qpdf_e_system,
filename, "",
0,
"read");
}
else
{
b.finish();
break;
}
}
else
{
b.write(buf, len);
bytes_read += len;
}
}
fclose(f);
this->file = new BufferInputSource(filename, b.getBuffer());
General
=======