[Ipe-discuss] Script to export all views from all pages of the Ipe drawing

Wojciech Zabolotny wzab01 at gmail.com
Mon Jun 4 12:41:29 CEST 2018


I have noticed, that my script exports huge PDF files. I can get much
smaller PDFs, when I use GUI and:
1. Set the desired View
2. Export it to EPS
3. Run "epstopdf" to convert EPS to PDF.

Unfortunately, exportView does not support "eps" format. It is
obvious, because the source code contains:

bool Document::exportView(const char *fname, TFormat format, uint flags,
                          int pno, int vno) const
{
  if (format != EPdf)
    return false;

GUI does something different:

function MODEL:action_export_eps()
[...]
    self.ui:renderPage(self.doc, self.pno, self.vno,
                       "eps", s, 1.0, false, false)

Unfortunately, the ui and its renderPage method seems to be not
available for ipelets...
Is it possible to efficiently export views from ipelet?

TIA & Regards,
Wojtek

2018-05-13 22:42 GMT+02:00 Wojciech Zabolotny <wzab01 at gmail.com>:
> The first version of my script does not properly export LaTeX objects.
> It is necessary to add doc:runLatex right after loading of the IPE drawing:
>
> doc = ipe.Document(fname)
> doc:runLatex()
>
> After that modification, LaTeX equations and texts are rendered correctly.
> --
> Regards,
> Wojtek



-- 
Wojciech M. Zabołotny
My GPG/PGP keys:
standard: 8192R/FE58A848 (0720 9430 85DB 7CCD F4C5  5F1E 5107 91FB FE58 A848)
confidential: 16384R/C76D2FB0 (C4E7 9597 CF22 7B5D 28BF  4656 FED7
A63F C76D 2FB0)


More information about the Ipe-discuss mailing list