Conversion ToolsConverting from PS to PDF.

Information and discussion about output converters related to LaTeX (e.g. dvips, ps2pdf, ...)
Post Reply
porky_pig_jr
Posts: 16
Joined: Fri Dec 26, 2008 11:36 pm

Converting from PS to PDF.

Post by porky_pig_jr »

Hello,

I still have an old MikTeX distribution (pre-pdfTeX), and my normal workflow is to convert tex to dvi to ps, which I print, but sometime I need to generate pdf, so I simply convert ps to pdf. Since I use lots of pstricks (so I have an embedded postscript inside dvi), that's the most simplest way for me.

Now if I can get a hold on Acrobat Pro, so I can use distiller to convert ps to pdf, this gives the superb result, no complains. With gsview/ghostscript conversion is OK but worse than with distiller. Since I don't have Acrobat Pro available all the time (only when I'm on university computing system), I'm looking for something close in quality to distiller, but less expensive, or may be even freeware.

I've tried several freeware tools which work by installing a virtual pdf printer, and didn't like any of them. I'd like to hear from anyone who knows of the good quality converter.

My second question is regarding the alternative way: converting dvi directly to pdf, with either dvi-to-pdf or may be I should just install the latest MiKTeX with pdfTeX. Do you think it will give the high quality PDF output, comparable with ps->distiller->pdf? I know pdfTeX has lots of pdf-specific features, so may be I can get something which looks even better than pdf produced with distiller (?). (Note: I'm aware of the pstrick workaround for pdfTeX, that will take some source code changes but, hey, whatever it takes to get a high quality pdf document).

TIA.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Converting from PS to PDF.

Post by kaiserkarl13 »

MikTeX should come with a program called ps2pdf that converts PostScript to PDF without the expense of Acrobat Distiller. It may not be in your path, but if you look around for it you should find it. In Windows, you can create a link to the ps2pdf executable and simply drag-and-drop your .ps file onto the icon to create a PDF.

I think ps2pdf is actually part of Ghostscript, which is free and is typically installed along with MikTeX. If not, you can download and install it for free as well.

There should also be a utility called dvipdf or dvipdfm that is included with MikTeX that will convert DVI to PDF for you. I'm not sure how this works with pstricks, as I've never used that, but if you have trouble use dvips+ps2pdf.
simo
Posts: 18
Joined: Thu Feb 04, 2010 4:27 pm

Converting from PS to PDF.

Post by simo »

Is there a way i can compile a tex file to pdf in miktex using batch file ?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Converting from PS to PDF.

Post by frabjous »

Yeah, ps2pdf is part of ghostscript.

I'm surprised to hear that you're unhappy with the results. The results I get from it seem to me to be at least as good as what I've gotten with Distiller. What in particular are you unhappy with?

In any case, there are lots of free alternatives to Acrobat Distiller. For Windows, try, for example, PDF Creator, which is Open Source free software, and creates a PDF virtual printer just like Acrobat Distiller does.

And yes, you can certainly compile to PDF using a batch file, though most likely it would call ps2pdf, which you're unhappy with.

Also, is there a reason you can't upgrade for using pdflatex rather than latex to compile? For pstricks, check out auto-pst-pdf, epstopdf and similar packages.
simo
Posts: 18
Joined: Thu Feb 04, 2010 4:27 pm

Re: Converting from PS to PDF.

Post by simo »

Pliz check on my latest post about Latex to pdf on Thursday 24th Feb. 2010
It works perfectly
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Converting from PS to PDF.

Post by frabjous »

simo wrote:Pliz check on my latest post about Latex to pdf on Thursday 24th Feb. 2010
It works perfectly
But your batch script uses ps2pdf from ghostscript (doesn't it?), so how would that be any better?
Drkazmer
Posts: 8
Joined: Sat Dec 27, 2008 7:55 pm

Re: Converting from PS to PDF.

Post by Drkazmer »

Hi!

Could you please help me how to set up my LaTeX => PS => PDF profile in TeXnicCenter (I use Win 7 64 bit). I've tried both MikTeX ps2pdf and the stand-alone GS to use, but I think I fail to use the appropriate command, hence no PDF output is generated (the PS file is OK). I'm pretty dissatisfied using Distiller manually each time to creat PDF, but my document is needed to be converted into PS first.
Any help is highly appreciated!

K
Attachments
ps2pdf.png
ps2pdf.png (58.23 KiB) Viewed 27972 times
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Converting from PS to PDF.

Post by localghost »

Drkazmer wrote:Hi!

Could you please help me how to set up my LaTeX => PS => PDF profile in TeXnicCenter (I use Win 7 64 bit). I've tried both MikTeX ps2pdf and the stand-alone GS to use, but I think I fail to use the appropriate command, hence no PDF output is generated (the PS file is OK). I'm pretty dissatisfied using Distiller manually each time to creat PDF, but my document is needed to be converted into PS first.
Any help is highly appreciated!

K
Install Ghostscript (perhaps together with GSview) and start the wizard anew (lower left corner in your screen capture) to rebuild the output profiles.


Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Drkazmer
Posts: 8
Joined: Sat Dec 27, 2008 7:55 pm

Converting from PS to PDF.

Post by Drkazmer »

Dear Thorsten,

Thank you for your kind and quick help. I suppose that you misunderstood my question, but hopefully after many days of Googling I found the answer. The wizard unfortunately doesn't create the LaTeX=>PS=>PDF profile. But I installed the GhostScript 9.02, and it works! :-D
For other's information (who are not so talented, just like me), I write here how did I manage to create the right profile:
  1. Install GhostScript 9.02 (somehow the MikTeX 2.9 ps2pdf doesn't close the document, so each time I would have had to do it manually)
  2. Copy the LaTeX=>PS profile, and on the Postprocessor tab add a new one (after DviPs), call it GhostScript, or whatever you want
  3. At the Executable field add the path of the GS executable (in my case ...\gs9.02\bin\gswin64c.exe)
  4. At the Argument field add the following command (I would be happy if someone could give me some explanation concerning these parameters):
    -sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile="%bm.pdf" -c save pop -f "%bm.ps"
  5. On the Viewer tab add the path of your PDF viewer. I use Acrobat 10, so in my case select DDE command, and you should fill the View project's output and Forward Search with the following:
    • Command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
    • Server: AcroViewA10
    • Topic: Control
    Please note that previous Acrobat versions used the AcroView server, and starting from Acrobat 10, the Reader uses AcroViewR10, Acrobat uses AcroViewA10.
  6. At Close document before running (La)TeX use the following:
    • Command: [DocClose("%bm.pdf")]
    • Server: AcroViewA10
    • Topic: Control
simo
Posts: 18
Joined: Thu Feb 04, 2010 4:27 pm

Re: Converting from PS to PDF.

Post by simo »

I would have just replied the same way as Localghost unless there is an detailed explanation of what is needed.

The procedure given is the same the configured one on TeXnicCenter 1.0 I use.
Post Reply