f



eps to pdf: cropped pdf

Hi,

I create an EPS with gnuplot, run LaTeX, convert the PS with Ghostview
to EPS (with automatical boundingbox correction) and then run epstopdf
(or eps2pdf alternatively) in order to be able to use the graphic with
pdflatex.

The EPS seems to be OK, whereas the PDF is cropped. <http://
www.mrunix.de/forums/showthread.php?p=297298#post297298>

How can I fix this problem?

I tried to use eps2eps and ps2epsi, which didn't help. Only loading
the EPS in Corel Draw and saving again in EPS seems to work but
results in rather large files.

I use Gnuplot 4.2 patchlevel 5.

Gaius Verres
0
Gaius
7/23/2009 6:58:59 AM
comp.graphics.apps.gnuplot 5008 articles. 0 followers. Post Follow

9 Replies
644 Views

Similar Articles

[PageSpeed] 27

Hi Gaius,

If it's just the pdf output that you want, I'd suggest trying
epslatex.  It's something that worked well for me but can be a bit
fiddly to implement.  If you're running unix/linux then the process is
pretty simple, as illustrated by Matthew Bohnsack's excellent article:
http://bohnsack.com/?p=841.  If you're using an alternative OS, then
I'm afraid that I've not the foggiest.

Regards,
Dai
0
dai_bach
7/23/2009 7:03:51 PM
You have to tell ps2pdf to build a pdf in the size of the eps.
Otherwise it just converts to your standar paper format (A4,legal,
whatever). The parameter ist something like

ps2pdf -EPSFitPage filename.eps

or -EPSCrop, don�t remember wich one and how it is spelt correctly.
Documentation for these Parameter is sort of hard to find.

Why this complicated setup? gnuplot makes eps, ghostscript make the
pdf-plot, (pdf)latex creates the document.

Karl


Gaius Verres wrote:
> Hi,
> 
> I create an EPS with gnuplot, run LaTeX, convert the PS with Ghostview
> to EPS (with automatical boundingbox correction) and then run epstopdf
> (or eps2pdf alternatively) in order to be able to use the graphic with
> pdflatex.
> 
> The EPS seems to be OK, whereas the PDF is cropped. <http://
> www.mrunix.de/forums/showthread.php?p=297298#post297298>
> 
> How can I fix this problem?
> 
> I tried to use eps2eps and ps2epsi, which didn't help. Only loading
> the EPS in Corel Draw and saving again in EPS seems to work but
> results in rather large files.
> 
> I use Gnuplot 4.2 patchlevel 5.
> 
> Gaius Verres
0
Karl
7/23/2009 8:44:13 PM
Dear Dai and Karl,

thank you very much for your answers.

On 23 Jul., 22:44, Karl Ratzsch <mail....@gmx.net> wrote:
> You have to tell ps2pdf to build a pdf in the size of the eps.
> Otherwise it just converts to your standar paper format (A4,legal,
> whatever). The parameter ist something like
>
> ps2pdf -EPSFitPage filename.eps
>
> or -EPSCrop, don=B4t remember wich one and how it is spelt correctly.
> Documentation for these Parameter is sort of hard to find.
> ...

I tried that, too: <http://gnuplot-tricks.blogspot.com/2009/05/gnuplot-
tricks-many-say-that-it-is.html>

But it didn't help.

btw: I do use epslatex to create my EPS.

Gaius
0
Gaius
7/24/2009 7:05:32 AM
How strange.  Have you tried epstopdf to do the initial conversion?
0
dai_bach
7/24/2009 2:02:45 PM
On 24 Jul., 16:02, dai_bach <d.e.jes...@googlemail.com> wrote:
> How strange. =A0Have you tried epstopdf to do the initial conversion?

Yes.

That's what I do:

- run Gnuplot with epslatex-Terminal
- run LaTeX on the file created by Gnuplot
- open the resulting PS with Ghostview and convert to EPS with
automatic bounding box correction
- run epstopdf on the resulting EPS

If you want, you can try it for yourself:
<http://www.mrunix.de/forums/attachment.php?
s=3D7c4f6e7ff636823da266ff7408540bce&attachmentid=3D3132&d=3D1248253908>

