octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38547] incorrect PDF paper size


From: Dik Dirk
Subject: [Octave-bug-tracker] [bug #38547] incorrect PDF paper size
Date: Tue, 19 Mar 2013 13:16:33 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20130308 Firefox/19.0 PaleMoon/19.0.2

URL:
  <http://savannah.gnu.org/bugs/?38547>

                 Summary: incorrect PDF paper size
                 Project: GNU Octave
            Submitted by: dikdirk
            Submitted on: Tue 19 Mar 2013 01:16:31 PM GMT
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.2
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

The following code should print a figure on a PDF and completely fill the
page.
However, the papersize is set incorrectly. In Matlab the code works correctly
by the way.

fplot(@sin,[0 1])
%get current size on screen
pos=get(gcf,'Position')
%set paper to same size
psz=get(gcf,'PaperSize')
psz(2)=psz(1)*pos(4)/pos(3)
set(gcf,'PaperSize',psz)
%place on right place of paper
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperPosition', [0 0 psz(1) psz(2)]);
%save
pause(.2) %wait until the buffer is flushed
fprintf('Saving...')
saveas(gcf,['test.pdf'])
fprintf('done!\n')






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38547>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]