mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-31 14:01:59 +00:00
update C API for error retrieval
git-svn-id: svn+q:///qpdf/trunk@830 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
3f8c4c2736
commit
398354b6f0
@ -1,5 +1,9 @@
|
|||||||
2009-10-19 Jay Berkenbilt <jberkenb@argonst.com>
|
2009-10-19 Jay Berkenbilt <jberkenb@argonst.com>
|
||||||
|
|
||||||
|
* include/qpdf/QPDF.hh (QPDF): getWarnings now returns a list of
|
||||||
|
QPDFExc rather than a list of strings. This way, warnings may be
|
||||||
|
inspected in more detail.
|
||||||
|
|
||||||
* Include information about the last object read in most error
|
* Include information about the last object read in most error
|
||||||
messages. Most of the time, this will provide a good hint as to
|
messages. Most of the time, this will provide a good hint as to
|
||||||
which object contains the error, but it's possible that the last
|
which object contains the error, but it's possible that the last
|
||||||
|
@ -24,6 +24,7 @@ int main(int argc, char* argv[])
|
|||||||
int warnings = 0;
|
int warnings = 0;
|
||||||
int errors = 0;
|
int errors = 0;
|
||||||
char* p = 0;
|
char* p = 0;
|
||||||
|
qpdf_error e = 0;
|
||||||
|
|
||||||
if ((p = strrchr(argv[0], '/')) != NULL)
|
if ((p = strrchr(argv[0], '/')) != NULL)
|
||||||
{
|
{
|
||||||
@ -53,12 +54,14 @@ int main(int argc, char* argv[])
|
|||||||
while (qpdf_more_warnings(qpdf))
|
while (qpdf_more_warnings(qpdf))
|
||||||
{
|
{
|
||||||
warnings = 1;
|
warnings = 1;
|
||||||
printf("warning: %s\n", qpdf_next_warning(qpdf));
|
printf("warning: %s\n",
|
||||||
|
qpdf_get_error_full_text(qpdf, qpdf_next_warning(qpdf)));
|
||||||
}
|
}
|
||||||
while (qpdf_more_errors(qpdf))
|
e = qpdf_get_error(qpdf);
|
||||||
|
if (e)
|
||||||
{
|
{
|
||||||
errors = 1;
|
errors = 1;
|
||||||
printf("error: %s\n", qpdf_next_error(qpdf));
|
printf("error: %s\n", qpdf_get_error_full_text(qpdf, e));
|
||||||
}
|
}
|
||||||
qpdf_cleanup(&qpdf);
|
qpdf_cleanup(&qpdf);
|
||||||
if (errors)
|
if (errors)
|
||||||
|
@ -70,7 +70,7 @@ class DLL_EXPORT QPDF
|
|||||||
// throws an exception. Note that if setSuppressWarnings was not
|
// throws an exception. Note that if setSuppressWarnings was not
|
||||||
// called or was called with a false value, any warnings retrieved
|
// called or was called with a false value, any warnings retrieved
|
||||||
// here will have already been issued to stderr.
|
// here will have already been issued to stderr.
|
||||||
std::vector<std::string> getWarnings();
|
std::vector<QPDFExc> getWarnings();
|
||||||
|
|
||||||
std::string getFilename() const;
|
std::string getFilename() const;
|
||||||
std::string getPDFVersion() const;
|
std::string getPDFVersion() const;
|
||||||
@ -761,7 +761,7 @@ class DLL_EXPORT QPDF
|
|||||||
std::map<ObjGen, ObjCache> obj_cache;
|
std::map<ObjGen, ObjCache> obj_cache;
|
||||||
QPDFObjectHandle trailer;
|
QPDFObjectHandle trailer;
|
||||||
std::vector<QPDFObjectHandle> all_pages;
|
std::vector<QPDFObjectHandle> all_pages;
|
||||||
std::vector<std::string> warnings;
|
std::vector<QPDFExc> warnings;
|
||||||
|
|
||||||
// Linearization data
|
// Linearization data
|
||||||
int first_xref_item_offset; // actual value from file
|
int first_xref_item_offset; // actual value from file
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <qpdf/DLL.h>
|
#include <qpdf/DLL.h>
|
||||||
#include <qpdf/Constants.h>
|
#include <qpdf/Constants.h>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <stddef.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
class DLL_EXPORT QPDFExc: public std::runtime_error
|
class DLL_EXPORT QPDFExc: public std::runtime_error
|
||||||
{
|
{
|
||||||
@ -36,8 +36,8 @@ class DLL_EXPORT QPDFExc: public std::runtime_error
|
|||||||
qpdf_error_code_e getErrorCode() const;
|
qpdf_error_code_e getErrorCode() const;
|
||||||
std::string const& getFilename() const;
|
std::string const& getFilename() const;
|
||||||
std::string const& getObject() const;
|
std::string const& getObject() const;
|
||||||
off_t getOffset() const;
|
off_t getFilePosition() const;
|
||||||
std::string const& getMessage() const;
|
std::string const& getMessageDetail() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::string createWhat(std::string const& filename,
|
static std::string createWhat(std::string const& filename,
|
||||||
|
@ -63,12 +63,14 @@
|
|||||||
|
|
||||||
#include <qpdf/DLL.h>
|
#include <qpdf/DLL.h>
|
||||||
#include <qpdf/Constants.h>
|
#include <qpdf/Constants.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _qpdf_data* qpdf_data;
|
typedef struct _qpdf_data* qpdf_data;
|
||||||
|
typedef struct _qpdf_error* qpdf_error;
|
||||||
|
|
||||||
/* Many functions return an integer error code. Codes are defined
|
/* Many functions return an integer error code. Codes are defined
|
||||||
* below. See comments at the top of the file for details. Note
|
* below. See comments at the top of the file for details. Note
|
||||||
@ -97,21 +99,42 @@ extern "C" {
|
|||||||
|
|
||||||
/* ERROR REPORTING */
|
/* ERROR REPORTING */
|
||||||
|
|
||||||
/* Returns 1 if there are any errors or warnings, and zero
|
/* Returns the error condition, if any. The return value is a
|
||||||
|
* pointer to data that will become invalid the next time an error
|
||||||
|
* occurs or after this function is called gain.
|
||||||
|
*/
|
||||||
|
DLL_EXPORT
|
||||||
|
qpdf_error qpdf_get_error(qpdf_data qpdf);
|
||||||
|
|
||||||
|
/* Returns 1 if there are any unretrieved warnings, and zero
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT
|
DLL_EXPORT
|
||||||
QPDF_BOOL qpdf_more_errors(qpdf_data qpdf);
|
|
||||||
DLL_EXPORT
|
|
||||||
QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf);
|
QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf);
|
||||||
|
|
||||||
/* If there are any errors/warnings, returns a pointer to the next
|
/* If there are any warnings, returns a pointer to the next
|
||||||
* error or warning. Otherwise returns a null pointer.
|
* warning. Otherwise returns a null pointer.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT
|
DLL_EXPORT
|
||||||
char const* qpdf_next_error(qpdf_data qpdf);
|
qpdf_error qpdf_next_warning(qpdf_data qpdf);
|
||||||
|
|
||||||
|
/* Extract fields of the error. */
|
||||||
|
|
||||||
|
/* Use this function to get a full error message suitable for
|
||||||
|
* showing to the user. */
|
||||||
DLL_EXPORT
|
DLL_EXPORT
|
||||||
char const* qpdf_next_warning(qpdf_data qpdf);
|
char const* qpdf_get_error_full_text(qpdf_data q, qpdf_error e);
|
||||||
|
|
||||||
|
/* Use these functions to extract individual fields from the
|
||||||
|
* error; see QPDFExc.hh for details. */
|
||||||
|
DLL_EXPORT
|
||||||
|
enum qpdf_error_code_e qpdf_get_error_code(qpdf_data q, qpdf_error e);
|
||||||
|
DLL_EXPORT
|
||||||
|
char const* qpdf_get_error_filename(qpdf_data q, qpdf_error e);
|
||||||
|
DLL_EXPORT
|
||||||
|
off_t qpdf_get_error_file_position(qpdf_data q, qpdf_error e);
|
||||||
|
DLL_EXPORT
|
||||||
|
char const* qpdf_get_error_message_detail(qpdf_data q, qpdf_error e);
|
||||||
|
|
||||||
/* By default, warnings are written to stderr. Passing true to
|
/* By default, warnings are written to stderr. Passing true to
|
||||||
* this function will prevent warnings from being written to
|
* this function will prevent warnings from being written to
|
||||||
|
@ -300,10 +300,10 @@ QPDF::setAttemptRecovery(bool val)
|
|||||||
this->attempt_recovery = val;
|
this->attempt_recovery = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string>
|
std::vector<QPDFExc>
|
||||||
QPDF::getWarnings()
|
QPDF::getWarnings()
|
||||||
{
|
{
|
||||||
std::vector<std::string> result = this->warnings;
|
std::vector<QPDFExc> result = this->warnings;
|
||||||
this->warnings.clear();
|
this->warnings.clear();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -397,10 +397,10 @@ QPDF::parse()
|
|||||||
void
|
void
|
||||||
QPDF::warn(QPDFExc const& e)
|
QPDF::warn(QPDFExc const& e)
|
||||||
{
|
{
|
||||||
this->warnings.push_back(e.what());
|
this->warnings.push_back(e);
|
||||||
if (! this->suppress_warnings)
|
if (! this->suppress_warnings)
|
||||||
{
|
{
|
||||||
std::cerr << "WARNING: " << this->warnings.back() << std::endl;
|
std::cerr << "WARNING: " << this->warnings.back().what() << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +424,7 @@ QPDF::reconstruct_xref(QPDFExc& e)
|
|||||||
warn(QPDFExc(qpdf_e_damaged_pdf, this->file.getName(), "", 0,
|
warn(QPDFExc(qpdf_e_damaged_pdf, this->file.getName(), "", 0,
|
||||||
"file is damaged"));
|
"file is damaged"));
|
||||||
warn(e);
|
warn(e);
|
||||||
warn(QPDFExc(qpdf_e_damaged_pdf, "", "", 0,
|
warn(QPDFExc(qpdf_e_damaged_pdf, this->file.getName(), "", 0,
|
||||||
"Attempting to reconstruct cross-reference table"));
|
"Attempting to reconstruct cross-reference table"));
|
||||||
|
|
||||||
// Delete all references to type 1 (uncompressed) objects
|
// Delete all references to type 1 (uncompressed) objects
|
||||||
|
@ -54,3 +54,33 @@ QPDFExc::createWhat(std::string const& filename,
|
|||||||
result += message;
|
result += message;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qpdf_error_code_e
|
||||||
|
QPDFExc::getErrorCode() const
|
||||||
|
{
|
||||||
|
return this->error_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string const&
|
||||||
|
QPDFExc::getFilename() const
|
||||||
|
{
|
||||||
|
return this->filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string const&
|
||||||
|
QPDFExc::getObject() const
|
||||||
|
{
|
||||||
|
return this->object;
|
||||||
|
}
|
||||||
|
|
||||||
|
off_t
|
||||||
|
QPDFExc::getFilePosition() const
|
||||||
|
{
|
||||||
|
return this->offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string const&
|
||||||
|
QPDFExc::getMessageDetail() const
|
||||||
|
{
|
||||||
|
return this->message;
|
||||||
|
}
|
||||||
|
@ -3,11 +3,17 @@
|
|||||||
#include <qpdf/QPDF.hh>
|
#include <qpdf/QPDF.hh>
|
||||||
#include <qpdf/QPDFWriter.hh>
|
#include <qpdf/QPDFWriter.hh>
|
||||||
#include <qpdf/QTC.hh>
|
#include <qpdf/QTC.hh>
|
||||||
|
#include <qpdf/QPDFExc.hh>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
struct _qpdf_error
|
||||||
|
{
|
||||||
|
PointerHolder<QPDFExc> exc;
|
||||||
|
};
|
||||||
|
|
||||||
struct _qpdf_data
|
struct _qpdf_data
|
||||||
{
|
{
|
||||||
_qpdf_data();
|
_qpdf_data();
|
||||||
@ -16,9 +22,22 @@ struct _qpdf_data
|
|||||||
QPDF* qpdf;
|
QPDF* qpdf;
|
||||||
QPDFWriter* qpdf_writer;
|
QPDFWriter* qpdf_writer;
|
||||||
|
|
||||||
std::string error;
|
PointerHolder<QPDFExc> error;
|
||||||
std::list<std::string> warnings;
|
_qpdf_error tmp_error;
|
||||||
|
std::list<QPDFExc> warnings;
|
||||||
std::string tmp_string;
|
std::string tmp_string;
|
||||||
|
|
||||||
|
// Parameters for functions we call
|
||||||
|
char const* filename;
|
||||||
|
char const* password;
|
||||||
|
|
||||||
|
// must set filename and password
|
||||||
|
void call_read();
|
||||||
|
|
||||||
|
// must set filename
|
||||||
|
void call_init_write();
|
||||||
|
|
||||||
|
void call_write();
|
||||||
};
|
};
|
||||||
|
|
||||||
_qpdf_data::_qpdf_data() :
|
_qpdf_data::_qpdf_data() :
|
||||||
@ -33,6 +52,65 @@ _qpdf_data::~_qpdf_data()
|
|||||||
delete qpdf;
|
delete qpdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_qpdf_data::call_read()
|
||||||
|
{
|
||||||
|
qpdf->processFile(filename, password);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_qpdf_data::call_init_write()
|
||||||
|
{
|
||||||
|
if (qpdf_writer)
|
||||||
|
{
|
||||||
|
QTC::TC("qpdf", "qpdf-c called qpdf_init_write multiple times");
|
||||||
|
delete qpdf_writer;
|
||||||
|
qpdf_writer = 0;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
qpdf_writer = new QPDFWriter(*qpdf, filename);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_qpdf_data::call_write()
|
||||||
|
{
|
||||||
|
qpdf_writer->write();
|
||||||
|
}
|
||||||
|
|
||||||
|
static QPDF_ERROR_CODE trap_errors(qpdf_data qpdf, void (_qpdf_data::*fn)())
|
||||||
|
{
|
||||||
|
QPDF_ERROR_CODE status = QPDF_SUCCESS;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
(qpdf->*fn)();
|
||||||
|
}
|
||||||
|
catch (QPDFExc& e)
|
||||||
|
{
|
||||||
|
qpdf->error = new QPDFExc(e);
|
||||||
|
status |= QPDF_ERRORS;
|
||||||
|
}
|
||||||
|
catch (std::runtime_error& e)
|
||||||
|
{
|
||||||
|
qpdf->error = new QPDFExc(qpdf_e_system, "", "", 0, e.what());
|
||||||
|
}
|
||||||
|
catch (std::exception& e)
|
||||||
|
{
|
||||||
|
qpdf->error = new QPDFExc(qpdf_e_internal, "", "", 0, e.what());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (qpdf_more_warnings(qpdf))
|
||||||
|
{
|
||||||
|
status |= QPDF_WARNINGS;
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
qpdf_data qpdf_init()
|
qpdf_data qpdf_init()
|
||||||
{
|
{
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_init");
|
QTC::TC("qpdf", "qpdf-c called qpdf_init");
|
||||||
@ -48,19 +126,13 @@ void qpdf_cleanup(qpdf_data* qpdf)
|
|||||||
*qpdf = 0;
|
*qpdf = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPDF_BOOL qpdf_more_errors(qpdf_data qpdf)
|
|
||||||
{
|
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_more_errors");
|
|
||||||
return (qpdf->error.empty() ? QPDF_FALSE : QPDF_TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf)
|
QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf)
|
||||||
{
|
{
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_more_warnings");
|
QTC::TC("qpdf", "qpdf-c called qpdf_more_warnings");
|
||||||
|
|
||||||
if (qpdf->warnings.empty())
|
if (qpdf->warnings.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> w = qpdf->qpdf->getWarnings();
|
std::vector<QPDFExc> w = qpdf->qpdf->getWarnings();
|
||||||
if (! w.empty())
|
if (! w.empty())
|
||||||
{
|
{
|
||||||
qpdf->warnings.assign(w.begin(), w.end());
|
qpdf->warnings.assign(w.begin(), w.end());
|
||||||
@ -76,14 +148,14 @@ QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char const* qpdf_next_error(qpdf_data qpdf)
|
qpdf_error qpdf_get_error(qpdf_data qpdf)
|
||||||
{
|
{
|
||||||
if (qpdf_more_errors(qpdf))
|
if (qpdf->error.getPointer())
|
||||||
{
|
{
|
||||||
qpdf->tmp_string = qpdf->error;
|
qpdf->tmp_error.exc = qpdf->error;
|
||||||
qpdf->error.clear();
|
qpdf->error = 0;
|
||||||
QTC::TC("qpdf", "qpdf-c qpdf_next_error returned error");
|
QTC::TC("qpdf", "qpdf-c qpdf_next_error returned error");
|
||||||
return qpdf->tmp_string.c_str();
|
return &qpdf->tmp_error;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -91,14 +163,14 @@ char const* qpdf_next_error(qpdf_data qpdf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char const* qpdf_next_warning(qpdf_data qpdf)
|
qpdf_error qpdf_next_warning(qpdf_data qpdf)
|
||||||
{
|
{
|
||||||
if (qpdf_more_warnings(qpdf))
|
if (qpdf_more_warnings(qpdf))
|
||||||
{
|
{
|
||||||
qpdf->tmp_string = qpdf->warnings.front();
|
qpdf->tmp_error.exc = new QPDFExc(qpdf->warnings.front());
|
||||||
qpdf->warnings.pop_front();
|
qpdf->warnings.pop_front();
|
||||||
QTC::TC("qpdf", "qpdf-c qpdf_next_warning returned warning");
|
QTC::TC("qpdf", "qpdf-c qpdf_next_warning returned warning");
|
||||||
return qpdf->tmp_string.c_str();
|
return &qpdf->tmp_error;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -106,6 +178,31 @@ char const* qpdf_next_warning(qpdf_data qpdf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char const* qpdf_get_error_full_text(qpdf_data qpdf, qpdf_error e)
|
||||||
|
{
|
||||||
|
return e->exc.getPointer()->what();
|
||||||
|
}
|
||||||
|
|
||||||
|
enum qpdf_error_code_e qpdf_get_error_code(qpdf_data qpdf, qpdf_error e)
|
||||||
|
{
|
||||||
|
return e->exc.getPointer()->getErrorCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
char const* qpdf_get_error_filename(qpdf_data qpdf, qpdf_error e)
|
||||||
|
{
|
||||||
|
return e->exc.getPointer()->getFilename().c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
off_t qpdf_get_error_file_position(qpdf_data qpdf, qpdf_error e)
|
||||||
|
{
|
||||||
|
return e->exc.getPointer()->getFilePosition();
|
||||||
|
}
|
||||||
|
|
||||||
|
char const* qpdf_get_error_message_detail(qpdf_data qpdf, qpdf_error e)
|
||||||
|
{
|
||||||
|
return e->exc.getPointer()->getMessageDetail().c_str();
|
||||||
|
}
|
||||||
|
|
||||||
void qpdf_set_suppress_warnings(qpdf_data qpdf, QPDF_BOOL value)
|
void qpdf_set_suppress_warnings(qpdf_data qpdf, QPDF_BOOL value)
|
||||||
{
|
{
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_set_suppress_warnings");
|
QTC::TC("qpdf", "qpdf-c called qpdf_set_suppress_warnings");
|
||||||
@ -128,19 +225,9 @@ QPDF_ERROR_CODE qpdf_read(qpdf_data qpdf, char const* filename,
|
|||||||
char const* password)
|
char const* password)
|
||||||
{
|
{
|
||||||
QPDF_ERROR_CODE status = QPDF_SUCCESS;
|
QPDF_ERROR_CODE status = QPDF_SUCCESS;
|
||||||
try
|
qpdf->filename = filename;
|
||||||
{
|
qpdf->password = password;
|
||||||
qpdf->qpdf->processFile(filename, password);
|
status = trap_errors(qpdf, &_qpdf_data::call_read);
|
||||||
}
|
|
||||||
catch (std::exception& e)
|
|
||||||
{
|
|
||||||
qpdf->error = e.what();
|
|
||||||
status |= QPDF_ERRORS;
|
|
||||||
}
|
|
||||||
if (qpdf_more_warnings(qpdf))
|
|
||||||
{
|
|
||||||
status |= QPDF_WARNINGS;
|
|
||||||
}
|
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_read", status);
|
QTC::TC("qpdf", "qpdf-c called qpdf_read", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -228,25 +315,8 @@ QPDF_BOOL qpdf_allow_modify_all(qpdf_data qpdf)
|
|||||||
QPDF_ERROR_CODE qpdf_init_write(qpdf_data qpdf, char const* filename)
|
QPDF_ERROR_CODE qpdf_init_write(qpdf_data qpdf, char const* filename)
|
||||||
{
|
{
|
||||||
QPDF_ERROR_CODE status = QPDF_SUCCESS;
|
QPDF_ERROR_CODE status = QPDF_SUCCESS;
|
||||||
if (qpdf->qpdf_writer)
|
qpdf->filename = filename;
|
||||||
{
|
status = trap_errors(qpdf, &_qpdf_data::call_init_write);
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_init_write multiple times");
|
|
||||||
delete qpdf->qpdf_writer;
|
|
||||||
qpdf->qpdf_writer = 0;
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
qpdf->qpdf_writer = new QPDFWriter(*(qpdf->qpdf), filename);
|
|
||||||
}
|
|
||||||
catch (std::exception& e)
|
|
||||||
{
|
|
||||||
qpdf->error = e.what();
|
|
||||||
status |= QPDF_ERRORS;
|
|
||||||
}
|
|
||||||
if (qpdf_more_warnings(qpdf))
|
|
||||||
{
|
|
||||||
status |= QPDF_WARNINGS;
|
|
||||||
}
|
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_init_write", status);
|
QTC::TC("qpdf", "qpdf-c called qpdf_init_write", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -356,19 +426,7 @@ void qpdf_force_pdf_version(qpdf_data qpdf, char const* version)
|
|||||||
QPDF_ERROR_CODE qpdf_write(qpdf_data qpdf)
|
QPDF_ERROR_CODE qpdf_write(qpdf_data qpdf)
|
||||||
{
|
{
|
||||||
QPDF_ERROR_CODE status = QPDF_SUCCESS;
|
QPDF_ERROR_CODE status = QPDF_SUCCESS;
|
||||||
try
|
status = trap_errors(qpdf, &_qpdf_data::call_write);
|
||||||
{
|
|
||||||
qpdf->qpdf_writer->write();
|
|
||||||
}
|
|
||||||
catch (std::exception& e)
|
|
||||||
{
|
|
||||||
qpdf->error = e.what();
|
|
||||||
status |= QPDF_ERRORS;
|
|
||||||
}
|
|
||||||
if (qpdf_more_warnings(qpdf))
|
|
||||||
{
|
|
||||||
status |= QPDF_WARNINGS;
|
|
||||||
}
|
|
||||||
QTC::TC("qpdf", "qpdf-c called qpdf_write", status);
|
QTC::TC("qpdf", "qpdf-c called qpdf_write", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,24 @@ static qpdf_data qpdf = 0;
|
|||||||
|
|
||||||
static void report_errors()
|
static void report_errors()
|
||||||
{
|
{
|
||||||
|
qpdf_error e = 0;
|
||||||
while (qpdf_more_warnings(qpdf))
|
while (qpdf_more_warnings(qpdf))
|
||||||
{
|
{
|
||||||
printf("warning: %s\n", qpdf_next_warning(qpdf));
|
e = qpdf_next_warning(qpdf);
|
||||||
|
printf("warning: %s\n", qpdf_get_error_full_text(qpdf, e));
|
||||||
|
printf(" code: %d\n", qpdf_get_error_code(qpdf, e));
|
||||||
|
printf(" file: %s\n", qpdf_get_error_filename(qpdf, e));
|
||||||
|
printf(" pos : %ld\n", qpdf_get_error_file_position(qpdf, e));
|
||||||
|
printf(" text: %s\n", qpdf_get_error_message_detail(qpdf, e));
|
||||||
}
|
}
|
||||||
while (qpdf_more_errors(qpdf))
|
e = qpdf_get_error(qpdf);
|
||||||
|
if (e)
|
||||||
{
|
{
|
||||||
printf("error: %s\n", qpdf_next_error(qpdf));
|
printf("error: %s\n", qpdf_get_error_full_text(qpdf, e));
|
||||||
|
printf(" code: %d\n", qpdf_get_error_code(qpdf, e));
|
||||||
|
printf(" file: %s\n", qpdf_get_error_filename(qpdf, e));
|
||||||
|
printf(" pos : %ld\n", qpdf_get_error_file_position(qpdf, e));
|
||||||
|
printf(" text: %s\n", qpdf_get_error_message_detail(qpdf, e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,6 @@ QPDF decoding error warning 0
|
|||||||
QPDF_Stream ignore non-dictionary DecodeParms 0
|
QPDF_Stream ignore non-dictionary DecodeParms 0
|
||||||
qpdf-c called qpdf_init 0
|
qpdf-c called qpdf_init 0
|
||||||
qpdf-c called qpdf_cleanup 0
|
qpdf-c called qpdf_cleanup 0
|
||||||
qpdf-c called qpdf_more_errors 0
|
|
||||||
qpdf-c called qpdf_more_warnings 0
|
qpdf-c called qpdf_more_warnings 0
|
||||||
qpdf-c qpdf_next_error returned error 0
|
qpdf-c qpdf_next_error returned error 0
|
||||||
qpdf-c qpdf_next_warning returned warning 0
|
qpdf-c qpdf_next_warning returned warning 0
|
||||||
|
@ -1,9 +1,21 @@
|
|||||||
WARNING: append-page-content-damaged.pdf: file is damaged
|
WARNING: append-page-content-damaged.pdf: file is damaged
|
||||||
WARNING: append-page-content-damaged.pdf: can't find startxref
|
WARNING: append-page-content-damaged.pdf: can't find startxref
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: append-page-content-damaged.pdf: Attempting to reconstruct cross-reference table
|
||||||
version: 1.3
|
version: 1.3
|
||||||
linearized: 0
|
linearized: 0
|
||||||
encrypted: 0
|
encrypted: 0
|
||||||
warning: append-page-content-damaged.pdf: file is damaged
|
warning: append-page-content-damaged.pdf: file is damaged
|
||||||
|
code: 5
|
||||||
|
file: append-page-content-damaged.pdf
|
||||||
|
pos : 0
|
||||||
|
text: file is damaged
|
||||||
warning: append-page-content-damaged.pdf: can't find startxref
|
warning: append-page-content-damaged.pdf: can't find startxref
|
||||||
warning: Attempting to reconstruct cross-reference table
|
code: 5
|
||||||
|
file: append-page-content-damaged.pdf
|
||||||
|
pos : 0
|
||||||
|
text: can't find startxref
|
||||||
|
warning: append-page-content-damaged.pdf: Attempting to reconstruct cross-reference table
|
||||||
|
code: 5
|
||||||
|
file: append-page-content-damaged.pdf
|
||||||
|
pos : 0
|
||||||
|
text: Attempting to reconstruct cross-reference table
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: append-page-content-damaged.pdf: file is damaged
|
WARNING: append-page-content-damaged.pdf: file is damaged
|
||||||
WARNING: append-page-content-damaged.pdf: can't find startxref
|
WARNING: append-page-content-damaged.pdf: can't find startxref
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: append-page-content-damaged.pdf: Attempting to reconstruct cross-reference table
|
||||||
checking append-page-content-damaged.pdf
|
checking append-page-content-damaged.pdf
|
||||||
PDF Version: 1.3
|
PDF Version: 1.3
|
||||||
File is not encrypted
|
File is not encrypted
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: append-page-content-damaged.pdf: file is damaged
|
WARNING: append-page-content-damaged.pdf: file is damaged
|
||||||
WARNING: append-page-content-damaged.pdf: can't find startxref
|
WARNING: append-page-content-damaged.pdf: can't find startxref
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: append-page-content-damaged.pdf: Attempting to reconstruct cross-reference table
|
||||||
qpdf: operation succeeded with warnings; resulting file may have some problems
|
qpdf: operation succeeded with warnings; resulting file may have some problems
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad10.pdf: file is damaged
|
WARNING: bad10.pdf: file is damaged
|
||||||
WARNING: bad10.pdf (trailer, file position 712): /Size key in trailer dictionary is not an integer
|
WARNING: bad10.pdf (trailer, file position 712): /Size key in trailer dictionary is not an integer
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad10.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad11.pdf: file is damaged
|
WARNING: bad11.pdf: file is damaged
|
||||||
WARNING: bad11.pdf (trailer, file position 905): /Prev key in trailer dictionary is not an integer
|
WARNING: bad11.pdf (trailer, file position 905): /Prev key in trailer dictionary is not an integer
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad11.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad13.pdf: file is damaged
|
WARNING: bad13.pdf: file is damaged
|
||||||
WARNING: bad13.pdf (trailer, file position 753): unexpected brace token
|
WARNING: bad13.pdf (trailer, file position 753): unexpected brace token
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad13.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad13.pdf (trailer, file position 753): unexpected brace token
|
bad13.pdf (trailer, file position 753): unexpected brace token
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad14.pdf: file is damaged
|
WARNING: bad14.pdf: file is damaged
|
||||||
WARNING: bad14.pdf (trailer, file position 753): unexpected brace token
|
WARNING: bad14.pdf (trailer, file position 753): unexpected brace token
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad14.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad14.pdf (trailer, file position 753): unexpected brace token
|
bad14.pdf (trailer, file position 753): unexpected brace token
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad15.pdf: file is damaged
|
WARNING: bad15.pdf: file is damaged
|
||||||
WARNING: bad15.pdf (trailer, file position 753): unexpected array close token
|
WARNING: bad15.pdf (trailer, file position 753): unexpected array close token
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad15.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad15.pdf (trailer, file position 753): unexpected array close token
|
bad15.pdf (trailer, file position 753): unexpected array close token
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad16.pdf: file is damaged
|
WARNING: bad16.pdf: file is damaged
|
||||||
WARNING: bad16.pdf (trailer, file position 753): unexpected dictionary close token
|
WARNING: bad16.pdf (trailer, file position 753): unexpected dictionary close token
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad16.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad16.pdf (trailer, file position 753): unexpected dictionary close token
|
bad16.pdf (trailer, file position 753): unexpected dictionary close token
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad17.pdf: file is damaged
|
WARNING: bad17.pdf: file is damaged
|
||||||
WARNING: bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
WARNING: bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad17.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad18.pdf: file is damaged
|
WARNING: bad18.pdf: file is damaged
|
||||||
WARNING: bad18.pdf (trailer, file position 753): unexpected )
|
WARNING: bad18.pdf (trailer, file position 753): unexpected )
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad18.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad18.pdf (trailer, file position 753): unexpected )
|
bad18.pdf (trailer, file position 753): unexpected )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad19.pdf: file is damaged
|
WARNING: bad19.pdf: file is damaged
|
||||||
WARNING: bad19.pdf (trailer, file position 753): unexpected >
|
WARNING: bad19.pdf (trailer, file position 753): unexpected >
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad19.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad19.pdf (trailer, file position 753): unexpected >
|
bad19.pdf (trailer, file position 753): unexpected >
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad2.pdf: file is damaged
|
WARNING: bad2.pdf: file is damaged
|
||||||
WARNING: bad2.pdf: can't find startxref
|
WARNING: bad2.pdf: can't find startxref
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad2.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad20.pdf: file is damaged
|
WARNING: bad20.pdf: file is damaged
|
||||||
WARNING: bad20.pdf (trailer, file position 753): invalid character (q) in hexstring
|
WARNING: bad20.pdf (trailer, file position 753): invalid character (q) in hexstring
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad20.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad20.pdf (trailer, file position 753): invalid character (q) in hexstring
|
bad20.pdf (trailer, file position 753): invalid character (q) in hexstring
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad21.pdf: file is damaged
|
WARNING: bad21.pdf: file is damaged
|
||||||
WARNING: bad21.pdf (trailer, file position 742): invalid name token
|
WARNING: bad21.pdf (trailer, file position 742): invalid name token
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad21.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad21.pdf (trailer, file position 742): invalid name token
|
bad21.pdf (trailer, file position 742): invalid name token
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad25.pdf: file is damaged
|
WARNING: bad25.pdf: file is damaged
|
||||||
WARNING: bad25.pdf (object 4 0, file position 307): expected n n obj
|
WARNING: bad25.pdf (object 4 0, file position 307): expected n n obj
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad25.pdf: Attempting to reconstruct cross-reference table
|
||||||
WARNING: bad25.pdf: object 4 0 not found in file after regenerating cross reference table
|
WARNING: bad25.pdf: object 4 0 not found in file after regenerating cross reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is indirect
|
/QTest is indirect
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad26.pdf: file is damaged
|
WARNING: bad26.pdf: file is damaged
|
||||||
WARNING: bad26.pdf (object 4 0, file position 307): expected n n obj
|
WARNING: bad26.pdf (object 4 0, file position 307): expected n n obj
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad26.pdf: Attempting to reconstruct cross-reference table
|
||||||
WARNING: bad26.pdf: object 4 0 not found in file after regenerating cross reference table
|
WARNING: bad26.pdf: object 4 0 not found in file after regenerating cross reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is indirect
|
/QTest is indirect
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad27.pdf: file is damaged
|
WARNING: bad27.pdf: file is damaged
|
||||||
WARNING: bad27.pdf (object 4 0, file position 307): expected n n obj
|
WARNING: bad27.pdf (object 4 0, file position 307): expected n n obj
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad27.pdf: Attempting to reconstruct cross-reference table
|
||||||
WARNING: bad27.pdf: object 4 0 not found in file after regenerating cross reference table
|
WARNING: bad27.pdf: object 4 0 not found in file after regenerating cross reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is indirect
|
/QTest is indirect
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad29.pdf: file is damaged
|
WARNING: bad29.pdf: file is damaged
|
||||||
WARNING: bad29.pdf (trailer, file position 742): null character not allowed in name token
|
WARNING: bad29.pdf (trailer, file position 742): null character not allowed in name token
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad29.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad29.pdf (trailer, file position 742): null character not allowed in name token
|
bad29.pdf (trailer, file position 742): null character not allowed in name token
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad3.pdf: file is damaged
|
WARNING: bad3.pdf: file is damaged
|
||||||
WARNING: bad3.pdf (file position 542): xref not found
|
WARNING: bad3.pdf (file position 542): xref not found
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad3.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad32.pdf: file is damaged
|
WARNING: bad32.pdf: file is damaged
|
||||||
WARNING: bad32.pdf (object 4 0, file position 307): expected 4 0 obj
|
WARNING: bad32.pdf (object 4 0, file position 307): expected 4 0 obj
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad32.pdf: Attempting to reconstruct cross-reference table
|
||||||
WARNING: bad32.pdf: object 4 0 not found in file after regenerating cross reference table
|
WARNING: bad32.pdf: object 4 0 not found in file after regenerating cross reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is indirect
|
/QTest is indirect
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad33.pdf: file is damaged
|
WARNING: bad33.pdf: file is damaged
|
||||||
WARNING: bad33.pdf (file position 1771): xref not found
|
WARNING: bad33.pdf (file position 1771): xref not found
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad33.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is indirect
|
/QTest is indirect
|
||||||
/QTest is a stream. Dictionary: << /Filter (FlateDecode) /Length 123 >>
|
/QTest is a stream. Dictionary: << /Filter (FlateDecode) /Length 123 >>
|
||||||
Raw stream data:
|
Raw stream data:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad34.pdf: file is damaged
|
WARNING: bad34.pdf: file is damaged
|
||||||
WARNING: bad34.pdf (object 4 0, file position 322): expected n n obj
|
WARNING: bad34.pdf (object 4 0, file position 322): expected n n obj
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad34.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is indirect
|
/QTest is indirect
|
||||||
/QTest is a stream. Dictionary: << /Length 44 /Quack 9 0 R >>
|
/QTest is a stream. Dictionary: << /Length 44 /Quack 9 0 R >>
|
||||||
Raw stream data:
|
Raw stream data:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad4.pdf: file is damaged
|
WARNING: bad4.pdf: file is damaged
|
||||||
WARNING: bad4.pdf (xref table, file position 547): xref syntax invalid
|
WARNING: bad4.pdf (xref table, file position 547): xref syntax invalid
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad4.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad5.pdf: file is damaged
|
WARNING: bad5.pdf: file is damaged
|
||||||
WARNING: bad5.pdf (xref table, file position 591): invalid xref entry (obj=2)
|
WARNING: bad5.pdf (xref table, file position 591): invalid xref entry (obj=2)
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad5.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
WARNING: bad7.pdf: file is damaged
|
WARNING: bad7.pdf: file is damaged
|
||||||
WARNING: bad7.pdf (file position 698): expected trailer dictionary
|
WARNING: bad7.pdf (file position 698): expected trailer dictionary
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad7.pdf: Attempting to reconstruct cross-reference table
|
||||||
bad7.pdf: unable to find trailer dictionary while recovering damaged file
|
bad7.pdf: unable to find trailer dictionary while recovering damaged file
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad8.pdf: file is damaged
|
WARNING: bad8.pdf: file is damaged
|
||||||
WARNING: bad8.pdf (file position 543): xref not found
|
WARNING: bad8.pdf (file position 543): xref not found
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad8.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
WARNING: bad9.pdf: file is damaged
|
WARNING: bad9.pdf: file is damaged
|
||||||
WARNING: bad9.pdf (trailer, file position 712): trailer dictionary lacks /Size key
|
WARNING: bad9.pdf (trailer, file position 712): trailer dictionary lacks /Size key
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: bad9.pdf: Attempting to reconstruct cross-reference table
|
||||||
/QTest is implicit
|
/QTest is implicit
|
||||||
/QTest is direct
|
/QTest is direct
|
||||||
/QTest is null
|
/QTest is null
|
||||||
|
@ -1 +1,5 @@
|
|||||||
error: bad33.pdf (file position 1771): xref not found
|
error: bad33.pdf (file position 1771): xref not found
|
||||||
|
code: 5
|
||||||
|
file: bad33.pdf
|
||||||
|
pos : 1771
|
||||||
|
text: xref not found
|
||||||
|
@ -1 +1,5 @@
|
|||||||
error: bad1.pdf: not a PDF file
|
error: bad1.pdf: not a PDF file
|
||||||
|
code: 5
|
||||||
|
file: bad1.pdf
|
||||||
|
pos : 0
|
||||||
|
text: not a PDF file
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
warning: bad17.pdf: file is damaged
|
warning: bad17.pdf: file is damaged
|
||||||
|
code: 5
|
||||||
|
file: bad17.pdf
|
||||||
|
pos : 0
|
||||||
|
text: file is damaged
|
||||||
warning: bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
warning: bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
||||||
warning: Attempting to reconstruct cross-reference table
|
code: 5
|
||||||
|
file: bad17.pdf
|
||||||
|
pos : 753
|
||||||
|
text: dictionary ending here has an odd number of elements
|
||||||
|
warning: bad17.pdf: Attempting to reconstruct cross-reference table
|
||||||
|
code: 5
|
||||||
|
file: bad17.pdf
|
||||||
|
pos : 0
|
||||||
|
text: Attempting to reconstruct cross-reference table
|
||||||
error: bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
error: bad17.pdf (trailer, file position 753): dictionary ending here has an odd number of elements
|
||||||
|
code: 5
|
||||||
|
file: bad17.pdf
|
||||||
|
pos : 753
|
||||||
|
text: dictionary ending here has an odd number of elements
|
||||||
|
@ -1 +1,5 @@
|
|||||||
error: bad30.pdf (file position 629): stream filter type is not name or array
|
error: bad30.pdf (file position 629): stream filter type is not name or array
|
||||||
|
code: 5
|
||||||
|
file: bad30.pdf
|
||||||
|
pos : 629
|
||||||
|
text: stream filter type is not name or array
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
warning: bad33.pdf: file is damaged
|
warning: bad33.pdf: file is damaged
|
||||||
|
code: 5
|
||||||
|
file: bad33.pdf
|
||||||
|
pos : 0
|
||||||
|
text: file is damaged
|
||||||
warning: bad33.pdf (file position 1771): xref not found
|
warning: bad33.pdf (file position 1771): xref not found
|
||||||
warning: Attempting to reconstruct cross-reference table
|
code: 5
|
||||||
|
file: bad33.pdf
|
||||||
|
pos : 1771
|
||||||
|
text: xref not found
|
||||||
|
warning: bad33.pdf: Attempting to reconstruct cross-reference table
|
||||||
|
code: 5
|
||||||
|
file: bad33.pdf
|
||||||
|
pos : 0
|
||||||
|
text: Attempting to reconstruct cross-reference table
|
||||||
error: bad33.pdf (file position 629): stream filter type is not name or array
|
error: bad33.pdf (file position 629): stream filter type is not name or array
|
||||||
|
code: 5
|
||||||
|
file: bad33.pdf
|
||||||
|
pos : 629
|
||||||
|
text: stream filter type is not name or array
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
WARNING: heifer.pdf: file is damaged
|
WARNING: heifer.pdf: file is damaged
|
||||||
WARNING: heifer.pdf (file position 92741): xref not found
|
WARNING: heifer.pdf (file position 92741): xref not found
|
||||||
WARNING: Attempting to reconstruct cross-reference table
|
WARNING: heifer.pdf: Attempting to reconstruct cross-reference table
|
||||||
WARNING: heifer.pdf (object 2 0, file position 51): attempting to recover stream length
|
WARNING: heifer.pdf (object 2 0, file position 51): attempting to recover stream length
|
||||||
qpdf: operation succeeded with warnings; resulting file may have some problems
|
qpdf: operation succeeded with warnings; resulting file may have some problems
|
||||||
|
Loading…
Reference in New Issue
Block a user