Gaius
0
Gaius
7/24/2009 3:30:02 PM
No other idea what I can do?
0
Gaius
7/27/2009 6:46:04 AM
I had a look at those files over the weekend.  I've not got any
definitive answers, but here are a few thoughts:
1) If you do "set size 1.2,0.6" then the plot will always be cropped
at x >~ 7 (for the range specified).  Is this the cropping that you're
talking about?  If so, try "set size 1,0.5" to preserve the aspect
ratio.
2) In all but x11 terminals, only the largest of the three plots is
visible.  I don't know why this is or how to rectify it.
3) If I understand correctly, the end result you're after is something
like: <https://www.bris.ac.uk/fluff/u/dj9248/dh4mihZpGo6_fN2loZR_kACH/
> (url valid until Tuesday 4th August 2009).  Obviously I've plotted a
different function...This was achieved by following the steps outlined
in Matthew Bohnsack's blog, for which an \emph{additional} tex file is
required.
0
dai_bach
7/27/2009 12:28:32 PM
Oh and I commented out the "standalone header ..." bit of the
gnuplot.plt file which just gave me a load of errors and garbled
output, but that might be more to do with my system configuration than
anything else
0
dai_bach
7/27/2009 12:36:02 PM
> > or -EPSCrop, don=B4t remember wich one and how it is spelt correctly.
> > Documentation for these Parameter is sort of hard to find.
> > ...
>
> I tried that, too: <http://gnuplot-tricks.blogspot.com/2009/05/gnuplot-
> tricks-many-say-that-it-is.html>
>
> But it didn't help.
>
> btw: I do use epslatex to create my EPS.
>
> Gaius

Hi,

Here is what I did, and it worked out all right:
The gnuplot part:

set terminal epslatex color
set out 'error.tex'
set xrange [-3:3]
set yrange [-1:1]
set label 1 at -1, 0.5 "$erf(x) =3D \\frac{2}{\\sqrt{\\pi}}\\int\
\limits_0^x\\,\dt e^{-t^2}$" centre
plot erf(x) w l

Then, use

ps2pdf -dEPSCrop error.eps error.pdf

to crop the eps file to the proper size. At this time, you should have
an "empty" pdf graph, i.e., the labels will not be there, only the
lines.
Having done this, you can call latex. The trick to cropping the output
to the proper size is to define a custom paper size. The following
latex file produces a cropped pdf with pdflatex:

\documentclass{article}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{nopageno}
\usepackage{txfonts}
\usepackage[usenames]{color}
\usepackage{color}

\setlength{\pdfpagewidth}{4.7in}
\setlength{\pdfpageheight}{3.4in}
\hoffset -2.1in
\voffset -3.8in

\begin{document}
\begin{figure}
\begin{center}
\scalebox{1.0}{\input{error.tex}}
\end{center}
\end{figure}
\end{document}

I hope this helps.
Cheers,
Zolt=E1n
0
Zoltan
7/27/2009 1:27:26 PM
Reply:

Similar Artilces:

PDF PDF PDF
For anyone struggling to figure out how to create a PDF in SWX it's pretty simple but you may have to have the Bluebeam version of swx FIRST go to Tools>Options and check "Save as PDF" Then you can save them right from the save as dialog. Maybe I'm the only dumbass that could't figure that out! ;0) But it was in help under "PDF" An easier way is to download a program from www.pdf995.com that "prints" you files to a PDF foramat. This program works with SW and any other program you use to print with. "3d" <jmiller at marvelindustri...

PDF TO PDF/A
Hello, is it possible to convert a PDF file to PDFA file ? i tried the -dPDFA option and i vefy my pdf file with PDF longlife. I have an error. Thanks for help. ...

