public static void main(String args[]) throws FileNotFoundException {

		try {

			t = PdfUtilities.chooseFolder();

			if (t != null) {

				ArrayList<File> files = PdfUtilities.getPaths(new File(t),
						new ArrayList<File>());
				if (files == null)
					return;
				String extension;
				PdfReader reader;
				try {
					for (int i = 0; i < files.size(); i++)
						// prints out only files and not the subdirectories as
						// well
						if (!files.get(i).isDirectory()) {

							System.out.println(files.get(i).getCanonicalPath());
							extension = Files.probeContentType(files.get(i)
									.toPath());

							if (extension.equals("application/pdf")) {
								System.out.println(files.get(i));
								try {
									reader = new PdfReader(files.get(i)
											.toString());
									if (!reader.isEncrypted()) {
										repairWithItext(reader, files.get(i)
												.getName());
									}
								}

								catch (Exception e) {
									System.out.println(e);
								}
							}
						}

				} catch (IOException e) {
					e.printStackTrace();
				}
			}

		} catch (FileNotFoundException e) {
		}

	}