Skip to content

pdftex fflush() failed (Bad file descriptor) #217

@kongdd

Description

@kongdd

Dear Sir,

Could you give some clue how to solve this issue?
PS: I used the tinytex as the latex engine.

library(tikzDevice)
## Example 1 ###################################
options(tikzDefaultEngine = 'pdftex')
# options(tikzDefaultEngine = 'xetex')
# options(tikzDefaultEngine = 'luatex')

td <- "."
tf <- file.path(td,'example1.tex')

# Minimal plot
tikz(tf,standAlone=TRUE)
plot(1)
dev.off()
#> png 
#>   2

# View the output
tools::texi2dvi(tf,pdf=T)
# system(paste(getOption('pdfviewer'),file.path(td,'example1.pdf')))
# setwd(oldwd)
Error in tools::texi2dvi(tf, pdf = T) : 
  unable to run pdflatex on './example1.tex'
LaTeX errors:
!pdfTeX error: pdflatex.exe (file c:/Users/kong/AppData/Roaming/TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex.map): fflush() failed (Bad file descriptor)
 ==> Fatal error occurred, no output PDF file produced!

Created on 2022-07-22 by the reprex package (v2.0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions