@MinDoc(copyright="Copyright 2008 , 2009 A. Weinert", author="Albrecht Weinert", version="V.11", lastModified="5.02.2019", lastModifiedBy="A. Weinert", usage="start as Java application (-? for help)\njava de.frame4j.PDFcompose [options] xmlFile\nsee de.frame4j.PDFcompose javaDoc for xml control file syntax", purpose="compose a PDF from other PDF\'s parts") public class PDFcompose extends App
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- see de.frame4j.PDFcompose
http://a-weinert.de/java/ -->
<compose type="pdf" filename="outfile.pdf">
<!-- type at present pdf only; filename will be overwritten
Text content: descriptive not for the pdf output -->
set of transparencies about having guinea pigs composed of (parts
of) animal species, open-air enclosure and feeding
<in filename="species.pdf">
description of guinea pigs; pages: 1, 3, 8..10, 22..24
<page nr="1" />
<page nr="3" />
<!-- default end = nr , count = 1 -->
<page nr="8" end="10" />
<page nr="22" count="3" />
</in>
<in filename=" open-air.pdf">
open air cage for guinea pigs; pages: 7..11
<page nr="7" count="5" />
</in>
<in filename="feeding.pdf">
feeding guinea pigs; pages: 7, 9, 2
<page nr="7" />
<page nr="9" />
<page nr="2" />
</in>
</compose>
The first page (i.e. page 1, not the first used / transfered page) of the
first <in />-file determines the page format of the output PDF file.
Eventually use a first dummy <in />-file without using any of its
<page />s.TextHelper
,
SAXHandler
ano, appBase, appIO, appStartTime, appStartTimeMS, args, bgColor, err, fullClassName, help, icon, INIT_ERROR, JOB_DONE_OK, log, LOG_OUT_ERROR, MAIN_THREAD_EXC, mainThread, myClass, myFrame, name, NO_PARS_ERROR, out, outMode, packName, prop, retCode, runFlag, shortClassName, title, verbose, verbosity
ILLEGAL_TYPE, ILLEGAL_VALUE, NO_ATTRIBUTE, NO_KNOWN_ATTRIBUTE, NO_VALUE, OK
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowNoPropertiesFile()
Decide, if the basic .properties file may be omitted.
|
int |
doIt()
Working method of the application PDFcompose.
|
static void |
main(String[] args)
Start method of PDFcomposer.
|
static void |
makePDFcomposite(String xmlInp,
String pdfOut,
PrintWriter log,
boolean verbose)
Make a PDF file / compositum according to XML description.
|
actionPerformed, clientOrder, condHelpLog, connect, errMeld, errMeld, errorExit, errorExit, errorText, formMessage, formMessage, getAbout, getAboutText, getActTime, getAppLogger, getAppStartTime, getArgs, getAttribute, getAuthor, getCopyright, getDbLogger, getExecTimeMs, getExecTimeString, getHelp, getHelpText, getIcon, getLanguage, getLogHandler, getMessageComponent, getMessageComponentsLength, getMyFrame, getName, getNameWithVersDate, getOutMode, getProp, getPurpose, getStartTime, getStateString, getTheCloser, getTitle, getUsage, getVerbosity, getVerbosityString, getVersDate, getXMLinput, go, go, go, haveIcon, isDebug, isHelp, isHelpLog, isNormal, isRunFlag, isSilent, isTest, isVerbose, logVerbose, logVerbose, makeStatusTextEnd, makeStatusTextStart, messageFormat, normalExit, parsePartial, performeAction, queueAction, setAboutText, setAttribute, setAttribute, setAuthor, setBgColor, setCodePages, setCopyright, setHelp, setLogOut2, setName, setOutMode, setOutMode, setPurpose, setTitle, setUsage, setVerbose, setVerbose, setVerbosity, setVerbosity, setVerbosityString, setVersDate, stop, threeLineEndMsg, toString, twoLineEndMsg, twoLineStartMsg, valueLang, valueLang, wakeMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTheClass
protected boolean allowNoPropertiesFile()
App
App
with a go method
constructs the App
's Prop
object. In this process
.properties files of appropriate name (appName.properties) are searched
as file or as resource (in the .jar).App
.go()
) constructs a Prop
object
for the application using a constructor like
Prop.Prop(App, CharSequence)
. Hereby a basic property file
named App.shortClassName
.properties is searched for as file or
resource at different places. Finding it nowhere gets a
FileNotFoundException
going up to the starter method.
The reason for that stringency is, that App
-Extensions
and their .properties file are considered as a unit. If not
this is considered as the special case
"allowNoPropertiesFile".Prop.Prop()
).App
only the
last ones base .properties file is searched for.allowNoPropertiesFile
in class App
public static void main(String[] args)
args
- command line parameterdoIt()
,
App.go(String[], boolean)
public static void makePDFcomposite(String xmlInp, String pdfOut, PrintWriter log, boolean verbose) throws SAXNotRecognizedException, SAXNotSupportedException, ParserConfigurationException, SAXException, IOException
PDFcompose
object
according to a XML description. class documentation
. PDFcompose
if
executed as application / programme. It will be the central working method
for other uses.xmlInp
- file name of the XML descriptionpdfOut
- file name of the PDF output
(overrides a denotation in the XML if given)log
- log outputverbose
- log extensivelySAXException
- forwarded from SaxHandlerParserConfigurationException
- forwarded from SaxHandler etc.SAXNotSupportedException
- JDK installation problemSAXNotRecognizedException
- JDK installation problemIOException
- problems with streamspublic int doIt()
doIt
in class App
makePDFcomposite(String, String, PrintWriter, boolean)
,
App