Another option besides scp (which is a good option) is to generate the PDF locally, then copy it to the IP or UNC name. an implementation I used is below:
1) generate the pdf to your local drive. (wherever that is for you)
$pdf->Output($filename, 'F');
2) use the built in php function to copy that file to your remote drive. I built a function to do that as I wanted to also do some checking, to make sure it could proceed without error.
function CheckDirectoryExists($path) {
if (!file_exists($path)) {
mkdir($path, 0777, true);
}
return file_exists($path);
}
function CopyFile($file, $to_file) {
if (!file_exists($file)) {
return -1;
}
if (!file_exists($to_file)) {
$path = '';
$explodedPath = explode(dirSep, $to_file);
for ($i = 0; $i < (sizeof($explodedPath) - 1); $i++) {
$path .= $explodedPath[$i] . dirSep;
}
CheckDirectoryExists($path);
} else {
unlink($to_file);
}
return copy($file, $to_file);
}
this should work, I'm using the UNC name instead of the IP address on my end in the init.php I have setup.