Skip to content

Draft changes for PDFUAConformance wrappers #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions PDFNetPHP/PDFNetPHP.i
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
// header files in /PDFNetC/Headers/PDF/PDFA
#include "PDF/PDFA/PDFACompliance.h"
#include "PDF/PDFA/PDFAOptions.h"

// header files in /PDFNetC/Headers/PDF/PDFUA
#include "PDF/PDFUA/PDFUAConformance.h"
#include "PDF/PDFUA/PDFUAOptions.h"

// header files in /PDFNetC/Headers/PDF/Struct
#include "PDF/Struct/AttrObj.h"
Expand Down Expand Up @@ -266,6 +270,7 @@ namespace std {
%template(VectorUChar) vector<unsigned char>;
%template(VectorChar) vector<char>;
%template(VectorInt) vector<int>;
%template(VectorUInt) vector<unsigned int>;
//%template(VectorString) vector<std::string>;
%template(VectorRedaction) vector<pdftron::PDF::Redaction>;
%template(VectorQuadPoint) vector<pdftron::PDF::QuadPoint>;
Expand All @@ -277,6 +282,13 @@ namespace std {
%template(VectorX509Certificate) vector<pdftron::Crypto::X509Certificate>;
%template(VectorByteRange) vector<pdftron::Common::ByteRange>;
%template(VectorVectorX509Certificate) vector<vector<pdftron::Crypto::X509Certificate> >;

// Update: we obviously can't use PyInt_Check etc functions. TODO: find/write replacements in each language
// // note that the c-style cast (to ValidationError) is pretty hax,
// // only works because the lexicographical replacement works out in SWIG's generator impl.
// // I'm not actually sure what the best way is to do more complex logic, declare a function?
// specialize_std_vector(pdftron::PDF::PDFUA::PDFUAConformance::ValidationError, PyInt_Check, (pdftron::PDF::PDFUA::PDFUAConformance::ValidationError)PyInt_AsLong, PyInt_FromLong);
%template(VectorValidationError) vector<pdftron::PDF::PDFUA::PDFUAConformance::ValidationError>;
};

/**
Expand Down Expand Up @@ -1018,6 +1030,8 @@ namespace pdftron {
%include "PDF/OCG/OCMD.h"
%include "PDF/PDFA/PDFAOptions.h"
%include "PDF/PDFA/PDFACompliance.h"
%include "PDF/PDFUA/PDFUAConformance.h"
%include "PDF/PDFUA/PDFUAOptions.h"
%include "PDF/Struct/AttrObj.h"
%include "PDF/Struct/ClassMap.h"
%include "PDF/Struct/ContentItem.h"
Expand Down
13 changes: 13 additions & 0 deletions PDFNetPython/PDFNetPython.i
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
// header files in /PDFNetC/Headers/PDF/PDFA
#include "PDF/PDFA/PDFACompliance.h"
#include "PDF/PDFA/PDFAOptions.h"

// header files in /PDFNetC/Headers/PDF/PDFUA
#include "PDF/PDFUA/PDFUAConformance.h"
#include "PDF/PDFUA/PDFUAOptions.h"

// header files in /PDFNetC/Headers/PDF/Struct
#include "PDF/Struct/AttrObj.h"
Expand Down Expand Up @@ -262,6 +266,7 @@ namespace std {
%template(VectorUChar) vector<unsigned char>;
%template(VectorChar) vector<char>;
%template(VectorInt) vector<int>;
%template(VectorUInt) vector<unsigned int>;
%template(VectorString) vector<std::string>;
%template(VectorRedaction) vector<pdftron::PDF::Redaction>;
%template(VectorQuadPoint) vector<pdftron::PDF::QuadPoint>;
Expand All @@ -273,6 +278,12 @@ namespace std {
%template(VectorX501AttributeTypeAndValue) vector<pdftron::Crypto::X501AttributeTypeAndValue>;
%template(VectorByteRange) vector<pdftron::Common::ByteRange>;
%template(VectorVectorX509Certificate) vector<vector<pdftron::Crypto::X509Certificate> >;

// note that the c-style cast (to ValidationError) is pretty hax,
// only works because the lexicographical replacement works out in SWIG's generator impl.
// I'm not actually sure what the best way is to do more complex logic, declare a function?
specialize_std_vector(pdftron::PDF::PDFUA::PDFUAConformance::ValidationError, PyInt_Check, (pdftron::PDF::PDFUA::PDFUAConformance::ValidationError)PyInt_AsLong, PyInt_FromLong);
%template(VectorValidationError) vector<pdftron::PDF::PDFUA::PDFUAConformance::ValidationError>;
};

/**
Expand Down Expand Up @@ -867,6 +878,8 @@ namespace pdftron {
%include "PDF/OCG/OCMD.h"
%include "PDF/PDFA/PDFAOptions.h"
%include "PDF/PDFA/PDFACompliance.h"
%include "PDF/PDFUA/PDFUAConformance.h"
%include "PDF/PDFUA/PDFUAOptions.h"
%include "PDF/Struct/AttrObj.h"
%include "PDF/Struct/ClassMap.h"
%include "PDF/Struct/ContentItem.h"
Expand Down
16 changes: 15 additions & 1 deletion PDFNetRuby/PDFNetRuby.i
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@
#include "PDF/OCG/Group.h"
#include "PDF/OCG/OCMD.h"

// header files in /PDFNetC/Headers/PDF/PDfA
// header files in /PDFNetC/Headers/PDF/PDFA
#include "PDF/PDFA/PDFACompliance.h"
#include "PDF/PDFA/PDFAOptions.h"

// header files in /PDFNetC/Headers/PDF/PDFUA
#include "PDF/PDFUA/PDFUAConformance.h"
#include "PDF/PDFUA/PDFUAOptions.h"

// header files in /PDFNetC/Headers/PDF/Struct
#include "PDF/Struct/AttrObj.h"
Expand Down Expand Up @@ -248,6 +252,7 @@ namespace std {
%template(VectorUChar) vector<unsigned char>;
%template(VectorChar) vector<char>;
%template(VectorInt) vector<int>;
%template(VectorUInt) vector<unsigned int>;
%template(VectorString) vector<std::string>;
%template(VectorRedaction) vector<pdftron::PDF::Redaction>;
%template(VectorQuadPoint) vector<pdftron::PDF::QuadPoint>;
Expand All @@ -259,6 +264,13 @@ namespace std {
%template(VectorX509Certificate) vector<pdftron::Crypto::X509Certificate>;
%template(VectorByteRange) vector<pdftron::Common::ByteRange>;
%template(VectorVectorX509Certificate) vector<vector<pdftron::Crypto::X509Certificate> >;

// Update: we obviously can't use PyInt_Check etc functions. TODO: find/write replacements in each language
// // note that the c-style cast (to ValidationError) is pretty hax,
// // only works because the lexicographical replacement works out in SWIG's generator impl.
// // I'm not actually sure what the best way is to do more complex logic, declare a function?
// specialize_std_vector(pdftron::PDF::PDFUA::PDFUAConformance::ValidationError, PyInt_Check, (pdftron::PDF::PDFUA::PDFUAConformance::ValidationError)PyInt_AsLong, PyInt_FromLong);
%template(VectorValidationError) vector<pdftron::PDF::PDFUA::PDFUAConformance::ValidationError>;
};

/**
Expand Down Expand Up @@ -802,6 +814,8 @@ namespace pdftron {
%include "PDF/OCG/OCMD.h"
%include "PDF/PDFA/PDFAOptions.h"
%include "PDF/PDFA/PDFACompliance.h"
%include "PDF/PDFUA/PDFUAConformance.h"
%include "PDF/PDFUA/PDFUAOptions.h"
%include "PDF/Struct/AttrObj.h"
%include "PDF/Struct/ClassMap.h"
%include "PDF/Struct/ContentItem.h"
Expand Down
14 changes: 14 additions & 0 deletions PDFTronGo/pdftron.i
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
// header files in /PDFNetC/Headers/PDF/PDFA
#include "PDF/PDFA/PDFACompliance.h"
#include "PDF/PDFA/PDFAOptions.h"

// header files in /PDFNetC/Headers/PDF/PDFUA
#include "PDF/PDFUA/PDFUAConformance.h"
#include "PDF/PDFUA/PDFUAOptions.h"

// header files in /PDFNetC/Headers/PDF/Struct
#include "PDF/Struct/AttrObj.h"
Expand Down Expand Up @@ -236,6 +240,7 @@ namespace std {
%template(VectorUChar) vector<UChar>;
%template(VectorChar) vector<char>;
%template(VectorInt) vector<int>;
%template(VectorUInt) vector<unsigned int>;
%template(VectorString) vector<std::string>;
%template(VectorRedaction) vector<pdftron::PDF::Redaction>;
%template(VectorQuadPoint) vector<pdftron::PDF::QuadPoint>;
Expand All @@ -247,6 +252,13 @@ namespace std {
%template(VectorX501AttributeTypeAndValue) vector<pdftron::Crypto::X501AttributeTypeAndValue>;
%template(VectorByteRange) vector<pdftron::Common::ByteRange>;
%template(VectorVectorX509Certificate) vector<vector<pdftron::Crypto::X509Certificate> >;

// Update: we obviously can't use PyInt_Check etc functions. TODO: find/write replacements in each language
// // note that the c-style cast (to ValidationError) is pretty hax,
// // only works because the lexicographical replacement works out in SWIG's generator impl.
// // I'm not actually sure what the best way is to do more complex logic, declare a function?
// specialize_std_vector(pdftron::PDF::PDFUA::PDFUAConformance::ValidationError, PyInt_Check, (pdftron::PDF::PDFUA::PDFUAConformance::ValidationError)PyInt_AsLong, PyInt_FromLong);
%template(VectorValidationError) vector<pdftron::PDF::PDFUA::PDFUAConformance::ValidationError>;
};

/**
Expand Down Expand Up @@ -430,6 +442,8 @@ namespace pdftron {
%include "PDF/OCG/OCMD.h"
%include "PDF/PDFA/PDFAOptions.h"
%include "PDF/PDFA/PDFACompliance.h"
%include "PDF/PDFUA/PDFUAConformance.h"
%include "PDF/PDFUA/PDFUAOptions.h"
%include "PDF/Struct/AttrObj.h"
%include "PDF/Struct/ClassMap.h"
%include "PDF/Struct/ContentItem.h"
Expand Down
2 changes: 0 additions & 2 deletions jenkinsfiles/build_win_go.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ pipeline {
GOCACHE = "/tmp/.cache"
}

triggers { cron(cron_string) }

parameters {
string(name: "FORCE_BRANCH_VERSION", defaultValue: "" ,
description: "Set to a version if you wish to change the core SDK version used.")
Expand Down