Re: [Podofo-users] [PATCH 0/3] Improvements to annotations appearance API

2018-04-06 Thread Francesco Pretto
On 10 March 2018 at 15:40, zyx  wrote:
> On Thu, 2018-02-22 at 12:41 +0100, Francesco Pretto wrote:
>> Currently the API support setting annotation appearance only from
> PdfXObject [...] the appearance can be set from a generic PdfObject.
> >
>
> [...] I'm against this API change. It's better the API reflects what is
> possible.
>

Actually, I also changed my mind about the proposed change and I don't
support it anymore. I proposed it since there's inside the
SetAppearance method only the wrapped PdfObject is used, meaning
there's actually a loose constraint on PdfXObject. Also, if one want
to provide a getter method, it should better return PdfObject and not
PdfXObject.

I will post updated appearance getter method again since it's very useful.

Cheers,
Francesco

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] [PATCH 0/3] Improvements to annotations appearance API

2018-03-10 Thread zyx
On Thu, 2018-02-22 at 12:41 +0100, Francesco Pretto wrote:
> Currently the API support setting annotation appearance only from
> PdfXObject. This is arbitrarily limiting the API: the appearance can
> be set from a generic PdfObject.

Hi,
the above statement is wrong, because PDF 32000-1:2008 chapter 12.5.5
Appearance Streams claims:

   Each appearance stream is a form XObject (see 8.10, “Form
   XObjects”): a self-contained content stream that shall be rendered
   inside the annotation rectangle.

Thus I'm against this API change. It's better the API reflects what is
possible.

That means only the 3rd patch is usable from this series.
Bye,
zyx

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


[Podofo-users] [PATCH 0/3] Improvements to annotations appearance API

2018-02-22 Thread Francesco Pretto

Currently the API support setting annotation appearance only from PdfXObject.
This is arbitrarily limiting the API: the appearance can be set from
a generic PdfObject. Also there's no accessibility method for the current
set appearance. The patch series add overloads accepting a PdfObject.
I recommend in the future to deprecate methods signatures accepting PdfXObject,
which are cluttering the API unnecessarily.

Francesco Pretto (3):
  PdfAnnotation: Allow set appearance from PdfObject
  PdfSignatureField::SetAppearanceStream: Removed use of unuseful
SetAppearanceStreamForObject method
  PdfAnnotation: Added GetAppearanceStream method

 src/doc/PdfAnnotation.cpp | 61 +--
 src/doc/PdfAnnotation.h   | 21 +--
 src/doc/PdfField.cpp  | 18 ++---
 src/doc/PdfField.h| 18 +++--
 src/doc/PdfSignatureField.cpp |  9 +--
 src/doc/PdfSignatureField.h   |  8 ++
 6 files changed, 117 insertions(+), 18 deletions(-)

--
2.16.1.windows.1


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users