コード例 #1
0
ファイル: PdfCopy.java プロジェクト: thomashunziker/SIAPDF
 RefKey(PRIndirectReference ref) {
   num = ref.getNumber();
   gen = ref.getGeneration();
 }
コード例 #2
0
 /**
  * Checks if a reference refers to a page object.
  *
  * @param ref the reference that needs to be checked
  * @return true is the reference refers to a page object.
  */
 protected boolean isPage(PRIndirectReference ref) {
   IntHashtable refs = pages2intrefs.get(ref.getReader());
   if (refs != null) return refs.containsKey(ref.getNumber());
   else return false;
 }
コード例 #3
0
 /**
  * Sets a reference to "visited" in the copy process.
  *
  * @param ref the reference that needs to be set to "visited"
  * @return true if the reference was set to visited
  */
 protected boolean setVisited(PRIndirectReference ref) {
   IntHashtable refs = visited.get(ref.getReader());
   if (refs != null) return refs.put(ref.getNumber(), 1) != 0;
   else return false;
 }
コード例 #4
0
 /**
  * Checks if a reference has already been "visited" in the copy process.
  *
  * @param ref the reference that needs to be checked
  * @return true if the reference was already visited
  */
 protected boolean isVisited(PRIndirectReference ref) {
   IntHashtable refs = visited.get(ref.getReader());
   if (refs != null) return refs.containsKey(ref.getNumber());
   else return false;
 }
コード例 #5
0
 protected PdfIndirectReference getNewReference(PRIndirectReference ref) {
   return new PdfIndirectReference(0, getNewObjectNumber(ref.getReader(), ref.getNumber(), 0));
 }