You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-11-29 22:28:02 +02:00
Allow custom logo for PDF documentation.
Contributed by Cynthia Shang.
This commit is contained in:
committed by
David Steele
parent
72865ca33b
commit
2b7440ddf3
@@ -94,16 +94,20 @@ sub process
|
||||
|
||||
my $oRender = $self->{oManifest}->renderGet(RENDER_TYPE_PDF);
|
||||
|
||||
# Should the logo be pulled from the doc path or the bin path?
|
||||
my $strLogoFile = "$self->{oManifest}{strDocPath}/resource/latex/cds-logo.eps";
|
||||
my $strLogo = $self->{oManifest}->variableGet('pdf-resource-logo');
|
||||
|
||||
if (!$self->{oManifest}->storage()->exists($strLogoFile))
|
||||
if (!defined($strLogo))
|
||||
{
|
||||
$strLogoFile = "$self->{oManifest}{strBinPath}/resource/latex/cds-logo.eps";
|
||||
$strLogo = 'blank.eps';
|
||||
}
|
||||
|
||||
my ($strExt) = $strLogo =~ /(\.[^.]+)$/;
|
||||
my $strLogoPath = defined($self->{oManifest}->variableGet('pdf-resource-path')) ?
|
||||
$self->{oManifest}->variableGet('pdf-resource-path') :
|
||||
"$self->{oManifest}{strDocPath}/resource/latex/";
|
||||
|
||||
# Copy the logo
|
||||
copy($strLogoFile, "$self->{strLatexPath}/logo.eps")
|
||||
copy($strLogoPath . $strLogo, "$self->{strLatexPath}/logo$strExt")
|
||||
or confess &log(ERROR, "unable to copy logo");
|
||||
|
||||
my $strLatex = $self->{oManifest}->variableReplace(
|
||||
|
||||
Reference in New Issue
Block a user