Hi, yes true, but still there's a dead "if" in the method so it's likely not behaving as it was intended to.
On Wed, Mar 4, 2015 at 4:36 PM, Maruan Sahyoun <[email protected]> wrote: > Hi, > > from PDF 1.4 on the Version entry in the document catalog may override the > version specified in the header. As a result they could have different > versions and don't need to be in sync. That's especially useful when doing > an incremental update as the header can not change as part of that but the > Version entry in the document catalog can as part of the new increment. > > BR > Maruan > > Am 04.03.2015 um 14:15 schrieb Andrea Vacondio <[email protected] > >: > > > Hi, about 2.0.0-SNAPSHOT I was setting version on an existing document > and > > I noticed the version was set on the Catalog but not in the header so I > > took a look at the code and I think there's something odd there (or I'm > > missing something). > > It first makes sure we are not downgrading the version and then we have > the > > following code (see my comment): > > > > if (newVersion >= 1.4f) > > { > > getDocumentCatalog().setVersion(Float.toString(newVersion)); > > //isn't this always false? We already know newVersion is greater... > > if (getDocument().getVersion() > newVersion) > > { > > getDocument().setVersion(newVersion); > > } > > } > > else > > { > > // versions < 1.4f have a version header only > > getDocument().setVersion(newVersion); > > } > > > > I'm not fully sure what's the expected behaviour but I guess it's > something > > like "if newVer is less then 1.4 then set the header else set both header > > and catalog so something like: > > if (newVersion >= 1.4f) > > { > > > > getDocumentCatalog().setVersion(Float.toString(newVersion)); > > } > > getDocument().setVersion(newVersion); > > > > Am I missing something? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >

