We're updating the issue view to help you get more done. 

Label PDF print: border for field not working

Description

A border on a field ("border" = 1px) is causing the zend pdf generator to create a corrupt PDF file.
I was able to track down the cause to the line
$po_page->setDash(0, 0);
in PrintFormTextElement.php.

I was not able to find any documentation on this function or what it is used for. Due to the fact, that "drawRectangle" has a fill color (which can not be transparent and not set) I would also recommend to change the code to use the 4 drawLine functions which are used if separate borders are set.

Here is the whole label config:

test = {
"name" = "test",
"code" = "test",
"pageWidth" = 210mm,
"pageHeight" = 297mm,
"marginLeft" = 20mm,
"marginRight" = 20mm,
"marginTop" = 20mm,
"marginBottom" = 20mm,
"horizontalGutter" = 0.00in,
"verticalGutter" = 0.00in,
"useBorder" = 1,

"pageElements" = {
}

"subFormWidth" = 170mm,
"subFormHeight" = 257mm,
"subFormLayout" = {
"title" = {
"type" = text,
"style" = "pageTitle",
"width" = 170mm,
"height" = 10mm,
"top" = 8mm,
"left" = 0mm,
"fields" = [preferred_labels],
"align" = "center",
"border" = 1px
},
"v_representation" = {
"type" = image,
"width" = 4.25in,
"fields" = [path:large:ca_object_representations.media],
"height" = 5in,
"top" = 0.25 in,
"left" = 4.0 in,
"display" = meet
}
}
}

Environment

None

Assignee

Stefan Keidel

Reporter

Philipp Mehrwald

Labels

Components

Fix versions

Affects versions

Priority

Minor
Configure