Validate after creating PDF/A - ghostscript

I am creating a PDF/A from a Postscript using Ghostcript 9.14.
I have a .kfp file which is used to validate the output PDF/A document. Is there any way to validate the generated PDF/A document with the .kfp validator using ghostscript?

There is a PDF/A validator in development called veraPDF, a result of the Preforma program, a project funded by the EU. As far as I know, it does not use the .kfp validator, but it does validate your PDF/A - sees if it is conform the different flavours of PDF/A.
Hope this can help.

Related

File size restriction upon form submission

Is both approaches the same when it comes to application processing the request?
spring.servlet.multipart.max-file-size
Or just validating the file in my controller (or using form validation using #Valid and implementing Validator, etc).
Does both approaches check file size AFTER application has fully received the request? Or spring.servlet.multipart.max-file-size sets the file upload size restriction at the server (tomcat) level?
It seems that spring.servlet.multipart.max-file-size is a better approach. This property is set for MultipartResolver bean automatically. This bean is created automatically in Springboot. In Spring and/or Spring MVC (basically, not Springboot), this bean needs to be created manually.
MultipartResolver bean is the one that handles the file size uploaded via a form. This approach is better because it doesn't load up the whole file. It gets the file size through a header, and if file size exceeds the value set as a value for the property spring.servlet.multipart.max-file-size, it throws an error.
Validating the file size via #Valid/Validator approach is not wise because the whole file will be uploaded to the server.

Custom error message for custom validation annotation

I got this problem, that I got from my friend a annotation code that checks if input data is proper VIN number. Annotation works fine, however when number is wrong it should render a default message:
String message() default "{validator.nrVINBad}";
I dont't know where to put this message, I tried my *.properties files but it's not that. Everywhere I look, there's always instructions how to make message from *.properties files, but as I know now, you can't put in those files error messages.
This is not part of JSF. This is part of Bean Validation (BV, also known as "JSR303"). Both JSF and BV are part of Java EE. JSF just happens to have builtin recognition and delegation for BV.
To localize BV messages, just follow the instructions in chapter 4.3.1.1 of JSR303 specification. In a nutshell, create a ValidationMessages.properties file in the classpath root (there where your Java source code also is, so that it ultimately ends up in /WEB-INF/classes) with he following content:
validator.nrVINBad = Your message here
See also:
Internationalization in JSF, when to use message-bundle and resource-bundle?

Hibernate Validator Not Correctly Displaying Unicode Characters

I am building a Spring MVC web application that uses JSR-303 validation. With the first form I created, I added a couple of validation annotations (including custom error message codes) to the form backing bean. I also created ValidationMessages.properties and ValidationMessages_en.properties files.
Everything seems to be working correctly with one exception: multi-byte utf-8 encoded characters are not displayed correctly (e.g., "ñ" is displayed as "ñ").
This is not a problem with my standard messages.properties and messages_en.properties files that I use for field labels and other text, so I'm assuming it's an issue with the hibernate validator code. Has anyone else had this issue and solved it? FYI, I'm using Hibernate version 4.3.0.Final.
Thanks,
Peter
In my properties files I must include special characters like this:
\u00F3 instead of ó
In that way they are shown well.
Hope it helps.
P.S.: Using ResourceBundleEditor from Eclipse also helps.

NamespaceHandler in spring

What is a NamespaceHandler? What is the need to write our custom NamespaceHandler?
Please explain me the significance of NamespaceHandler. Provide me Any links on internet.
It handles specific XML tags found inside a file, such as <log:return />, which is the return tag inside the log namespace.
The best reference is often the Javadoc.
It is useful if you want to use your custom XML tags in an XML configuration:
http://www.theserverside.com/news/1364131/Authoring-Custom-Namespaces-in-Spring-20
If you have a framework and want to add Spring integration to your framework, it could be useful. In that case it would be more important to define the equivalent annotations.

Struts2 + Internationalization

Is it possible that when I use the "getText("keyName"); in action class, I can specify that pick the value from ENGLISH resource bundle ONLY. Because I just want to use this value for logging purposes.
Any thoughts how can I achieve this?
BR
SC
You can do what you're looking for with:
LocalizedTextUtil.findDefaultText("keyName", Locale.ENGLISH)
This is a utility class in XWork (Struts2) that handles localization.
see these examples for struts internationalization link1,link2
These examples are given using struts1, with some simple modification, you can use them for struts2

Resources