Printing output to PDF

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Printing output to PDF

Michael L
Hi all!

I've made a script that calculates certain values. Its working great!

I have been able to make the script save the plots to pdf and or jpg but(!).
The simplest thing in my thought would be the output in the command window.

How do I do to get the report I want to save all the output in the command
window to a pdf?

Obviously I must be missing something obvious... but what?




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Printing output to PDF

marco atzeri-2
On 16.02.2021 10:09, Michael L wrote:

> Hi all!
>
> I've made a script that calculates certain values. Its working great!
>
> I have been able to make the script save the plots to pdf and or jpg but(!).
> The simplest thing in my thought would be the output in the command window.
>
> How do I do to get the report I want to save all the output in the command
> window to a pdf?
>
> Obviously I must be missing something obvious... but what?
>
>

set diary to a file

https://octave.org/doc/v6.1.0/Diary-and-Echo-Commands.html#Diary-and-Echo-Commands
and after print that text file.


Reply | Threaded
Open this post in threaded view
|

Re: Printing output to PDF

Michael L
Hi Marco!

Thanks a lot. This was exaclty what I needed.

However. I do want it to be in PDF format instead. The diary function seems
quite basic and only save it to a "txt" like format. Which is fine.

But I want a neat report in PDF instead.

I've done this so far

diary REPORT;
diary on;

lots of coding

diary off;
load(REPORT);
print -bestfit REPORT.pdf

but this doesn't seem to work. The latest print gives me the latest printed
pie chart again...?

Best regards, ML



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Printing output to PDF

marco atzeri-2
On 16.02.2021 10:52, Michael L wrote:

> Hi Marco!
>
> Thanks a lot. This was exaclty what I needed.
>
> However. I do want it to be in PDF format instead. The diary function seems
> quite basic and only save it to a "txt" like format. Which is fine.
>
> But I want a neat report in PDF instead.
>
> I've done this so far
>
> diary REPORT;
> diary on;
>
> lots of coding
>
> diary off;
> load(REPORT);
> print -bestfit REPORT.pdf
>
> but this doesn't seem to work. The latest print gives me the latest printed
> pie chart again...?
>
> Best regards, ML
>
>

have you considered to use another program (than octave) to convert the
diary in PDF ?
You can save the graphs as images and fit in the diary if needed.

Use the right tool for the proper job.

Regards
Marco