Razzak,

Understood. I am using the sample PHP provided in RWebReports.

I am not a strong PHP guy so how would this be modified to include embedding 
fonts.



_____________________________________________


<?php

session_start();

$dsn = file_get_contents('DSN');
if (empty($dsn) || !preg_match('/^[A-Za-z0-9_]+$/', $dsn)) {
        die('-ERROR- Invalid DSN');
}

$report_name = isset($_POST['report_name']) ? $_POST['report_name'] : '';
if (empty($report_name) || !preg_match('/^[A-Za-z0-9_]+$/', $report_name)) {
        header('Location: index.php');
        die();
}

$id = session_id();

$files_dir = 'files';
$file_name = $report_name . "_$id.pdf";

$config_data = "DSN $dsn\r\n";
$config_data .= "REPORT_NAME $report_name\r\n";
$config_data .= "PDF\r\n";
$config_data .= "FILENAME $files_dir\\$file_name\r\n";
$config_data .= "\r\n";

if (!is_dir($files_dir))
        mkdir($files_dir);
$config_file = "config_$id.txt";
touch($config_file);
file_put_contents($config_file, $config_data);
exec("RWebReports95_64.exe $config_file", $output);
unlink($config_file);

$file_created = file_exists("$files_dir/$file_name");

if ($output[0] == 'OK' && $file_created) {
        header("Location: $files_dir/$file_name");
        die();
} elseif (!$file_created) {
        die('-ERROR- File not created');
} else {
        die($output[0]);
}

?>

________________________________________________________________

-----Original Message-----
From: "A. Razzak Memon" <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Thu, 09 Jan 2014 13:05:23 -0500
Subject: [RBASE-L] - Re: embed fonts


At 12:54 PM 1/9/2014, jan johansen wrote:

>Rats. I have to really think about how to do that because that is passing
>a set of parameters in the PHP.
>I was hoping for a PROPERTY reportname EMBED_FONT TRUE

There is no such thing as "PROPERTY reportname EMBED_FONT TRUE".

Embedded fonts are only valuable when printing a report to a file, such
as PDF, RTF, etc. Thus, the OPTION EMBED_USED_FONTS ON.

Did you know that you can use the actual command file "as is", using the
latest version and build of R:WebReports 9.5, in combination with PHP,
or Node.js?

Very Best R:egards,

Razzak


>-----Original Message-----
>From: "A. Razzak Memon" <[email protected]>
>To: [email protected] (RBASE-L Mailing List)
>Date: Thu, 09 Jan 2014 12:33:53 -0500
>Subject: [RBASE-L] - Re: embed fonts
>
>At 12:23 PM 1/9/2014, jan johansen wrote:
>
> >Brain cramp.
> >
> >I need to embed fonts in a report. Because this report is used
> >for R:WebReports and our website, I can't give the "embed fonts"
> >in the PRINT statement, so I'm thinking it would need to be in
> >the ON-BEFORE-GENERATE EEP of the report but am stumped on syntax.
>
>Jan,
>
>Here's an example to create PDF report with embedded fonts using
>R:WebReports 9.5.
>
>-- Example
>PRINT ReportName WHERE whereclause ORDER BY clause +
>OPTION PDF +
>|FILENAME filename.PDF +
>|SHOW_CANCEL_DIALOG OFF +
>|TITLE your report title here +
>|SUBJECT your report subject here +
>|AUTHOR author information here +
>|KEYWORDS report key works here +
>|EMBED_USED_FONTS ON +
>|OPEN OFF
>RETURN
>
>Hope that helps!
>
>Very Best R:egards,
>
>Razzak.
>
><http://www.rbase.com>www.rbase.com
>www.facebook.com/rbase
>--
>31 years of continuous innovation!
>16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
>--

Reply via email to