SCM

SCM Repository

[rqda] View of /pkg/rjpod/R/pdfXMP.R
ViewVC logotype

View of /pkg/rjpod/R/pdfXMP.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 491 - (download) (annotate)
Wed Dec 12 07:05:18 2012 UTC (6 years, 4 months ago) by wincent
File size: 637 byte(s)
rename an argument in pdfXMP, add Rd files; RQDA 0.2-3 rc
pdfXMP <- function(file, jabrefOnly=TRUE){
    commonjpod <- rJava:::.jnew("common/CommonRJPod")
    commonjpod$open(file)
    doc <- commonjpod$getDoc()
    info <- doc$getInfoDict()
    dic <- info$cosGetObject()
    ks <- dic$keySet()
    ks <- rJava:::.jevalArray(ks$toArray())
    ans <- sapply(ks, function(x) {
        key <- x$toString()
        val <- dic$get(x)$toString()
        Encoding(key) <- Encoding(val) <- "UTF-8"
        key <- gsub("^/", "", key)
        val <- gsub("^(\\()|(\\)$)", "", val)
        sprintf("%s = %s", key, val)
    })
    if (jabrefOnly) {
        ans <- ans[grepl("^bibtex",ans)]
    }
    ans
}

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge