---
title: "slickR with PDFs"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{slickR with PDFs}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  eval = pdftools::poppler_config()$can_render,
  comment = "#>"
)

knitr::opts_knit$set(root.dir = tempdir())
```

```{r setup}
library(slickR)
```
 
## Simple

Convert PDF to Images.

```{r,}

pdf_file <- system.file('examples/slickR.pdf',package = 'slickR')

imgs <- pdftools::pdf_convert(pdf_file,format = 'png',verbose = FALSE)

```

PDF file in a single slider

```{r}
slickR(imgs,height = 500)
```

## Browsing PDF pages

```{r}
bottom_opts <- settings(arrows = FALSE,slidesToShow = 3,slidesToScroll = 1,centerMode = TRUE, focusOnSelect = TRUE,initialSlide = 0)

slickR(imgs,height = 500) %synch% (slickR(imgs,height = 100) + bottom_opts)

```

