da diese Frage schon öfter gestellt wurde hier eine kurze Anleitung.
Geändert wird in den älteren Versionen (ich mein bis 4.9) die Datei
modules/oe/invoicepdf/myorder.php
aktuelle (4.10) ist es
modules/oe/invoicepdf/models/invoicepdfoxorder.php
Geändert wird die
protected function _setOrderArticlesToPdf()
Am Anfang wird aus optischen Gründen der Zeilenabstand geändert und die Position gespeichert (rot markiert)
// starting a new page ...
if ($iStartPos > 243) {
$this->pdffooter($oPdf);
$iStartPos = $this->pdfheaderplus($oPdf);
$oPdf->setFont($oPdfBlock->getFont(), '', 10);
} else {
$iStartPos = $iStartPos + [B]5[/B];
}
[B]// because text is formatted at base line picture shoul start at top of line
$iPicPos = $iStartPos - 4;
[/B]
Am Ende der function noch innerhalb der foreach-Schleife wird die Ausgabe des Bildes eingefügt
// product picture
if ( $oOrderArt->oxorderarticles__oxpic1 != '') {
$myConfig = $this->getConfig();
$sPicFile = $myConfig->getConfigParam( 'sShopDir' ) . 'out/pictures/master/product/1/' . $oOrderArt->oxorderarticles__oxpic1;
if (file_exists($sPicFile)) {
$oPdf->image($sPicFile, 45, $iPicPos, 12, 12);
$iStartPos = $iPicPos + 12;
}
}
Aus der Rechnung die so aussah
wird dann
Natürlich liegt jetzt der Titel teileweise hinter dem Bild. Etwa in der Mitte der function wird geändert
// product title
$oPdf->setFont($oPdfBlock->getFont(), '', 10);
$oPdf->text(45, $iStartPos, substr(strip_tags($this->_replaceExtendedChars($oOrderArt->oxorderarticles__oxtitle->getRawValue(), true)), 0, 58));
in
// product title
$oPdf->setFont($oPdfBlock->getFont(), '', 10);
[B]//[/B] $oPdf->text(45, $iStartPos, substr(strip_tags($this->_replaceExtendedChars($oOrderArt->oxorderarticles__oxtitle->getRawValue(), true)), 0, 58));
[B]$oPdf->SetXY(58, $iStartPos - 4);
$sText = strip_tags($this->_replaceExtendedChars($oOrderArt->oxorderarticles__oxtitle->getRawValue(), true));
$oPdf->MultiCell(70, 8, $sText, 0, "L");
[/B]
jetzt sieht es so aus (mit Zeilenumbruch):
zuletzt nach bei Varianten den Zeilenabstabd auf 8 ändern
// additional variant info
if ($oOrderArt->oxorderarticles__oxselvariant->value) {
$iStartPos = $iStartPos + [B]8[/B];
$oPdf->text(45, $iStartPos, substr($oOrderArt->oxorderarticles__oxselvariant->value, 0, 58));
}