Skip to content

Commit

Permalink
5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PhocaCz committed Jan 25, 2024
1 parent 63c0457 commit b004797
Show file tree
Hide file tree
Showing 45 changed files with 1,110 additions and 346 deletions.
18 changes: 18 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ Phoca PDF is Joomla! CMS component. It helps to set and create PDF documents in

4.0.1

## Version (Joomla! 5.x)

5.0.0



## License
Expand All @@ -76,3 +80,17 @@ GNU/GPL


This project is open source project - feel free to contribute! Thank you.



## Social Media

- [Phoca on Facebook](https://www.facebook.com/Phoca.cz)

- [Phoca on X (Twitter)](https://twitter.com/PhocaCz)

- [Phoca on YouTube](https://www.youtube.com/user/phocavideos)

- [Phoca on GitHub](https://github.com/PhocaCz)

- [Phoca on Reddit](https://www.reddit.com/user/PhocaCz)
2 changes: 1 addition & 1 deletion admin/assets/tcpdf/include/tcpdf_fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ public static function _getTrueTypeFontSubset($font, $subsetchars) {
$subsetglyphs[$g] = true;
}
}
}
}
break;
}
case 6: { // Format 6: Trimmed table mapping
Expand Down
16 changes: 13 additions & 3 deletions admin/assets/tcpdf/tcpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -15612,15 +15612,23 @@ public function write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres='
* @public
*/
public function write2DBarcode($code, $type, $x='', $y='', $w='', $h='', $style=array(), $align='', $distort=false) {
if (TCPDF_STATIC::empty_string(trim($code))) {

if (TCPDF_STATIC::empty_string(trim($code))) {
return;
}
require_once(dirname(__FILE__).'/tcpdf_barcodes_2d.php');


require_once(dirname(__FILE__).'/tcpdf_barcodes_2d.php');


// save current graphic settings
$gvars = $this->getGraphicVars();
// create new barcode object
$barcodeobj = new TCPDF2DBarcode($code, $type);


$arrcode = $barcodeobj->getBarcodeArray();

if (($arrcode === false) OR empty($arrcode) OR !isset($arrcode['num_rows']) OR ($arrcode['num_rows'] == 0) OR !isset($arrcode['num_cols']) OR ($arrcode['num_cols'] == 0)) {
$this->Error('Error in 2D barcode string');
}
Expand Down Expand Up @@ -15818,6 +15826,8 @@ public function write2DBarcode($code, $type, $x='', $y='', $w='', $h='', $style=
break;
}
}


$this->endlinex = $this->img_rb_x;
}

Expand Down Expand Up @@ -18997,7 +19007,7 @@ protected function openHTMLTagHandler($dom, $key, $cell) {
$imgsrc = substr(JPATH_ROOT, 0, -1).$imgsrc;
} else {
///$imgsrc = $_SERVER['DOCUMENT_ROOT'].$imgsrc;
$tmpJb = str_replace('/', '\\', JUri::root(true));//JUri::base(true);
$tmpJb = str_replace('/', '\\', Joomla\CMS\Uri\Uri::root(true));//JUri::base(true);
$tmpIp = str_replace('/', '\\', $imgsrc);
$tmpIpWJb = str_replace($tmpJb, '', $tmpIp);

Expand Down
1 change: 1 addition & 0 deletions admin/assets/tcpdf/tcpdf_barcodes_2d.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ public function getBarcodePNG($w=3, $h=3, $color=array(0,0,0)) {
*/
public function getBarcodePngData($w=3, $h=3, $color=array(0,0,0)) {
// calculate image size

$width = ($this->barcode_array['num_cols'] * $w);
$height = ($this->barcode_array['num_rows'] * $h);
if (function_exists('imagecreate')) {
Expand Down
7 changes: 4 additions & 3 deletions admin/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\Helpers\Sidebar;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\MVC\Controller\BaseController;
Expand All @@ -28,17 +29,17 @@
if ($layout == 'edit') {
} else {
foreach ($l as $k => $v) {

if ($v[1] == '') {
$link = 'index.php?option='.$option;
} else {
$link = 'index.php?option='.$option.'&view=';
}

if ($view == $v[1]) {
JHtmlSidebar::addEntry(Text::_($v[0]), $link.$v[1], true );
Sidebar::addEntry(Text::_($v[0]), $link.$v[1], true );
} else {
JHtmlSidebar::addEntry(Text::_($v[0]), $link.$v[1]);
Sidebar::addEntry(Text::_($v[0]), $link.$v[1]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion admin/controllers/phocapdffont.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function &getModel($name = 'PhocaPDFFonts', $prefix = 'PhocaPDFCpModel',

function delete() {

$cid = JFactory::getApplication()->input->get( 'cid', array(), 'array' );// POST (Icon), GET (Small Icon)
$cid = Factory::getApplication()->input->get( 'cid', array(), 'array' );// POST (Icon), GET (Small Icon)
ArrayHelper::toInteger($cid);

if (count($cid ) < 1) {
Expand Down
Loading

0 comments on commit b004797

Please sign in to comment.