0

I'm trying to alter the position of a barcode in a document, but so far I have found nothing...

This is my Rmd file (with the YAML header between these two ---)...

---
geometry: paperheight = 8cm, paperwidth = 12cm, margin = 0.5cm
output:
  pdf_document:
    latex_engine: xelatex
fontsize: 10pt
header-includes:
  - \pagenumbering{gobble}
  - \usepackage{pst-barcode,pstricks-add}
params:
  barCodeNumber: 12345678
---

```{=latex}
\psset{unit=1cm}
\begin{pspicture}(0.0,0.0)(7.5,1.9)
    \psbarcode{`r params[["barCodeNumber"]]`}{width=0.6 height=0.3}{code128}
\end{pspicture}
```

... which I execute in R with rmarkdown::render("C:/Users/tueftla/R/Test.Rmd"). The result is a pdf with the barcode on position 1 - but I want to have the barcode at position 2 (see image).

Can you please help me with this issue? Many thanks in advance.

Desired barcode shift

0

You must log in to answer this question.

Browse other questions tagged .