## LaTeX forum ⇒ Conversion Tools ⇒ Problem with conversion from PS to PDF

Information and discussion about output converters related to LaTeX (e.g. dvips, ps2pdf, ...)
lanmmt
Posts: 21
Joined: Tue Sep 28, 2010 6:43 pm

### Problem with conversion from PS to PDF

Well I was playing around with ps2pdf and I'm also unhappy with the results - what is making me unhappy is when I'm selecting some text, it selects text strangely ... I attached an example that shows the problem.

The problem might be related to that described in »Converting from PS to PDF«.
Attachments
ps2pdfTEST.pdf

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
lanmmt wrote:Well I was playing around with ps2pdf and I'm also unhappy with the results - what is making me unhappy is when I'm selecting some text, it selects text strangely ... I attached an example that shows the problem.

The entire code of that sample would be much more interesting to see what might cause this behaviour.

Best regards
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

lanmmt
Posts: 21
Joined: Tue Sep 28, 2010 6:43 pm

so here it is

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
Uh-oh, what a dump of code. Never thought that it would be so much. At first sight I see some obsolete packages [1]. Furthermore you are loading packages twice.

Many packages and other parts of the code seem not to be relevant to the problem. But I assume that you need them and know exactly what they are doing.

Since it is too time consuming to dig through the code of your example, I can only offer a short document that should work fine.
\documentclass[11pt,a4paper,english]{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage{babel}\usepackage{pstricks-add} \begin{document}   are separate and their particles do not mix, that is particle number $N$ and $N_0$ and volumes of the systems are constant, they can exchange the energy.    \begin{figure}[!ht]     \centering     \begin{pspicture}[showgrid=false](-3,-2)(3,2)       \psellipse(0,0)(2.5,1.5)       \psellipse[fillstyle=solid](-1.5,0.75)(1.5,0.9)       \rput(-1.5,0.75){$E$, $N$, $V$}       \rput(0,-0.75){$E_0-E$, $N_0$, $V_0$}       \rput(1,0){heat bath}     \end{pspicture}     \caption{A figure}\label{fig:figure}   \end{figure}\end{document}

Compile this the way you mentioned and see if it is working. Otherwise present a minimal example that reproduces the behaviour [2]. That means to shorten the original code until a minimum remains that fails.

[1] View topic: Obsolete packages and document classes — Avoid usage!
[2] View topic: Avoidable mistakes
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am
lanmmt wrote:so here it is

it is a problem with the viewer and not the code and not ps2pdf.

Herbert

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
CrazyHorse wrote:it is a problem with the viewer and not the code and not ps2pdf. […]

I can comprehend the problem with Adobe Reader (on Wind0ws) and Okular (on Linux). Tests on my other machine with other viewers on Wind0ws will have to wait until I fixed the hardware crash.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

lanmmt
Posts: 21
Joined: Tue Sep 28, 2010 6:43 pm
...well it works, almost...
now the text is ok, but all the time I see that (1,1) in the left top corner, and in the book (I'm writing - that's the cause of so long preambule - I need it all, and thank you that you have noticed I have double comends) I get two extra pages at the begining o_O and I get this:
! Undefined control sequence.\resetOptions ...\pst@linetype {0}\pstScalePoints                                                    (1,1){}{}\psset [pstricks-...l.2054 \resetOptions ? hThe control sequence at the end of the top lineof your error message was never \def'ed. If you havemisspelled it (e.g., \hobx'), type I' and the correctspelling (e.g., I\hbox'). Otherwise just continue,and I'll forget about whatever was undefined. ?  ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation.Type  H <return>  for immediate help.  ...                                               l.2054 \resetOptions ? )

the same problem was with the code you've posted.

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am
lanmmt wrote:...well it works, almost...
now the text is ok, but all the time I see that (1,1) in the left top corner, and in the book (I'm writing - that's the cause of so long preambule - I need it all, and thank you that you have noticed I have double comends) I get two extra pages at the begining o_O and I get this:
! Undefined control sequence.\resetOptions ...\pst@linetype {0}\pstScalePoints                                                    (1,1){}{}\psset [pstricks-...l.2054 \resetOptions

the same problem was with the code you've posted.

Herbert

lanmmt
Posts: 21
Joined: Tue Sep 28, 2010 6:43 pm
Ok, I think I've solved my last problem, I've searched the files pstricks is using I've started with the pst-math - which is last named in the log, and than I had an idea, maybe it's something with the
\usepackage{pstricks-add}

which (I've forgot to say earlier) solved the earlier problem. So I've looked for something that might be 'bad' and than went to 2035 line and commented it. And tadam it's working:D

So summarising:
I've
\usepackage{pstricks-add}

2) removed
\usepackage[usenames,dvipsnames]{pstricks}

(optional)
3) commented line 2035 in pstricks-add.tex (I've fonded it in C:\Program Files (x86)\MiKTeX 2.7\tex\generic\pstricks-add):
 %\pstScalePoints(1,1){}{}%

4) made compilation ps2pdf (actualy I've written a code:
@rem You can put here any commands you want - this batch file can be executed from LEd's toolbar@rem There are 3 parameters passed  to this batch:@rem     %1 - <MAINFILEDIR>@rem     %2 - <MAINFILENAME>@rem     %3 - <MAINFILEDISK>@rem You can also define in tex_cmd.gd file some additional parameters to be passed to this batch file.@echo off%3cd %1latex.exe --src-specials %2dvips.exe %2.dvi -o %2.psps2pdf.exe %2.ps %2.pdf`

so I have a dvi, ps and pdf document;)

lanmmt
Posts: 21
Joined: Tue Sep 28, 2010 6:43 pm
CrazyHorse wrote:your PSTricks files are really out of date, update your system.

Herbert

well I thought I've updated them last night, maybe my MikTeX haven't noticed something. I'll try to update them once more, if that won't help, maybe I should try to update them manualy?