Quantcast

eps in odfWeave

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

eps in odfWeave

Dieter Menne
Dear Weavers,

Does someone have an example of using eps or any other vector graphics with
odfWeave? It tried the example below (and commented variants) with
simple.odt in the examples directory, and got an error.

Dieter


#---
library(odfWeave)
plotInfo <- getImageDefs()
plotInfo$type = "eps"
#plotInfo$device = "postscript"
setImageDefs(plotInfo)
odfWeave("simple.odt", "simpleOut.odt")
#-----

#  Writing to file content_1.xml
#  Processing code chunks ...
#    1 : term hide(label=loadLibs)
#    2 : term xml(label=showOutputList)
#Error in check(options) : invalid value for 'type' : eps

Version: 0.5.9
Date: 2007-20-06

platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          5.0
year           2007
month          04
day            23
svn rev        41293
language       R
version.string R version 2.5.0 (2007-04-23)

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: eps in odfWeave

Kuhn, Max
Dieter,

What is the version of odfWeave? If you use those specifications in the
current version (0.5.9):

> plotInfo <- getImageDefs()
> plotInfo$type = "eps"
> plotInfo$device = "postscript"
> setImageDefs(plotInfo)
you will probabiliy need to set
horizontal = FALSE, onefile = FALSE, and paper = "special" to generate
ps graphics for OpenOffice
an image size of 480 inches by 480 inches has been requested.
> setImageDefs(plotInfo)

When I run somewhat altered options:

> plotInfo <- getImageDefs()
> plotInfo$type = "eps"
> plotInfo$plotWidth = 4
> plotInfo$plotHeight = 4
> plotInfo$device = "postscript"
> plotInfo$args = list(
+    horizontal = FALSE,
+    onefile = FALSE,
+    paper = "special")
> setImageDefs(plotInfo)
>
> demoFile <- system.file("examples", "simple.odt", package =
"odfWeave")
> odfWeave(demoFile, "c:/simpleOut.odt")
  Copying  C:/PROGRA~1/R/R250/library/odfWeave/examples/simple.odt
  Setting wd to
C:\DOCUME~1\KuhnA03\LOCALS~1\Temp\Rtmpp4Zcsb/odfWeave25113622566
<snip>
  Copying  simple.odt
  Resetting wd
  Removing
C:\DOCUME~1\KuhnA03\LOCALS~1\Temp\Rtmpp4Zcsb/odfWeave25113622566

  Done
>

There were some issues with eps and older versions of odfWeave, but I
don't recall that specific error.

[The only other "issue" with eps and odfWeave (on windows), is image
rendering. On my system, there is a windows system file called convert
(instead of imagemagick's convert) which messes up the image preview
within the document. Marc Schwartz and I have talked about this off-list
and he doesn't have the same issues.]

Max
 

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dieter Menne
Sent: Monday, June 25, 2007 11:04 AM
To: R-Help
Subject: [R] eps in odfWeave

Dear Weavers,

Does someone have an example of using eps or any other vector graphics
with
odfWeave? It tried the example below (and commented variants) with
simple.odt in the examples directory, and got an error.

Dieter


#---
library(odfWeave)
plotInfo <- getImageDefs()
plotInfo$type = "eps"
#plotInfo$device = "postscript"
setImageDefs(plotInfo)
odfWeave("simple.odt", "simpleOut.odt")
#-----

#  Writing to file content_1.xml
#  Processing code chunks ...
#    1 : term hide(label=loadLibs)
#    2 : term xml(label=showOutputList)
#Error in check(options) : invalid value for 'type' : eps

Version: 0.5.9
Date: 2007-20-06

platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          5.0
year           2007
month          04
day            23
svn rev        41293
language       R
version.string R version 2.5.0 (2007-04-23)

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

----------------------------------------------------------------------
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: eps in odfWeave

Dieter Menne
Kuhn, Max <Max.Kuhn <at> pfizer.com> writes:

Thanks, Max.

> What is the version of odfWeave? If you use those specifications in the
> current version (0.5.9):

Yes, version 0.5.9 (it was further below in my message, I forgot to put the
odfWeave flag before it.

I had tried your horizontal... suggestions before, because these came up nicely
in the error message, but the error remained the same, so I removed them. Here
another try for copy/paste, with a traceback.

The convert problem is a well known Imagemagick problem; clashes with "convert"
in the Windows directory. Workaround is to put the Imagemagick path before the
Windows/system32 path.

Dieter


library(odfWeave)
plotInfo <- getImageDefs()
plotInfo$type = "eps"
plotInfo$plotWidth = 4
plotInfo$plotHeight = 4
plotInfo$device = "postscript"
plotInfo$args = list(
    horizontal = FALSE,
    onefile = FALSE,
    paper = "special")
setImageDefs(plotInfo)
demoFile <- system.file("examples", "simple.odt", package ="odfWeave")
odfWeave(demoFile, "c:/simpleOut.odt")

-----
Error in check(options) : invalid value for 'type' : eps
>
>
> traceback()
5: stop(gettextf("invalid value for '%s' : %s", opt, oldval), domain = NA)
4: check(options)
3: SweaveParseOptions(chunkopts, drobj$options, driver$checkopts)
2: Sweave(file = rnwFileName, output = "content_1.xml", quiet = !control$verbose,
       driver = RweaveOdf(), control = control)
1: odfWeave(demoFile, "c:/simpleOut.odt")

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: eps in odfWeave

Dieter Menne
Dieter Menne <dieter.menne <at> menne-biomed.de> writes:

>
> library(odfWeave)
> plotInfo <- getImageDefs()
> plotInfo$type = "eps"
> plotInfo$plotWidth = 4
> plotInfo$plotHeight = 4
> plotInfo$device = "postscript"
> plotInfo$args = list( horizontal = FALSE,onefile = FALSE, paper = "special")
> setImageDefs(plotInfo)
> demoFile <- system.file("examples", "simple.odt", package ="odfWeave")
> odfWeave(demoFile, "c:/simpleOut.odt")
>
> -----
> Error in check(options) : invalid value for 'type' : eps

Sorry, Max, my error (as you noted in private email). From an earlier attempt I
had forgotten to remove the incorrect <<....type="eps">> in the code.

Dieter

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...