PDF to EPS workarounds for Mac OS X Attention TeXy, TeXy peoples: PDF to EPS workarounds for Mac OS X Attention TeXy, TeXy peoples: PDF to EPS workarounds for Mac OS X Attention TeXy, TeXy
Attention TeXy, TeXy peoples: (excuse the mispronunciation; punny licence) It seems that Mac OS X has partially documented issues (http://altair.ific.uv.es/~JaxoDraw/Bugparade/bugparade.htm, http://developer.apple.com/java/faq/issues.html#anchor6) with the generation of EPS, and I'm trying to find a workaround. The Preview application cannot export to eps, but it can read it (converting it to PDF). If I use Adobe Acrobat to read the PDF generated by Preview, the EPS it generates sometimes (inconsistently) causes dvips to make an unreadable file. What I'm trying to do is the followi...

gnuplot pdf term question -- can't get PDF to look like EPS
Hi, I'm preparing the final version of a journal paper, and the journal requires me to submit all my figures in PDF format. Previously I had generated the figures as EPS, and what I need is to make my PDF figures look like my EPS figures. My main problem is I can't figure out how to change the line style from solid to dotted,dashed, etc. I can only figure out how to change the color. In my EPS figures, the EPS writer automatijically change the lines to black and white w/ one solid, one dotted, etc., which is what I want. I've tried reading about linestyle, but nothing ...

How to convert eps to pdf with pdf file size same as the eps file BBox? (using ps2pdf)
I want to convert an eps file to a pdf file and the paper size of the newly created pdf file be the same as the BBox of the eps file. Would you please show me what options I should specify if I use ps2pdf? Or you can tell me some other ways. Thanks, Peng > I want to convert an eps file to a pdf file and the paper size of the > newly created pdf file be the same as the BBox of the eps file. Would > you please show me what options I should specify if I use ps2pdf? Or > you can tell me some other ways. This will do it: -dEPSCrop Govert Govert J. Knopper wrote: >> I want...

Postscript to PDF with pdf-tools, pdf-writer, or other
Does anyone have a way to convert Postscript to PDF using pdf-tools, pdf-writer, or other method? Any suggestions? On 14/04/2008, Sean Nakasone <seannakasone@yahoo.com> wrote: > Does anyone have a way to convert Postscript to PDF using pdf-tools, > pdf-writer, or other method? Any suggestions? ps2pdf is standard on any install of Ghostscript, at least on most flavours of Linux/BSD Farrel ...

Convert latex/dvipdf (.eps graphics) projects to pdflatex (.pdf graphics)
[Environment: debian linux, texlive 2009-7] I have several legacy projects (books, papers, beamers) with many graphics files in .eps format (or converted to .eps via command line tools) that were compiled using the latex/dvipdf(m) route. This is now limiting in that .ps/.eps doesn't support transparent colors and it is now easier for me to generate new graphics in .pdf in many applications. So, I'd like to find an easy workflow to convert an old project from using .eps graphics to .pdf so it can compile using pdflatex. Other considerations are to preserve graphic resolution in the...

Copy from a PDF to PDF
Is it possible to copy a piece of text from a page (not the whole page) from a PDF file and paste it into another PDF file in a desired position? Thanks in article YT2Fb.22892$vi2.19893@twister.auna.com, jesusp at jesusp@arrakis.es wrote on 12/20/03 1:09 PM: > Is it possible to copy a piece of text from a page (not the whole page) from > a PDF file and paste it into another PDF file in a desired position? - Yep - copy and paste. You may have to crop it first to get just what you want. And it may not paste into position - you need to move it around. - I suppose it depends on which applications you have at hand. Acrobat will certainly do it. MSD Thx, I crop the desired rectangle in the first PDF, select it with the TouchUp Object Tool, then copy it, but the WHOLE page is pasted in the second PDF and I'd like to have only the part I want. At least this is what I get with ACROBAT 5.0. Am I doing something wrong? "WharfRat" <wharfrat@footprintsphotographics.com> wrote in message news:BC09FB34.10D43%wharfrat@footprintsphotographics.com... in article YT2Fb.22892$vi2.19893@twister.auna.com, jesusp at jesusp@arrakis.es wrote on 12/20/03 1:09 PM: > Is it possible to copy a piece of text from a page (not the whole page) from > a PDF file and paste it into another PDF file in a desired position? - Yep - copy and paste. You may have to crop it first to get just what you want. And it may not paste into position - you need to move it around. - I...

pdf to dvi to pdf?
I need help with what seems to be a simple problem. I have a collection of pdf manuscript to submitt to a on-demand publisher. They want them to be: (1)6in x 9in with 1/2in margins allound (2) and embedded fonts. The problem is there are: (1) 8.5in x 11in with 1in margins (2) and the fonts aren't embedded. Perl pdf mod is one possibility, what would be involved with doing this with LaTex? I wanting to stay with open source solutions(Linux). TIA, David editor@deepmeanings.com (David Jackon) schrieb: > I need help with what seems to be a simple problem. > I have a collection of ...

Embedding PDF into PDF ?
I have read from websearching that it is possible to embed a smaller PDF into a main PDF, but cannot find out how this is done. Would I have to open the PDF as a text file and have my program locate a certain PDF command, then literally just stream the raw smaller PDF into it ? Any links or info would be very much aprpeciated Thanks Paul On Wed, 14 Jul 2004, Paul Champan wrote: > I have read from websearching that it is possible to embed a smaller PDF > into a main PDF, but cannot find out how this is done. Do you want to merge 2 pdf files or "place" pdf files into a ...

PDF::Writer, create pdf and insert in other pdf file.
Hi folks(wharever it mean my english is so bad...) the following code create a PDF: #!/usr/bin/ruby require 'pdf/writer' pdf = PDF::Writer.new pdf.text "Hello Matz", :font_size => 22 pdf.save_as "novo.pdf" ######################################## now I wanna save this pdf as a last page of a existing pdf. any tips? -- Posted via http://www.ruby-forum.com/. On Wed, Mar 26, 2008 at 1:23 PM, Ricardo Pog <ricardo85x@gmail.com> wrote: > Hi folks(wharever it mean my english is so bad...) > > > the following code create a PDF: > >...

PDF TO PDF MULTIPAGES
Hello, (gs 8.54 -Windows XP) i try this to convert a pdf file to one pdf file per page: gs.exe -sDEVICE=pdfwrite -o c:\fic-%d.pdf -q c:\colle.pdf It doesn't work. Is works with jpeg files: gs.exe -sDEVICE=jpeg -o c:\fic-%d.jpg -q c:\colle.pdf Thanks for Help. Christophe BADET Christophe BADET wrote: > Hello, > > (gs 8.54 -Windows XP) > i try this to convert a pdf file to one pdf file per page: > > gs.exe -sDEVICE=pdfwrite -o c:\fic-%d.pdf -q c:\colle.pdf > It doesn't work. > Is works with jpeg files: > gs.exe -sDEVICE=jpeg -o c:\fic-%d.jpg -q c:\colle....

pdf issues with eps graphics
My colleague and I have installed LaTeX last week to make a presentation and article for univesity regarding population dynamics. We created plots in Matlab and saved them as eps format to incorporate them in our article and presentation. While everything works fine and dandy if I choose DVI for output, I get an error to complete the debugging and output process on the eps images, as well as for example the jpg file. From what I've read I understand this has to do with the support packages, and from the error mentioned I suspect pdftex. But I'm not sure what to do now. Am Montag, den...

pdf workflow: good app for concatenating pdf files?
hi there who knows of a good application or services plug-in for concatenating PDF files? thanks, leo leo wrote: > hi there > > who knows of a good application or services plug-in for concatenating PDF > files? > > thanks, leo > > I recall successfully trying once something called joinpdf. leo <halloleo@noospaam.myrealbox.com> wrote: > who knows of a good application or services plug-in for concatenating PDF > files? Freeware: <http://www.monkeybreadsoftware.de/Freeware/CombinePDFs.html> ...

4x PDF Help
Hi Everyone -- we've launched a new question and answer site for all PDF questions. It's based on the highly popular technology platform used by StackOverflow.com, and provides a great environment for getting your questions answered and answering other people's questions. Check it out --> http://help.4xpdf.com/ Cheers, - Rowan. ...

How can I convert .txt to .pdf or .pdf to .pdf, controlling fonts?
I am trying to put some Quicken reports onto my iPhone, and I find the default .pdf print font is not clear enough. I'd like to try the Arial font (which I find to be the clearest of all fonts), but this involves either 1- converting the Quicken report .txt file to a .pdf, somehow, with control of the font, or 2- converting the Quicken report .pdf file from the default font to an Arial font .pdf and then moving the resulting .pdf to my iPhone. So far, I have failed. Does anyone know how to do this, either on a mac or on a pc? In article <4cdd4f7e$0$18655$c3e8da3$38634283@news.astraweb.com>, Gary <gary_w1@hotline.com> wrote: > I am trying to put some Quicken reports onto my iPhone, and I find > the default .pdf print font is not clear enough. I'd like to try the > Arial font (which I find to be the clearest of all fonts), but this > involves either > > 1- converting the Quicken report .txt file to a .pdf, somehow, with > control of the font, or > > 2- converting the Quicken report .pdf file from the default font to > an Arial font .pdf > > and then moving the resulting .pdf to my iPhone. > > So far, I have failed. Does anyone know how to do this, either on a > mac or on a pc? Open the file in Quicken. Use the Arial font in the size of your choice. Select "Print" and then click on the "PDF" button on the print dialog box. Se...

Convert PDF to Word by Wondershare PDF to Word on Mac App Store
PDF to Word is a PDF to Word converter specially designed for Mac OS X users. It converts PDF to Word and preserves all the text, images, layouts, hyperlinks, tables and graphics with high accuracy. After conversion, you can easily edit PDF files or reuse the contents in other applications. ...

Problem printing file with EPS graphics to PDF
Dear all: I have always use PDF graphics in TeX, which are included in my PDF file in the simple \includegraphics command. However, my co-authors now like to use EPS files and I cannot produce PDF documents when these lines calling the EPS files are included. Instead of the "Compile TeX document" button, which I otherwise use (when my graphs are in PDF already), I know have to use either the "Texify" or the "Latex" buttons to produce a DVI file. When I try to print that DVI file to PDF in Yap, I get the error message, METAFONT mode mismatch 1200 vs 600. I susp...

problem with graphic export scaling: PDF/EPS
I am having trouble getting my plot to export from matlab in full-scale units. I have tried using the 'print' command with both -deps and -dpdf. I have specified the following properties for my figure and axes: figure('Units','centimeters',... 'Position',[0 0 21.0*2 29.7 ],'Color','w',... 'PaperUnits','centimeters',... 'PaperOrientation','landscape',... 'PaperType','A3',... 'PaperPosition',[0 0 21.0*2 29.7 ],... 'PaperPositionMode','manual','Resize','off'); ...

Saving pdf is disabled but printing pdf to pdf is possible, some problems still
Hi! You know that saving editable PDF-files (I mean PDF-files where fields are editable) is disabled in Acrobat Reader. So I need a way to save edited PDF-files (with filled text-fields and other fields) to PDF. One way is to print PDF-file with some PDF-printer to new PDF, when edited field's data are saved to that new one within right way. That works sometimes but sometimes some of fonts are disabled and some text-fields are filled with different size of circles. Anyone know how to do that? Is Acrobat Reader protected against this kind of doing? Thanks a lot to everyone and I'm...

Sizing PDF pages saved from JPEG or EPS graphics?
I'd much appreciate any tutoring (or reference pointers) from people knowledgeable about PDF on how PDF page sizes are determined or can be set, in particular when one Saves graphics to PDF -- e.g., Saving either JPEG or TIFF images from Adobe Photoshop Elements, or EPS graphics from Adobe Illustrator, as PDF files. I have a number of PDF documents -- slide presentations, actually -- whose page size is shown in Adobe Acrobat's File >> Document Properties menu as 11 X 8.5 inches. I also have various JPEG or TIFF images with sizes like 4 X 3 inches, or 8 X 6 inc...

A PDF into a FM file then save as pdf... how to have alll the pages of the included pdf file
FM 7.2 We can import a complete PDF file as an object into a framemaker file. Then when we try to generate a pdf from this framemaker file, we have only the firts page of the pdf imported. Is there a method to import a pdf file and force FM to generate a pdf file with save as... with the complete pdf file inserted into the padf ? > We can import a complete PDF file as an object into a framemaker file. Then > when we try to generate a pdf from this framemaker file, we have only the > firts page of the pdf imported. > > Is there a method to import a pdf file and force FM to generate a pdf file > with save as... with the complete pdf file inserted into the padf ? FrameMaker imports PDF files per page only. To do something similar to what you intend, I once came up with a Windows shell script that writes out a MIF file, incorporating the name of a referenced PDF file and its page count. Note that the MIF code was just stripped off a file and isn't constructed very nicely, but it does the job. After running the script, you should use FrameMaker to open and save the output file. There is no text flow, thus you can't import the file into a document, but you can use it as part of a book instead. Regards Johannes Here is the VB script, feel free to post an optimized version: Dim fso, mif, pdfname, pagecount, counter Set fso = CreateObject("Scripting.FileSystemObject") pdfname = InputBox("Name o...

Putting EPS vector graphics or PDF pages into PowerPoint slides?
I'd appreciate some general advice and education on how to put EPS graphics or PDF pages into PowerPoint slides, or make complete slides from EPS or PDF originals, and come out with slides having good visual quality on screen or when projected. My computer is a Mac OS 10.3.9 (Panther). My graphics are mostly vector graphics in EPS format, with plots, lines, points, and text labels, usually created in Mathematica or Illustrator CS, then usually touched up and saved as EPS and/or PDF documents from Illustrator CS. I also have Adobe Acrobat Standard 7.0 and PowerPoint 11.1 from MOS ...

EPS
Hi, I have a problem with my Illustrator drawings when I use them in Latex. I save my files as EPS in Illustrator (version 9) and then incorporate them in Latex (using the package epsfig). I then run latex, convert everything to postscript open the document in ghostview and then convert the text to pdf. (Is this actually a strange way of doing things?) It creates nice looking PDFs that print well, except for the Illustrator files in which I used patterns. These patterns print as an even grey. (The EPS is always okay, it's only the PDF that doesn't print well.) Can anyone tell me how I...