I would like to set a basic preflight report which is somewhat more involved then the supplied basic preflight report in Core.
I would like for the preflight report to tell me the size of the document, (trim box size, media box size). How do I go about doing this?
The PDF preflight report does not include that information. However, that information is available in the XML preflight report.
However, that's a bit more complex than the PDF reports.
If you want to have another system consume the information then the XML report will do the trick. If you want to present it to an user then you will probably want to parse the XML and convert it to antoher format (PDF, HTML, etc.) before presenting to an user. It would take some scripting but it would be doable. Whether it makes sense in this case is a different matter.
Another thing to consider, if you want to determine whether the document matches the expected dimensions then you can do that in Preflight. Simply pass the expected dimensions to FFCore and configure the preflight component to evaluate the dimensions of the selected PDF box against the values passed to FFCore.
I think there are options. I think the question is what do you want to do?