Skip to content

Commit f06873e

Browse files
committed
Removes date from PDFs not to track similar ones as new ones
1 parent 488c4d5 commit f06873e

9 files changed

+13
-0
lines changed
-33 Bytes
Binary file not shown.
-33 Bytes
Binary file not shown.

example/out/190-721628-2005.pdf

-33 Bytes
Binary file not shown.

example/out/190-721628-2005A.pdf

-33 Bytes
Binary file not shown.
-33 Bytes
Binary file not shown.

example/out/190-721628-2005_debug.pdf

-33 Bytes
Binary file not shown.

example/out/255-637190-2005.pdf

-33 Bytes
Binary file not shown.

example/out/255-637190-2005_debug.pdf

-33 Bytes
Binary file not shown.

src/FPDFHelper.php

+13
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ public function __construct(...$args)
1616
$this->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true);
1717
}
1818

19+
/**
20+
* Overrides native method to remove PDF time not to track similar PDFs by git as new ones due to in-PDF date change
21+
*
22+
* @return void
23+
*/
24+
protected function _putinfo()
25+
{
26+
$this->metadata['Producer'] = 'tFPDF '.tFPDF_VERSION;
27+
// $this->metadata['CreationDate'] = 'D:'.@date('YmdHis');
28+
foreach($this->metadata as $key=>$value)
29+
$this->_put('/'.$key.' '.$this->_textstring($value));
30+
}
31+
1932
/**
2033
* Computes the number of lines a MultiCell of width w will take
2134
*

0 commit comments

Comments
 (0)