DynaPDF - locking/unlocking PDFs

Hi
So far I alway used this code to forbid modifying of my pdfs (created with xojo +dynapdf addon):

Dim flags as integer flags = BitwiseOr(flags, pdf.krsModify) // forbit modifying flags = BitwiseOr(flags, pdf.krsCopyObj) // forbit copying content call pdf.CloseFileEx("", "Sanda", pdf.kkl128bit, flags)

Now I was trying to create a free editable pdf so I used this

call pdf.CloseFil()

But I found out that the pdfs are still locked from copying and editing. So now I have two questions:

  1. what does exactly do the first example code
  2. how do I make an editable PDF ?

The end result seems to be exactly the same for both options… What am I missing here ?

Many thanks

What exactly is the problem?

You import an encrypted PDF and save without setting up encryption and it’s still written encrypted?

I don’t import. I create the pdf with my app.
The probleam is that apparenty I can only make “locked PDFs” and I want to make also an editable PDFs ?
How can I do it ?

Are you just you just call CloseFile and don’t request any encryption?

If you like, you can send test project by email.