1

I found that my PSTricks Graphics only work in Landscape when I edit the dvipdfmx.cfg and add -sPAPERSIZE=a0 to the line

%% Use MiKTeX Ghostscript:
D  "mgs.exe -q -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile=\"%o\" \"%i\" -c quit"

But at my WorkPC I don't have access to this .cfg file

Can I achieve the same, from out of TexWorks (I use Miktex 2.9) or out of the document somehow? I want a PDF Output.

I can't use other LaTeX editors, or other MikTeX versions.

Example:

\documentclass[a4paper,9pt]{extarticle}
\usepackage{helvet}
\usepackage[utf8]{inputenc}
\usepackage{scrextend}
\usepackage[newdimens]{labels}
\usepackage{pstricks}
\usepackage{pst-barcode}
\usepackage{geometry}

\geometry{
landscape, 
margin=0mm
}

\newcommand{\sap}[2]{
\centering\begin{pspicture}(0,0)(7,4)\psbarcode[scaley=1.5]{#2}{includetext textsize=10 width=2.8}{code128}
\end{pspicture}}

\begin{document}

\LabelCols=2
\LabelRows=2
\LabelSetup
\begin{labels}
\sap{Gblalbla1}{209ss4}
\sap{GGblalbla1}{20ss9214}
\sap{Gblalbla}{2092ss141}
\sap{blablabal}{209ss214}%
\end{labels}

\end{document}
2
  • Could you post a minimal (non-)working example?
    – Bernard
    Jan 20, 2016 at 13:45
  • @Bernard i added some code
    – lovetox
    Jan 20, 2016 at 22:19

2 Answers 2

0

No problem with up-to-date TL2015:

\documentclass[landscape,a4paper,10pt]{article}
\usepackage{helvet}
\usepackage[margin=0pt]{geometry}
\usepackage[newdimens]{labels}
\LabelCols=2
\LabelRows=2
\LabelSetup
\usepackage{pst-barcode}

\newcommand{\sap}[2]{\centering
\begin{pspicture}(0,-0.2in)(2.8in,1.5in)\psbarcode[scaley=1.5]{#2}{includetext
 textsize=10 width=2.8}{code128}
\end{pspicture}}

\begin{document}

\begin{labels}
\sap{Gblalbla1}{209ss4}

\sap{GGblalbla1}{20ss9214}

\sap{Gblalbla}{2092ss141}

\sap{blablabal}{209ss214}

\end{labels}

\end{document}

enter image description here

2
  • I don't know what up to date TL 2015 means, but i just reinstalled MikTex 2.9, the newest version, chose XeLaTeX in the TexWorks Editor, and it doesn't work out of the box. I have to edit the config and the papersize.
    – lovetox
    Jan 21, 2016 at 23:04
  • i think the problem is also here described: tex.stackexchange.com/questions/157216/…
    – lovetox
    Jan 21, 2016 at 23:24
0

I found it myself.

You have to go to the CMD Shell and type

initexmf --edit-config-file dvipdfmx

this will create a config File in your Windows User Directory, which even in Workplaces usually is not write protected. In this file you can make any changes, and the original file will be overwritten.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.