Remove blank PDF pages with A-PDF Scan Optimizer

Recently I posted about A-PDF Page Cut, which was able to split PDF pages in half, it turns out that once you do this you get a lot of blank pages (not nice for your Kindle). Conveniently, produced by the same company is A-PDF Scan Optimizer which removes these blank pages. A-PDF Scan Optimizer does have a number of other features tailored to page scanning documents, included de-skewing, and rescaling, but I was only interested in the blank page removal feature.

To remove blank pages of a non-scanned PDF, Scan Optimizer is very straight forward to use, but if you have scanned PDFs which may have some grey shades on the blank pages, it may require a bit of tweaking to get right.

A-PDF Scan Optimizer startup interface

Once you have “Turned On” the Delete Blank Pages option click Settings to bring up the options.

A-PDF Scan Optimizer delete blank settings

Though the help is non-existent for the Delete Blank Pages settings, there are two main settings to change and these are used to determine if a page is considered blank;

  • Black\white value – grey scale images have 256 shades of grey (0 being black and 255 being white), this setting sets the threshold to determine what should be black and what should be white, a setting of 128 means half the greys shades are white and half are black. If there are slight grey shades on your blank pages, this should be set so that you can no longer see them on the preview.
  • Threshold value – now that the image is black and white only, what is the faction of acceptable black on the page to still consider the page blank. This is useful if there are black specs on the pages. A value of 0.001 means 0.1% of the page can have black on it and still be considered blank. Set this high enough so that you get a result of “blank”.

Since my PDFs all originated from a digital source, I set them to the extreme settings of 255 and 0.00001. Click Optimize and Save As, the Scan Optimizer will batch process the list of PDFs and log which pages were deleted.

Review of A-PDF Page Cut – software to split a pdf page in half

I came into the requirement of needing to split the  pages of a pdf in half, normally this is required when you scan a book and have two pages per scan, but my specific example was a Lonely Planet digital publication which for some reason was  released similarly, as I wanted to view it on a Kindle I required single pages only.

My first trial was free software Briss, Java coded cross-platform, I did not find it intuitive at all and couldn’t get it to work, there was no way to select exactly half of the sheet, and no batch functionality.

I then moved to Page Cut by A-PDF, A-PDF have an interesting offer called “Blog it and get it” where you blog about the software and they give you a free license, hence this post, hopefully it pulls through.

Page Cut is extremely easy to use, the steps to split a page in half are;

  1. Open pdf with Page Cut
  2. Click Add a Vertical Line from the toolbar
  3. Click Apply with default settings
  4. Click Cut and Save As

That’s it you have a single page per page pdf.

Cutting a single pdf pages in half

Batch Cut Mode is even easier;

  1. Import pdf  with Page Cut
  2. Select Cut Vertical In Half
  3. Click Cut and Save As

Batch cutting multiple pdf pages in half

So what is Page Cut missing?

I would like to see some smarts; mainly for batch cuts, warnings if cuts go through words (or there isn’t enough blank white space).

The other thing needed is a column showing if the pdf is Landscape or Portait, with the option to select/deselect either. In general a landscape page will have two pages per page, a portrait page can be ignored.

As I needed this functionality, I wrote a little VB function that finds the page orientation, it does require Acrobat though. I could then filter and move to a separate folder landscape orientated pdfs to be imported into Page Cut, here’s the code;

Public Function getOrientation(ByRef gPDFPath As String) As String
    If LenB(gPDFPath) > 0 Then
        Dim acroApp, avDoc, pdDoc, pdPage
        Dim acroPoint
        Dim x As Long, y As Long

        Set acroApp = CreateObject("AcroExch.App")
        If acroApp.GetNumAVDocs = 0 Then 'no existing files
            acroApp.Hide
        End If
        Set avDoc = CreateObject("AcroExch.AVDoc")
        If avDoc.Open(gPDFPath, "Accessing PDF's") Then
            If Not avDoc.IsValid Then
                getOrientation = "Error"
                Exit Function
            End If

            Set pdDoc = avDoc.GetPDDoc()
            Set pdPage = avDoc.GetPDDoc.AcquirePage(0) 'first page

            Set acroPoint = pdPage.GetSize()
            x = acroPoint.x
            y = acroPoint.y
            Set acroPoint = Nothing

            If x >= y Then
                getOrientation = "Landscape"
            Else
                getOrientation = "Portrait"
            End If
        End If
        pdDoc.Close
        avDoc.Close True
'        If acroApp.GetNumAVDocs > 0 Then
'            acroApp.CloseAllDocs
'        End If
        acroApp.Exit
        Set acroApp = Nothing
        Set avDoc = Nothing
        Set pdDoc = Nothing
        Set pdPage = Nothing
    End If
End Function

Finally, on my search for the above functionality I tried A-PDF Explorer, what I noticed was a second folder in my Program Files and Start menu, given A-PDF make a large amount of tools, why not have a root folder A-PDF, with subfolders for each product, makes more sense.