Low Encrypted Entropy on PDF File Thank you for the answers, I have edited my questions.
It is a known fact that encrypting the files increases the file entropy. You can see the average entropy values of encrypted and non-encrypted versions of the different files in this
paper (see figure 2). After I read this paper I check out my encryption algorithm and I notice that I was using base64 encoding while overwriting the file and that was decreasing the file entropy. So my problem is solved.
As bmm60 comments, its not clear that the entropy has gone down. There are many forms of encryption that still preserve some level of information about the input (the encrypted version of a bitmap under a block cipher using ECB is a good example). It's also possible that your encryption product adds unencrypted metadata to a file and if there's a large amount of metadata relative to the file size and the metadata is of a very stereotyped form (such as English readable ASCII) then this will have less entropy than the pdf format.
Without more detail on the input and encryption method, there is a limit to what can be said.
UPDATE: According to the description of PDF encryption in this Black Hat talk 256-bit AES-CBC is used. For lengthy plaintexts this should remove bytewise structure and the bytewise entropy should tend towards 8-bits for larger texts. However, the talk also says that PDF encryption only encrypts some of the objects in PDF's Carousel Object Structure and the other objects are unencrypted, largely human readable, markup language which might have a bytewise entropy of only 4-5 bits (English language words have a bytewise entropy in this range). Therefore if the input file is quite short or has a lot of object structures that are neither stream nor strings, the entropy will be closer to this figure. For pdfs with more pages (and hence larger string and streams sections) the entropy should be closer to 8-bits.
Thanks to kelalaka for pointing out the Black Hat talk.