You can specify an earlier version if you like, but this does not actually affect the metadata content that is generated for the PDF document. What you are doing is changing the version number so that the document will pass review. This change does not in fact make the document compliant with more current standards.

You can do this by using the Adobe PDF Library method PDDocSaveWithParams(). The parameter contains a major member and a minor member, referring to the first and second numbers in the version number. For example, if you set these the major value to 1 and the minor value to 7, the method will generate a PDF document and label it as version 1.7-compliant.

Again, that doesn’t mean that the document actually is version 1.7 compliant.

Continuing with this example, if you use a facility within the document which is only available in later versions of the PDF standard, it will not be detected and removed, and you may have created a document which will not process correctly.

The sample code below demonstrates changing the PDF revision number by changing the saveParamsRec structure being passed to the PDDocSave call in the helowrld.c source as follows:

            PDDocSaveParamsRec saveParamsRec;
            memset(&saveParamsRec, 0, sizeof(PDDocSaveParamsRec));
            saveParamsRec.size = sizeof(PDDocSaveParamsRec);
            saveParamsRec.newPath = ASPathFromPlatformPath(OUT_FILENAME);
            saveParamsRec.saveFlags = PDSaveFull;
            saveParamsRec.major = 1;
            saveParamsRec.minor = 4;
            PDDocSaveWithParams(pdDoc, &saveParamsRec);
            ASFileSysReleasePath(NULL, saveParamsRec.newPath);

Note that the major value must be set, too; if it's left at zero, the minor value setting will be ignored.