FyTek Forum

Full Version: "on the fly" read-only
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can you make certain fields, and optionally the entire document, read-only, and when in the logic is this done? Searched in manual, not very helpful on this topic in terms of usage example. Any help on this would be beneficial.

Trying to make certain fields “read only” programmatically “on the fly” where user can’t type in any text within the fields.

We tried PDF.setReadOnly(“tbFieldnamewewantreadonly”)
And just PDF.setReadOnly().

We also looked at setFDFFixed, but this has to be used with setFDFFileIn, and aren’t using FDF.

All unsuccessful.

We are trying to set certain fields, and optionally all fields on the document read-only within this context.

PDF.setOutFile(FilePath)
PDF.setDataPDF(FileMaster) 'Master PDF template file

Dim rslt As Object
rslt = PDF.buildPDF
Yes, the setReadOnly did not accept a field name. It would simply set all of the fields to read only.

However, I just put in a change to allow you to add a field name. If you have more than one field, simply call setReadOnly multiple times - once for each field:

PDF.setReadOnly("field1")
PDF.setReadOnly("field2")
etc...

The command line equivalent is -rofields "field1,field2,..."

Of course, you can still call setReadOnly() without a field name to mean all fields in the PDF.

Download a new copy and let me know if that's what you need. If you have any problems with it, let me know. And attach the PDF you're using so I can check to see if there's something unique about it.

Regards,
Mike Bernardo
FyTek, Inc.
"on the fly" what is this friends
Reference URL's