From 0407f4350b4b8a884b581900aed2c7999620c54e Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 2 Jun 2026 16:40:03 -0700 Subject: [PATCH] Port PR#180 to PHP, Python, GO https://github.com/ApryseSDK/PDFNetWrappers/pull/180 --- PDFNetPHP/PDFNetPHP.i | 4 ++++ PDFNetPython/PDFNetPython.i | 4 ++++ PDFTronGo/pdftron.i | 3 +++ 3 files changed, 11 insertions(+) diff --git a/PDFNetPHP/PDFNetPHP.i b/PDFNetPHP/PDFNetPHP.i index 23015604..36500e52 100644 --- a/PDFNetPHP/PDFNetPHP.i +++ b/PDFNetPHP/PDFNetPHP.i @@ -851,6 +851,10 @@ namespace pdftron { } } +// Value Wrappers prevent excessive item creation by wrapping the item in SwigValueWrapper +%feature("valuewrapper") pdftron::PDF::PDFDoc; + + //---------------------------------------------------------------------------------------------- /** * Typemap for function pointers diff --git a/PDFNetPython/PDFNetPython.i b/PDFNetPython/PDFNetPython.i index 90be3b39..8de07e20 100644 --- a/PDFNetPython/PDFNetPython.i +++ b/PDFNetPython/PDFNetPython.i @@ -719,6 +719,10 @@ namespace pdftron { } } +// Value Wrappers prevent excessive item creation by wrapping the item in SwigValueWrapper +%feature("valuewrapper") pdftron::PDF::PDFDoc; + + //---------------------------------------------------------------------------------------------- /** * Typemap for function pointers diff --git a/PDFTronGo/pdftron.i b/PDFTronGo/pdftron.i index 29573c59..bb0c7f39 100644 --- a/PDFTronGo/pdftron.i +++ b/PDFTronGo/pdftron.i @@ -306,6 +306,9 @@ namespace pdftron { } } +// Value Wrappers prevent excessive item creation by wrapping the item in SwigValueWrapper +%feature("valuewrapper") pdftron::PDF::PDFDoc; + /** * Turns on the director feature for the following classes. * C++ equivalent of a proxy class. User extends this class in GOLang