pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1809864 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
Date Wed, 27 Sep 2017 15:40:52 GMT
Author: tilman
Date: Wed Sep 27 15:40:52 2017
New Revision: 1809864

URL: http://svn.apache.org/viewvc?rev=1809864&view=rev
Log:
PDFBOX-2852: remove tabs

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java?rev=1809864&r1=1809863&r2=1809864&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
Wed Sep 27 15:40:52 2017
@@ -58,8 +58,8 @@ import org.apache.pdfbox.util.Matrix;
  */
 public final class PDAcroForm implements COSObjectable
 {
-	private static final Log LOG = LogFactory.getLog(PDAcroForm.class);
-		
+    private static final Log LOG = LogFactory.getLog(PDAcroForm.class);
+        
     private static final int FLAG_SIGNATURES_EXIST = 1;
     private static final int FLAG_APPEND_ONLY = 1 << 1;
 
@@ -218,20 +218,20 @@ public final class PDAcroForm implements
      */
     public void flatten() throws IOException
     {
-    	// for dynamic XFA forms there is no flatten as this would mean to do a rendering
-    	// from the XFA content into a static PDF.
-    	if (xfaIsDynamic())
-    	{
-    		LOG.warn("Flatten for a dynamix XFA form is not supported");
-    		return;
-    	}
-    	
-    	List<PDField> fields = new ArrayList<>();
-    	for (PDField field: getFieldTree())
-    	{
-    		fields.add(field);
-    	}
-    	flatten(fields, false);
+        // for dynamic XFA forms there is no flatten as this would mean to do a rendering
+        // from the XFA content into a static PDF.
+        if (xfaIsDynamic())
+        {
+            LOG.warn("Flatten for a dynamix XFA form is not supported");
+            return;
+        }
+        
+        List<PDField> fields = new ArrayList<>();
+        for (PDField field: getFieldTree())
+        {
+            fields.add(field);
+        }
+        flatten(fields, false);
     }
     
     
@@ -250,20 +250,20 @@ public final class PDAcroForm implements
      */
     public void flatten(List<PDField> fields, boolean refreshAppearances) throws IOException
     {
-    	// for dynamic XFA forms there is no flatten as this would mean to do a rendering
-    	// from the XFA content into a static PDF.
-    	if (xfaIsDynamic())
-    	{
-    		LOG.warn("Flatten for a dynamix XFA form is not supported");
-    		return;
-    	}
-    	
-    	// refresh the appearances if set
-    	if (refreshAppearances)
-    	{
-    		refreshAppearances(fields);
-    	}
-    	
+        // for dynamic XFA forms there is no flatten as this would mean to do a rendering
+        // from the XFA content into a static PDF.
+        if (xfaIsDynamic())
+        {
+            LOG.warn("Flatten for a dynamix XFA form is not supported");
+            return;
+        }
+        
+        // refresh the appearances if set
+        if (refreshAppearances)
+        {
+            refreshAppearances(fields);
+        }
+        
         // indicates if the original content stream
         // has been wrapped in a q...Q pair.
         boolean isContentStreamWrapped;
@@ -366,10 +366,10 @@ public final class PDAcroForm implements
     {
         for (PDField field : getFieldTree())
         {
-        	if (field instanceof PDTerminalField)
-        	{
-        		((PDTerminalField) field).constructAppearances();
-        	}
+            if (field instanceof PDTerminalField)
+            {
+                ((PDTerminalField) field).constructAppearances();
+            }
         }
     }
 
@@ -384,10 +384,10 @@ public final class PDAcroForm implements
     {
         for (PDField field : fields)
         {
-        	if (field instanceof PDTerminalField)
-        	{
-        		((PDTerminalField) field).constructAppearances();
-        	}
+            if (field instanceof PDTerminalField)
+            {
+                ((PDTerminalField) field).constructAppearances();
+            }
         }
     }
     
@@ -757,7 +757,7 @@ public final class PDAcroForm implements
     private boolean resolveNeedsScaling(PDAppearanceStream appearanceStream)
     {
         // Check if there is a transformation within the XObjects content
-    	PDResources resources = appearanceStream.getResources();
+        PDResources resources = appearanceStream.getResources();
         return resources != null && resources.getXObjectNames().iterator().hasNext();
     }
     



Mime
View raw message