I'm trying merge several pdf files into one page. I am using ghostcript to merge all of them but I have problem when I merge one with a blank page. So I have to check each one for a blank pdf document. Is there any way to do this with the standard bash shell or Ruby language?

I am using pdffonts to identify if the pdf is blank or not. I'm using the command :

> 
> pdffonts 00001.pdf
> 
> 
> 

and if the pdf is blank the result is :

```
name                                type              emb sub uni object ID

------------------------------------ ----------------- --- --- --- ---------

```

if the pdf is not blank the result is 

```
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
Helvetica                            Type 1            no  no  no       6  0

```