You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ar...@locus.apache.org on 2000/03/10 03:47:14 UTC

cvs commit: xml-fop/src/org/apache/fop/pdf PDFDocument.java

arved       00/03/09 18:47:14

  Modified:    src/org/apache/fop/pdf PDFDocument.java
  Log:
  PDF version updated to 1.3
  
  Revision  Changes    Path
  1.7       +25 -8     xml-fop/src/org/apache/fop/pdf/PDFDocument.java
  
  Index: PDFDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFDocument.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PDFDocument.java	1999/11/22 17:37:16	1.6
  +++ PDFDocument.java	2000/03/10 02:47:14	1.7
  @@ -1,4 +1,4 @@
  -/*-- $Id: PDFDocument.java,v 1.6 1999/11/22 17:37:16 jtauber Exp $ -- 
  +/*-- $Id: PDFDocument.java,v 1.7 2000/03/10 02:47:14 arved Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -79,7 +79,7 @@
   public class PDFDocument {
   
       /** the version of PDF supported */
  -    protected static final String pdfVersion = "1.2";
  +    protected static final String pdfVersion = "1.3";
   
       /** the current character position */
       protected int position = 0;
  @@ -220,13 +220,15 @@
        * @return the created /Page object
        */
       public PDFPage makePage(PDFResources resources,
  -			    PDFStream contents, int pagewidth,
  +			    PDFStream contents,
  +                            int pagewidth,
   			    int pageheight)  {
   
   	/* create a PDFPage with the next object number, the given
   	   resources, contents and dimensions */
   	PDFPage page = new PDFPage(++this.objectcount, resources,
  -				   contents, pagewidth, pageheight);
  +				   contents,
  +                                   pagewidth, pageheight);
   
   	/* add it to the list of objects */
   	this.objects.addElement(page);
  @@ -246,11 +248,12 @@
        * @return the PDFLink object created
        */
       public PDFLink makeLink(Rectangle rect, String destination) {
  -	PDFLink link = new PDFLink(++this.objectcount, destination, rect);
  +
  +	PDFLink link = new PDFLink(++this.objectcount, rect);
   	this.objects.addElement(link);
   
   	PDFFileSpec fileSpec = new PDFFileSpec(++this.objectcount,
  -					       link.destination);
  +					       destination);
   	this.objects.addElement(fileSpec);
   
   	PDFAction action = new PDFAction(++this.objectcount,
  @@ -260,7 +263,7 @@
   
   	return link;
       }
  -
  +    
       /**
        * make a stream object
        *
  @@ -268,9 +271,23 @@
        */
       public PDFStream makeStream() {
       
  -	/* create a PDFStream with the next object number and add it
  +	/* create a PDFStream with the next object number and add it
   	   to the list of objects */
   	PDFStream obj = new PDFStream(++this.objectcount);
  +	this.objects.addElement(obj);
  +	return obj;
  +    }
  +    
  +    /**
  +     * make an annotation list object
  +     *
  +     * @return the annotation list object created
  +     */
  +    public PDFAnnotList makeAnnotList() {
  +    
  +	/* create a PDFAnnotList with the next object number and add it
  +	   to the list of objects */
  +	PDFAnnotList obj = new PDFAnnotList(++this.objectcount);
   	this.objects.addElement(obj);
   	return obj;
       }
  
  
  

Re: cvs commit: xml-fop/src/org/apache/fop/pdf PDFDocument.java

Posted by Ar...@chebucto.ns.ca.
Yes, you're quite right. Fotis picked up on this as well.

The fix is very simple - the PDFLink constructor no longer requires a String to 
be passed, nor does it use it as an instance variable. I will commit the 
updated PDFLink.java file this weekend, but that is all there is to it.

The destination string is present in PDFLink as legacy code only, and my own 
code no longer contains it.

Arved Sandstrom

Quoting Wouter Lagerweij <W....@acriter.com>:

> arved@locus.apache.org wrote:
> > 
> > arved       00/03/09 18:47:14
> > 
> >   Modified:    src/org/apache/fop/pdf PDFDocument.java
> >   Log:
> >   PDF version updated to 1.3
> >
> 
> <snip>
> 
> >        public PDFLink makeLink(Rectangle rect, String destination) {
> >   -     PDFLink link = new PDFLink(++this.objectcount, destination,
> rect);
> >   +
> >   +     PDFLink link = new PDFLink(++this.objectcount, rect);
> >         this.objects.addElement(link);
> 
> Hi,
> 
> Could it be that you forgot to commit changes to PDFLink? As far as I
> can see the contructor you use hasn't been added to PDFLink, halting my
> compile until I re-inserted the destination parameter. I do not have
> cvs-commit rights, so maybe someone here can fix this.
> 
> tnx,
> 
> Wouter
> 


---------------------------------------------------------------
 This mail was sent through the Nova Scotia Provincial Server.
 http://nsaccess.ns.ca/mail/ (in development)

Re: cvs commit: xml-fop/src/org/apache/fop/pdf PDFDocument.java

Posted by Wouter Lagerweij <W....@acriter.com>.
arved@locus.apache.org wrote:
> 
> arved       00/03/09 18:47:14
> 
>   Modified:    src/org/apache/fop/pdf PDFDocument.java
>   Log:
>   PDF version updated to 1.3
>

<snip>

>        public PDFLink makeLink(Rectangle rect, String destination) {
>   -     PDFLink link = new PDFLink(++this.objectcount, destination, rect);
>   +
>   +     PDFLink link = new PDFLink(++this.objectcount, rect);
>         this.objects.addElement(link);

Hi,

Could it be that you forgot to commit changes to PDFLink? As far as I
can see the contructor you use hasn't been added to PDFLink, halting my
compile until I re-inserted the destination parameter. I do not have
cvs-commit rights, so maybe someone here can fix this.

tnx,

Wouter