diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java index 4b6f29c5ff22b5e647d02b33cd86b273fb03f631..48d128ff3b6b2532515fe00294719dac4393aeb4 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java @@ -1,41 +1,21 @@ package de.tudresden.inf.mci.brailleplot; -import de.tudresden.inf.mci.brailleplot.configparser.ConfigurationParser; -import de.tudresden.inf.mci.brailleplot.configparser.Format; -import de.tudresden.inf.mci.brailleplot.configparser.JavaPropertiesConfigurationParser; -import de.tudresden.inf.mci.brailleplot.configparser.Printer; - -import de.tudresden.inf.mci.brailleplot.exporter.PrintDirector; -import de.tudresden.inf.mci.brailleplot.exporter.PrinterConfiguration; - import de.tudresden.inf.mci.brailleplot.commandline.CommandLineParser; import de.tudresden.inf.mci.brailleplot.commandline.SettingType; import de.tudresden.inf.mci.brailleplot.commandline.SettingsReader; import de.tudresden.inf.mci.brailleplot.commandline.SettingsWriter; -import de.tudresden.inf.mci.brailleplot.rendering.RasterCanvas; -import de.tudresden.inf.mci.brailleplot.rendering.Image; -import de.tudresden.inf.mci.brailleplot.rendering.MasterRenderer; -import diagrams.BarChart; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import parser.CategorialPointListList; -import parser.CsvOrientation; -import parser.CsvParser; -import parser.CsvType; -import java.io.File; -import java.io.FileReader; import java.util.Optional; -import java.io.IOException; import java.util.concurrent.ConcurrentLinkedDeque; - /** * Main class. * Set up the application and run it. - * @author Georg GraĂźnick, Andrey Ruzhanskiy - * @version 28.06.19 + * @author Georg GraĂźnick + * @version 06.06.19 */ public final class App { @@ -45,7 +25,7 @@ public final class App { * Instantiate application and execute it. * @param args Command line parameters. */ - public static void main(final String[] args) throws IOException { + public static void main(final String[] args) { App app = App.getInstance(); System.exit(app.run(args)); } @@ -121,7 +101,6 @@ public final class App { * @param args Command line parameters. * @return 0 if Application exited successfully, 1 on error. */ - @SuppressWarnings("checkstyle:MagicNumber") int run(final String[] args) { // Has to be the first finalizer to be added, so that it is run last @@ -147,52 +126,9 @@ public final class App { } // Parse csv data - String csvPath = getClass().getClassLoader().getResource("0_bar_chart.csv").getFile(); - CsvType csvType = CsvType.X_ALIGNED_CATEGORIES; - CsvOrientation csvOrientation = CsvOrientation.HORIZONTAL; - CsvParser parser = new CsvParser(new FileReader(csvPath), ',', '"'); - CategorialPointListList points = (CategorialPointListList) parser.parse(csvType, csvOrientation); - BarChart exampleBarChart = new BarChart(points); // ... - // Config Parsing - - String usedPrinter = "index_everest_d_v4.properties"; - //String usedPrinter = "index_basic_d.properties"; - String defaultConfigFilePath = getClass().getClassLoader().getResource("default.properties").getFile(); - String configFilePath = getClass().getClassLoader().getResource(usedPrinter).getFile(); - ConfigurationParser configParser = new JavaPropertiesConfigurationParser(configFilePath, defaultConfigFilePath); - Printer printerConfig = configParser.getPrinter(); - Format formatConfig = configParser.getFormat("wide"); - - - // Rasterizing - MasterRenderer renderer = new MasterRenderer(printerConfig, formatConfig); - //RasterCanvas canvas = renderer.rasterize(exampleBarChart); - File imageFile = new File(getClass().getClassLoader().getResource("2_image_chart.png").getFile()); - Image image = new Image(imageFile); - RasterCanvas canvas = renderer.rasterize(image); - System.out.println(canvas.getCurrentPage()); - - - // Last Step: Printing - - - if (PrintDirector.printerExists(printerConfig.getProperty("name").toString())) { - System.out.println("Ja"); - } else { - System.out.println("Nein"); - } - - - PrintDirector printD = new PrintDirector(PrinterConfiguration.NORMALPRINTER); - printD.print(printerConfig.getProperty("name").toString(), canvas.getCurrentPage()); - /* - byte[] data = lt.buildDemo(1); - lt.printString(data); - */ - } catch (final Exception e) { terminateWithException(e); } @@ -202,43 +138,4 @@ public final class App { return EXIT_SUCCESS; } -/* - public void dummyConfigurationParsing() { - - String workingDir = System.getProperty("user.dir"); - String defaultConfigPath = workingDir + "/defaultConfig.properties"; - String concreteConfigPath = workingDir + "/dummyPrinterConfig.properties"; - - // create parser and parse default config - try { - JavaPropertiesConfigurationParser configParser = new JavaPropertiesConfigurationParser(defaultConfigPath); - Printer defaultPrinter = configParser.getPrinter(); - Format defaultFormat = configParser.getFormat("default"); - // parse concrete configuration with set defaults - configParser = new JavaPropertiesConfigurationParser( - concreteConfigPath, - defaultPrinter, - defaultFormat - ); - Printer printerConfig = configParser.getPrinter(); - for (String property : printerConfig.getPropertyNames()) { - System.out.println("Property: " + property + "=" + printerConfig.getProperty(property)); - } - - for (String formatName : configParser.getFormatNames()) { - System.out.println("Format: " + formatName); - Format formatConfig = configParser.getFormat(formatName); - for (String property : formatConfig.getPropertyNames()) { - System.out.println("Property: " + property + "=" + formatConfig.getProperty(property)); - } - } - } catch (ConfigurationValidationException e) { - System.out.println(e.getMessage()); - } catch (ConfigurationParsingException e) { - System.out.println(e.getMessage()); - } - - } -*/ - -} +} \ No newline at end of file diff --git a/src/test/java/de/tudresden/inf/mci/brailleplot/configparser/JavaPropertiesConfigurationParserTest.java b/src/test/java/de/tudresden/inf/mci/brailleplot/configparser/JavaPropertiesConfigurationParserTest.java new file mode 100644 index 0000000000000000000000000000000000000000..2424e277a05ad327e22f63baa396047522d809c9 --- /dev/null +++ b/src/test/java/de/tudresden/inf/mci/brailleplot/configparser/JavaPropertiesConfigurationParserTest.java @@ -0,0 +1,133 @@ +package de.tudresden.inf.mci.brailleplot.configparser; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.NoSuchElementException; +import java.util.Set; + + +public class JavaPropertiesConfigurationParserTest { + + public static final String mDefaultConfigPath = getResource("default.properties").getAbsolutePath(); + public static final String mConcreteConfigPath = getResource("concrete.properties").getAbsolutePath(); + public static Printer mPrinterConfig; + public static Format mFormatConfig; + + public static File getResource(String fileName) { + ClassLoader classLoader = ClassLoader.getSystemClassLoader(); + File resourceFile = new File(classLoader.getResource(fileName).getFile()); + return resourceFile; + } + + // Correct use testcases + @Test @BeforeAll + public static void testSuccessfulParsing() { + Assertions.assertDoesNotThrow(() -> { + // Parse concrete properties and defaults + ConfigurationParser parser = new JavaPropertiesConfigurationParser(mConcreteConfigPath, mDefaultConfigPath); + mPrinterConfig = parser.getPrinter(); + Set<String> properties = mPrinterConfig.getPropertyNames(); + Set<String> formats = parser.getFormatNames(); + mFormatConfig = parser.getFormat("A4"); + }); + } + @Test + public void testCorrectValues() { + // default values - not overwritten + Assertions.assertEquals(200, mPrinterConfig.getProperty("raster.constraint.width").toDouble()); + Assertions.assertEquals("6-dot", mPrinterConfig.getProperty("raster.type").toString()); + Assertions.assertEquals(10, mFormatConfig.getProperty("margin.bottom").toInt()); + + // overwritten values + + Assertions.assertEquals(true, mPrinterConfig.getProperty("floatingDot.support").toBool()); + Assertions.assertEquals(0, mFormatConfig.getProperty("margin.left").toInt()); + + // values without default + Assertions.assertEquals("Dummy Printer", mPrinterConfig.getProperty("name").toString()); + Assertions.assertEquals(0.05, mPrinterConfig.getProperty("floatingDot.resolution").toDouble()); + + } + @Test + public void testCompatibleTypeConversion() { + Assertions.assertEquals("5.0", mPrinterConfig.getProperty("constraint.top").toString()); + Assertions.assertEquals(false, mPrinterConfig.getProperty("raster.dotDiameter").toBool()); + + Assertions.assertEquals(297.0, mFormatConfig.getProperty("page.height").toDouble()); + } + @Test + public void testFallbackProperties() { + + String specifiedByConfig[] = {"name", "mode", "brailletable", "floatingDot.support", "floatingDot.resolution", "constraint.top", "constraint.left", "raster.dotDistance.horizontal", "raster.dotDistance.vertical", "raster.cellDistance.horizontal", "raster.cellDistance.vertical", "raster.dotDiameter"}; + String specifiedByFallback[] = {"mode", "brailletable", "floatingDot.support", "constraint.top", "constraint.left", "raster.constraint.top", "raster.constraint.left", "raster.constraint.width", "raster.constraint.height", "raster.type", "raster.dotDistance.horizontal", "raster.dotDistance.vertical", "raster.cellDistance.horizontal", "raster.cellDistance.vertical", "raster.dotDiameter"}; + + // config shall extend the fallback + HashSet<String> expectedPropertyNames = new HashSet<>(Arrays.asList(specifiedByConfig)); + expectedPropertyNames.addAll(new HashSet<>(Arrays.asList(specifiedByFallback))); + + HashSet<String> propertyNames = mPrinterConfig.getPropertyNames(); + Assertions.assertEquals(expectedPropertyNames, propertyNames); + } + + + // Incorrect use testcases + @Test + public void testIllegalFile() { + Assertions.assertThrows( + ConfigurationParsingException.class, + () -> new JavaPropertiesConfigurationParser("nonexistent.properties", mDefaultConfigPath) + ); + } + @Test + public void testMissingRequired() { + String configPath = getResource("missingRequiredPropertyExample.properties").getAbsolutePath(); + Assertions.assertThrows( + IllegalStateException.class, + () -> new JavaPropertiesConfigurationParser(configPath, mDefaultConfigPath) + ); + } + @Test + public void testIllegalProperty() { + String configPath = getResource("illegalPropertyNameExample.properties").getAbsolutePath(); + Assertions.assertThrows( + ConfigurationValidationException.class, + () -> new JavaPropertiesConfigurationParser(configPath, mDefaultConfigPath) + ); + } + @Test + public void testIllegalValue() { + String configPath = getResource("illegalPropertyValueExample.properties").getAbsolutePath(); + Assertions.assertThrows( + ConfigurationValidationException.class, + () -> new JavaPropertiesConfigurationParser(configPath, mDefaultConfigPath) + ); + } + @Test + public void testNonexistentFormat() { + Assertions.assertThrows(NoSuchElementException.class, () -> { + ConfigurationParser parser = new JavaPropertiesConfigurationParser(mConcreteConfigPath, mDefaultConfigPath); + parser.getFormat("B5"); + }); + } + @Test + public void testNonexistentProperties() { + Assertions.assertThrows(NoSuchElementException.class, () -> { + ValidProperty spooderman = mPrinterConfig.getProperty("spooderman"); + }); + Assertions.assertThrows(NoSuchElementException.class, () -> { + ValidProperty doge = mFormatConfig.getProperty("doge"); + }); + } + @Test + public void testIncompatibleTypeConversion() { + Assertions.assertThrows(NumberFormatException.class, () -> mPrinterConfig.getProperty("floatingDot.support").toInt()); + Assertions.assertThrows(NumberFormatException.class, () -> mPrinterConfig.getProperty("raster.cellDistance.horizontal").toInt()); + Assertions.assertThrows(NumberFormatException.class, () -> mPrinterConfig.getProperty("name").toDouble()); + } + +} diff --git a/src/test/resources/concrete.properties b/src/test/resources/concrete.properties new file mode 100644 index 0000000000000000000000000000000000000000..78a56cbb7497b0fbefd5d685d9b822a519286469 --- /dev/null +++ b/src/test/resources/concrete.properties @@ -0,0 +1,50 @@ +# JProperties Printer & Format Configuration +# +# Embosser: Dummy Printer +# Test Revision (19-07-18) (DON'T USE FOR PRINTING) +# +# Description: +# This is the main configuration file for use with the braille plot application +# when embossing with the 'Index Everest-D V4'. +# The configuration specifies the general printer abilities and defines +# pre-selectable formats for this embosser. +# +# https://gitlab.hrz.tu-chemnitz.de/s9444737--tu-dresden.de/brailleplot/wikis/Software%20Design#configuration-files +# ============================================================================= + +### General Printer Properties +### ========================== + +printer.name=Dummy Printer +printer.mode=normal +printer.brailletable=src/test/resources/mapping.properties +printer.floatingDot.support=true +printer.floatingDot.resolution=0.05 + +# The following values represent the fixed indentation and maximum technical printing area of the embosser. +# If the outputs don't fit on the page you might want to tweak this values. (Check the format too.) +printer.constraint.top=5.0 +printer.constraint.left=0 + +# The following properties define the exact grid spacing. +printer.raster.cellDistance.horizontal=3.6 +printer.raster.cellDistance.vertical=4.8 +printer.raster.dotDistance.horizontal=2.5 +printer.raster.dotDistance.vertical=2.5 +printer.raster.dotDiameter=1.5 + +### Format Definitions +### ================== + +# A4 Format +format.A4.page.width=210 +format.A4.page.height=297 +format.A4.margin.left=0 + +# A5 Format +format.A5.page.width=148 +format.A5.page.height=210 +format.A5.margin.top=0 +format.A5.margin.left=0 +format.A5.margin.bottom=0 +format.A5.margin.right=0 \ No newline at end of file diff --git a/src/test/resources/default.properties b/src/test/resources/default.properties new file mode 100644 index 0000000000000000000000000000000000000000..9642c43bd28cdc162d3a668e69cab4c0114002d1 --- /dev/null +++ b/src/test/resources/default.properties @@ -0,0 +1,55 @@ +# JProperties Printer & Format Configuration +# +# Embosser: Dummy Default +# Test Revision (19-07-18) (DON'T USE FOR PRINTING) +# +# Description: +# This is the default configuration file for the braille plot application. +# The configuration specifies the default values of required properties. +# +# https://gitlab.hrz.tu-chemnitz.de/s9444737--tu-dresden.de/brailleplot/wikis/Software%20Design#configuration-files +# ============================================================================= + +# ATTENTION: Changes to this configuration will affect settings for ALL printer and format definitions which +# are not overriding the defaults. + +printer.mode=normal +printer.brailletable=src/test/resources/mapping.properties +printer.floatingDot.support=false + +# The following values represent the fixed indentation and maximum technical printing area of the embosser. +# If the outputs don't fit on the page you might want to tweak this values. (Check the format too.) +printer.constraint.top=0 +printer.constraint.left=0 +# The second constraint in the printer.raster namespace helps to limit the available printing area in steps of +# whole cells, for example if the printer enforces a maximum char per line limit or borders are activated. +printer.raster.constraint.top=0 +printer.raster.constraint.left=0 +printer.raster.constraint.width=200 +printer.raster.constraint.height=300 + +# Overall grid layout / type +printer.raster.type=6-dot + +# The following properties define the exact grid spacing. Standard values based on the +# 'Marburg Medium' publication standard as described in the FFI braille technical guideline: +# https://www.ffi.de/assets/Uploads/Technische-Richtlinie-Blindenschrift.pdf +# See also: # https://codes.iccsafe.org/content/ICCA117_12003/chapter-7-communication-elements-and-features#ICCA117.1_2003_Ch07_Sec703 +printer.raster.cellDistance.horizontal=3.5 +printer.raster.cellDistance.vertical=5.0 +printer.raster.dotDistance.horizontal=2.5 +printer.raster.dotDistance.vertical=2.5 +printer.raster.dotDiameter=1.5 + + +### Format Definitions +### ================== + +# Default Format Definition +format.default.page.height=297 +format.default.margin.top=10 +format.default.margin.left=10 +format.default.margin.bottom=10 +format.default.margin.right=10 + +# This is a template. Do not define concrete formats in this file. Use the specific user config file for this purpose. \ No newline at end of file diff --git a/src/test/resources/illegalPropertyNameExample.properties b/src/test/resources/illegalPropertyNameExample.properties new file mode 100644 index 0000000000000000000000000000000000000000..dfcd25499781fd116ed793444de0c121002f30b6 --- /dev/null +++ b/src/test/resources/illegalPropertyNameExample.properties @@ -0,0 +1,59 @@ +# JProperties Printer & Format Configuration +# +# Embosser: Dummy Default with illegal property name +# Test Revision (19-07-18) (DON'T USE FOR PRINTING) +# +# Description: +# This is the default configuration file for the braille plot application. +# The configuration specifies the default values of required properties. +# +# https://gitlab.hrz.tu-chemnitz.de/s9444737--tu-dresden.de/brailleplot/wikis/Software%20Design#configuration-files +# ============================================================================= + +# ATTENTION: Changes to this configuration will affect settings for ALL printer and format definitions which +# are not overriding the defaults. + +printer.mode=normal +printer.brailletable=src/test/resources/mapping.properties +printer.floatingDot.support=false + +# Illegal property name example +printer.garbageProperty=illegal + +# The following values represent the fixed indentation and maximum technical printing area of the embosser. +# If the outputs don't fit on the page you might want to tweak this values. (Check the format too.) +printer.constraint.top=0 +printer.constraint.left=0 +# The second constraint in the printer.raster namespace helps to limit the available printing area in steps of +# whole cells, for example if the printer enforces a maximum char per line limit or borders are activated. +printer.raster.constraint.top=0 +printer.raster.constraint.left=0 +printer.raster.constraint.width=200 +printer.raster.constraint.height=300 + +# Overall grid layout / type +printer.raster.type=6-dot + +# The following properties define the exact grid spacing. Standard values based on the +# 'Marburg Medium' publication standard as described in the FFI braille technical guideline: +# https://www.ffi.de/assets/Uploads/Technische-Richtlinie-Blindenschrift.pdf +# See also: # https://codes.iccsafe.org/content/ICCA117_12003/chapter-7-communication-elements-and-features#ICCA117.1_2003_Ch07_Sec703 +printer.raster.cellDistance.horizontal=3.5 +printer.raster.cellDistance.vertical=5.0 +printer.raster.dotDistance.horizontal=2.5 +printer.raster.dotDistance.vertical=2.5 +printer.raster.dotDiameter=1.5 + + +### Format Definitions +### ================== + +# Default Format Definition (assume A4 portrait) +format.default.page.width=210 +format.default.page.height=297 +format.default.margin.top=10 +format.default.margin.left=10 +format.default.margin.bottom=10 +format.default.margin.right=10 + +# This is a template. Do not define concrete formats in this file. Use the specific user config file for this purpose. \ No newline at end of file diff --git a/src/test/resources/illegalPropertyValueExample.properties b/src/test/resources/illegalPropertyValueExample.properties new file mode 100644 index 0000000000000000000000000000000000000000..9e6f8f2eb6156cffbeb4c126853c390973d437d2 --- /dev/null +++ b/src/test/resources/illegalPropertyValueExample.properties @@ -0,0 +1,59 @@ +# JProperties Printer & Format Configuration +# +# Embosser: Dummy Default with illegal property value +# Test Revision (19-07-18) (DON'T USE FOR PRINTING) +# +# Description: +# This is the default configuration file for the braille plot application. +# The configuration specifies the default values of required properties. +# +# https://gitlab.hrz.tu-chemnitz.de/s9444737--tu-dresden.de/brailleplot/wikis/Software%20Design#configuration-files +# ============================================================================= + +# ATTENTION: Changes to this configuration will affect settings for ALL printer and format definitions which +# are not overriding the defaults. + +printer.mode=normal +printer.brailletable=src/test/resources/mapping.properties +printer.floatingDot.support=false + +# The following values represent the fixed indentation and maximum technical printing area of the embosser. +# If the outputs don't fit on the page you might want to tweak this values. (Check the format too.) +printer.constraint.top=0 +printer.constraint.left=0 +# The second constraint in the printer.raster namespace helps to limit the available printing area in steps of +# whole cells, for example if the printer enforces a maximum char per line limit or borders are activated. +printer.raster.constraint.top=0 +printer.raster.constraint.left=0 +printer.raster.constraint.width=200 +printer.raster.constraint.height=300 + +# Overall grid layout / type +printer.raster.type=6-dot + +# The following properties define the exact grid spacing. Standard values based on the +# 'Marburg Medium' publication standard as described in the FFI braille technical guideline: +# https://www.ffi.de/assets/Uploads/Technische-Richtlinie-Blindenschrift.pdf +# See also: # https://codes.iccsafe.org/content/ICCA117_12003/chapter-7-communication-elements-and-features#ICCA117.1_2003_Ch07_Sec703 +printer.raster.cellDistance.horizontal=3.5 +printer.raster.cellDistance.vertical=5.0 +printer.raster.dotDistance.horizontal=2.5 +printer.raster.dotDistance.vertical=2.5 +printer.raster.dotDiameter=1.5 + + +### Format Definitions +### ================== + +# Default Format Definition (assume A4 portrait) +format.default.page.width=210 + +# Illegal property value example +format.default.page.height=two hundred ninety seven + +format.default.margin.top=10 +format.default.margin.left=10 +format.default.margin.bottom=10 +format.default.margin.right=10 + +# This is a template. Do not define concrete formats in this file. Use the specific user config file for this purpose. \ No newline at end of file diff --git a/src/test/resources/mapping.properties b/src/test/resources/mapping.properties new file mode 100644 index 0000000000000000000000000000000000000000..787be18be1af7e1fda0ee4950b604011c7d3748f --- /dev/null +++ b/src/test/resources/mapping.properties @@ -0,0 +1,146 @@ +# JProperties Mapping BrailleTable +# +# Table: de-chardefs6 +# Version 1 Rev. 2 (19-07-11) +# +# Description: +# This table contains a mapping from 6-bit-strings to decimal ascii byte values. +# It is used by the printer backend to encode data sent to the embosser. +# The pairs are ordered by ascending ascii byte value. +# +# ============================================================================= + +# 0-31:NUL-US (non visible characters) +# Space +000000=32 +# ! +000010=33 +# " +000100=34 +# # +001111=35 +# $ +000101=36 +# % +111111=37 +# & +111101=38 +# ' +000001=39 +# ( +011001=40 +# ) +001011=41 +# * +001010=42 +# + +011010=43 +# , +010000=44 +# - +001001=45 +# . +001000=46 +# / +010011=47 +# 0 +001101=48 +# 1 +100001=49 +# 2 +110001=50 +# 3 +100101=51 +# 4 +100111=52 +# 5 +100011=53 +# 6 +110101=54 +# 7 +110111=55 +# 8 +110011=56 +# 9 +010101=57 +# : +010010=58 +# ; +011000=59 +# < +000011=60 +# = +011011=61 +# > +000110=62 +# ? +010001=63 +# 64-90:@-Z +# [ +111011=91 +# 92:\ +# 93:] +# 94:^ +# _ +000111=95 +# ` +001110=96 +# a +100000=97 +# b +110000=98 +# c +100100=99 +# d +100110=100 +# e +100010=101 +# f +110100=102 +# g +110110=103 +# h +110010=104 +# i +010100=105 +# j +010110=106 +# k +101000=107 +# l +111000=108 +# m +101100=109 +# n +101110=110 +# o +101010=111 +# p +111100=112 +# q +111110=113 +# r +111010=114 +# s +011100=115 +# t +011110=116 +# u +101001=117 +# v +111001=118 +# w +010111=119 +# x +101101=120 +# y +101111=121 +# z +101011=122 +# { +011111=123 +# | +001100=124 +# ~ +011101=126 +# 127:DEL \ No newline at end of file diff --git a/src/test/resources/missingRequiredPropertyExample.properties b/src/test/resources/missingRequiredPropertyExample.properties new file mode 100644 index 0000000000000000000000000000000000000000..a61d021c5a95261412962e85763aee83e519661c --- /dev/null +++ b/src/test/resources/missingRequiredPropertyExample.properties @@ -0,0 +1,52 @@ +# JProperties Printer & Format Configuration +# +# Embosser: Dummy Printer +# Test Revision (19-07-18) (DON'T USE FOR PRINTING) +# +# Description: +# This is the main configuration file for use with the braille plot application +# when embossing with the 'Index Everest-D V4'. +# The configuration specifies the general printer abilities and defines +# pre-selectable formats for this embosser. +# +# https://gitlab.hrz.tu-chemnitz.de/s9444737--tu-dresden.de/brailleplot/wikis/Software%20Design#configuration-files +# ============================================================================= + +### General Printer Properties +### ========================== + +# Missing required property (not specified by default): +# printer.name=Dummy Printer +printer.mode=normal +printer.brailletable=src/test/resources/mapping.properties +printer.floatingDot.support=true +printer.floatingDot.resolution=0.05 + +# The following values represent the fixed indentation and maximum technical printing area of the embosser. +# If the outputs don't fit on the page you might want to tweak this values. (Check the format too.) +printer.constraint.top=5.0 +printer.constraint.left=0 + +# The following properties define the exact grid spacing. +printer.raster.cellDistance.horizontal=3.6 +printer.raster.cellDistance.vertical=4.8 +printer.raster.dotDistance.horizontal=2.5 +printer.raster.dotDistance.vertical=2.5 +printer.raster.dotDiameter=1.5 + +### Format Definitions +### ================== + +# A4 Format +format.A4.page.width=210 +format.A4.page.height=297 +format.A4.margin.left=0 + +# A5 Format +# Missing required property (not specified by default): +# format.A5.page.width=148 +format.A5.page.height=210 +format.A5.margin.top=0 +format.A5.margin.left=0 +format.A5.margin.bottom=0 +format.A5.margin.right=0 \ No newline at end of file