| 12 | 1. Java utility class/file `PdfUtil.java` in `src/net/sf/basedb/reggie/pdf/` updated:[[BR]]a. New private method `Image createBarcode(String text, float width, float height)` added. It creates a barcode with chosen content, width, and height, and returns an Image object of it. The barcode will be of type Code 128.[[BR]]b. New public method `void addBarcode(String text, float x, float y, float width, float height, int align)` added. It calls new public method `void addBarcode(String text, float x, float y, float width, float height, int align, float rotationDegrees)` with value of `rotationDegrees` set to `0`.[[BR]]c. New public method `void addBarcode(String text, float x, float y, float width, float height, int align, float rotationDegrees)` added. It calls new private method `Image createBarcode(String text, float width, float height)` to create a barcode with the desired content and size, after which new private method `void importImage2(Image img, float x, float y, float width, float height, int align, float rotationDegrees)` is called to import the barcode to the document at the chosen position.[[BR]]d. Public method `void importImage2(byte[] imageByteArray, float x, float y, float width, float height, int align, float rotationDegrees)` updated to call new public method `void importImage2(Image img, float x, float y, float width, float height, int align, float rotationDegrees)` to import the image created from the input byte array into the document at the chosen position.[[BR]]e. New public method `void importImage2(Image img, float x, float y, float width, float height, int align)` added. It calls new public method `void importImage2(Image img, float x, float y, float width, float height, int align, float rotationDegrees)` with value of `rotationDegrees` set to `0`.[[BR]]f. New public method `void importImage2(Image img, float x, float y, float width, float height, int align, float rotationDegrees)` added. It uses code previously in public method `void importImage2(byte[] imageByteArray, float x, float y, float width, float height, int align, float rotationDegrees)` to import the input image into the document at the chosen position. |
| 13 | 2. Java servlet class/file `ReferralGeneratorServlet.java` in `src/net/sf/basedb/reggie/servlet/` updated:[[BR]]a. The following private methods were updated by calling new public `PdfUtil` methods `void addBarcode(String text, float x, float y, float width, float height, int align)` and `void addBarcode(String text, float x, float y, float width, float height, int align, float rotationDegrees)` to add a barcode to the document, instead of calling private method `byte[] createBarcode(String barcodeText)` to create a barcode image byte array, and then use that as input in a call to `PdfUtil` public methods `void importImage2(byte[] imageByteArray, float x, float y, float width, float height, int align)` and `void importImage2(byte[] imageByteArray, float x, float y, float width, float height, int align, float rotationDegrees)` to import the barcode into the document at the desired position:[[BR]]i. `PdfUtil createConsentReportForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String scanbId, List<String> formTemplateFileList)`,[[BR]]ii. `PdfUtil createClinChemForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String scanbId, List<String> formTemplateFileList)`,[[BR]]iii. `PdfUtil createClinPathologyForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String scanbId, List<String> formTemplateFileList)`,[[BR]]iv. `PdfUtil createClinChemBloodForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String scanbId, List<String> formTemplateFileList)`,[[BR]]v. `PdfUtil createClinChemBcBloodForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String scanbId, List<String> formTemplateFileList)`.[[BR]]Barcode width and position parameters have also been updated to give a result equaling that using the Barcode4J library to create the barcodes.[[BR]]b. The following private methods related to creating barcodes with the Barcode4J library were removed:[[BR]]i. `byte[] createBarcode(String barcodeText)`,[[BR]]ii. `byte[] createBarcode(String barcodeText, String barcodeType, Integer dpi, Boolean humanReadable, String textPlacement, String fontName, Integer fontSize)`,[[BR]]iii. `static Configuration buildBarcodeCfg(String type, Boolean humanReadable, String textPlacement, String fontName, Integer fontSize)`. |