Hello everyone
I am getting the following message when trying to export to pdf
C:/xampp/htdocs/src/phpfn.php(4104): The storage type ‘https’ is not supported
Any ideas
phpmaker 2025.1
Hello everyone
I am getting the following message when trying to export to pdf
C:/xampp/htdocs/src/phpfn.php(4104): The storage type ‘https’ is not supported
Any ideas
phpmaker 2025.1
Upload paths cannot be starting with “http://” or “https://”. It should be a relative path (local) or a remote path (e.g. “s3://bucket”, “google.storage://bucket”, “azure.blob://container”).
I don’t have routes of that type in the table.
local routes only
“app/files/userfiles/SEDES/”.$this->SEDE->DbValue.‘/’.“VULNERABILITY”.‘/’.‘Perimeter’
You may enable Debug and post the complete stack trace.
The error is in the line of the logo that does not support it.
try local and remote
// Page Exporting event
function Page_Exporting(object &$doc): bool {
// Define HTML content with inline styles
$htmlContent = "<html><head><style>
body { font-family: Arial, sans-serif; }
.center { text-align: center; }
.table { margin: auto; }
.image { margin: 10px 0; max-width: 100%; }
.button {
margin: 20px;
padding: 5px;
background-color: transparent;
border: none;
cursor: pointer;
font-size: 20px;
}
.button:hover {
background-color: #f8f9fa;
}
.fa-file-pdf {
color: red;
}
</style>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css'>
</head><body>";
// Add logo, title, and version info
$htmlContent .= "<table class='table'><tr><td></td><td class='center'><img src='http://localhost:8080/images/logo.png' class='image'></td></tr></table>";
// Button with print functionality
$htmlContent .= "<div class='center'>";
$htmlContent .= "<button class='button' onclick='window.print()'><i class='fas fa-file-pdf'></i></button>";
$htmlContent .= "</div>";
$htmlContent .= "</body></html>";
// Assign HTML content to document
$doc->Text = $htmlContent;
$doc->FileName = "Diagnostico_de_Condiciones_de_Seguridad." . $doc->FileExtension;
return true; // Use true to proceed with export, false to cancel
}
The error is in the line of the logo that does not support it.
try local and remote
When I put the path images/logo.png it exports a box with an x in the center
and if I put the route
http://localhost:8080/images/logo.png
gives http or https error
Solved
$documentRoot = $_SERVER[‘DOCUMENT_ROOT’];
thank you
I believed you meant you have replaced "http://localhost:8080"
in your code by $documentRoot
so the paths are correct now.