You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Jason Pyeron <jp...@pdinc.us> on 2019/12/04 14:21:20 UTC

org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.getDocument()

Is there a reason why this is package private?

 

v/r,

 

Jason


Re: org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.getDocument()

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
the PDDocument you get is the same as the PDDocument you set when calling the constructor. So as long as you make sure you are
still referencing the same then you're fine.

What I mean is that one could do something along the lines of 

PDDocument pdDocument = new PDDocument();
PDAcroForm acroForm = new PDAcroForm(pdDocument);
pdDocument = new PDDocument();

Obviously now pdDocument is no longer the same as acroForm.getDocument(); 

We would like to get rid of the access from PDAcroForm so don't count on the availability of the API - which is why it's not
considered to be public.

BR
Maruan
  
> > -----Original Message-----
> > From: Maruan Sahyoun 
> > Sent: Wednesday, December 4, 2019 9:29 AM
> > 
> > Yes, as this is only for internal use as to be able to get the PDDocument from the AcroForm e.g. when
> > creating widget annotation
> > streams. You already have access to PDDocument when loading the PDF.
> 
> Is there a danger of getting the PDDocument, since "You already have access"?
> 
> This then prevents navigation back up the proverbial tree and necessitates all functions to be like f(PDAcroForm, PDDocument) instead of f(PDAcroForm).
> 
> > BR
> > Maruan
> > 
> > 
> > 
> > > Is there a reason why this is package private?
> > > 
> > > 
> > > 
> > > v/r,
> > > 
> > > 
> > > 
> > > Jason
> > > 
> > --
> > Maruan Sahyoun
> > 
> > FileAffairs GmbH
> > Josef-Schappe-Straße 21
> > 40882 Ratingen
> > 
> > Tel: +49 (2102) 89497 88
> > Fax: +49 (2102) 89497 91
> > sahyoun@fileaffairs.de
> > www.fileaffairs.de
> > 
> > Geschäftsführer: Maruan Sahyoun
> > Handelsregister: AG Düsseldorf, HRB 53837
> > UST.-ID: DE248275827
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: dev-help@pdfbox.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 
-- 
Maruan Sahyoun

FileAffairs GmbH
Josef-Schappe-Straße 21
40882 Ratingen

Tel: +49 (2102) 89497 88
Fax: +49 (2102) 89497 91
sahyoun@fileaffairs.de
www.fileaffairs.de

Geschäftsführer: Maruan Sahyoun
Handelsregister: AG Düsseldorf, HRB 53837
UST.-ID: DE248275827


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


RE: org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.getDocument()

Posted by Jason Pyeron <jp...@pdinc.us>.
> -----Original Message-----
> From: Maruan Sahyoun 
> Sent: Wednesday, December 4, 2019 9:29 AM
> 
> Yes, as this is only for internal use as to be able to get the PDDocument from the AcroForm e.g. when
> creating widget annotation
> streams. You already have access to PDDocument when loading the PDF.

Is there a danger of getting the PDDocument, since "You already have access"?

This then prevents navigation back up the proverbial tree and necessitates all functions to be like f(PDAcroForm, PDDocument) instead of f(PDAcroForm).

> 
> BR
> Maruan
> 
> 
> 
> > Is there a reason why this is package private?
> >
> >
> >
> > v/r,
> >
> >
> >
> > Jason
> >
> --
> Maruan Sahyoun
> 
> FileAffairs GmbH
> Josef-Schappe-Straße 21
> 40882 Ratingen
> 
> Tel: +49 (2102) 89497 88
> Fax: +49 (2102) 89497 91
> sahyoun@fileaffairs.de
> www.fileaffairs.de
> 
> Geschäftsführer: Maruan Sahyoun
> Handelsregister: AG Düsseldorf, HRB 53837
> UST.-ID: DE248275827
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.getDocument()

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Yes, as this is only for internal use as to be able to get the PDDocument from the AcroForm e.g. when creating widget annotation
streams. You already have access to PDDocument when loading the PDF.

BR
Maruan
 

 
> Is there a reason why this is package private?
> 
>  
> 
> v/r,
> 
>  
> 
> Jason
> 
-- 
Maruan Sahyoun

FileAffairs GmbH
Josef-Schappe-Straße 21
40882 Ratingen

Tel: +49 (2102) 89497 88
Fax: +49 (2102) 89497 91
sahyoun@fileaffairs.de
www.fileaffairs.de

Geschäftsführer: Maruan Sahyoun
Handelsregister: AG Düsseldorf, HRB 53837
UST.-ID: DE248275827


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org