postscript

star symbols in gnuplot

不想你离开。 提交于 2019-12-21 20:53:48
问题 I'm trying to generate an .eps figure in gnuplot using set terminal postscript eps enhanced color solid I want to include in my figure a title for a plot containing some star symbols, e.g ★ ☆ I tried through this: plot "./mydata" u 1:2 title "★ ☆" as well as this: stars = sprintf("★ ☆") plot "./mydata" u 1:2 title stars but both of them don't work. Any ideas? 回答1: set term postscript enh color eps set output 'test.eps' set title 'star1:{/ZapfDingbats \110} star2:{/ZapfDingbats \111}' plot sin

PDF crop even-odd pages with PHP + GhostScript

五迷三道 提交于 2019-12-20 03:53:20
问题 I am working in a routine for crop PDF's and import them into a PDF template. I am using GhostScript, invoked with exec() from a PHP script, and FPDI. All running server-side. So far, I am able to crop pdf documents with GhostScript using the procedure explained in this post (setting CropBox ). The next step is to crop differently the even and odd pages of a document. So I tried the method explained in this other post in SuperUser site, passing custom PostScript code into -c parameter to

How can I extract color values from an EPS file?

自闭症网瘾萝莉.ら 提交于 2019-12-19 11:27:43
问题 I'm trying to find all fill and stroke values used in an EPS file. I can parse the file, I just can't figure out how color values are defined in the EPS postscript section. I have converted the file to SVG (using ghostscript) and I can get the hex values, but an EPS to SVG conversion with a gradient produces files 20x the size. Is there a standard format for color values in postscript that I can extract from an EPS file? 回答1: PostScript is a programming language, not a simple file format, so

How can I extract color values from an EPS file?

一曲冷凌霜 提交于 2019-12-19 11:26:08
问题 I'm trying to find all fill and stroke values used in an EPS file. I can parse the file, I just can't figure out how color values are defined in the EPS postscript section. I have converted the file to SVG (using ghostscript) and I can get the hex values, but an EPS to SVG conversion with a gradient produces files 20x the size. Is there a standard format for color values in postscript that I can extract from an EPS file? 回答1: PostScript is a programming language, not a simple file format, so

Resize A4 PDF to SRA4 and center content

不打扰是莪最后的温柔 提交于 2019-12-19 10:08:33
问题 I'd like to be able to resize an A4 PDF to the slightly bigger SRA4 format, used by printing professionals. The content shouldn't be resized, but only centered. In other words, I'd like to add margins to my A4 document. I managed more or less to do that with this Ghostscript (9.05) call: gs -dPDFSETTINGS=/default -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf -dDEVICEWIDTHPOINTS=637 -dDEVICEHEIGHTPOINTS=907 -dFIXEDMEDIA in.pdf The problem is that the A4 content is not centered in

Fit to page size in ghostscript (with a possibly corrupt input)

梦想与她 提交于 2019-12-19 03:07:44
问题 I'm trying to use ghostscript to convert a .ps file to a series of .png files, largely because I don't have a tolerable ps viewer. This is the command I've used: gs -dBATCH -dEPSCrop -dEPSFitPage -sDEVICE=png16m -r300 -dNOPAUSE -sOutputFile=neptune_111115_ob1-2_13pca_boloplots_%d.png neptune_111115_ob1-2_13pca_boloplots.ps (the .ps file is a multi-page postscript). The outputs are partly off the page. I'd like the images to fit inside the page. I can include example files, but they're pretty

can I use Ghostscript to overlay a text (fax) header onto a PDF and/or TIFF?

怎甘沉沦 提交于 2019-12-18 18:25:16
问题 I'm writing an application that faxes a document (many supported types) provided by the end user. A requirement is that the end user can also provide text to be used as part of a custom fax header. I've been using Ghostscript to render PDFs as TIFFs and it's been working great so far, but I have yet to find a straightforward way of overlaying the custom header at the top of a PDF. I've tried out a few recommendations: How can I make a program overlay text on a postscript file? How can I add a

Overlay two postscript files (command line approach)?

99封情书 提交于 2019-12-18 13:31:54
问题 I'm aware that similar questions have been answered here before: postscript - overlay one pdf or ps file on top of another - Stack Overflow overlay - Overlaying or merging multiple .ps files - Stack Overflow ... however, as they don't directly answer my specific problem, I'll try asking again. I would like to know, how I can overlay two postscript files: one - a logo: logo.ps ... on top of the other - a graphic background: tmp-Front.ps .... using a command line approach in Linux. It is of

Java printing directly to a Postscript network printer

蓝咒 提交于 2019-12-18 12:28:56
问题 I've got Postscript code/data (?) in memory (in a Java Tomcat webapp) that I'd like to send directly to a networked PS printer. Is there an easy way (i.e. just popping open a port and sending the text) to print this, bypassing all of the O/S-specific drivers and stuff (and hopefully not even requiring extra jars)? A link to example code showing how to do this? Thanks, Dave 回答1: open a TCP socket to the LPR port on the target printer. send your data; as long as the printer comprehends it, you

How to use non-ASCII characters in Matlab figures (for use in LaTeX doc)?

♀尐吖头ヾ 提交于 2019-12-17 19:23:33
问题 I am using including Matlab-drawn figures into LaTeX. My usual workflow is as following: Script in matlab creates figure(s), I tweak what I find needs to be tweaked in visual figure editor, Figure is saved as .fig (for future modification) and .eps (for including in LaTeX), I convert .eps files to .pdf, PDF files are referenced in LaTeX source code. To the point: when I try to use in axis labels, legend, titles, etc. non-ASCII chars, (to be exact: Polish national chars e.g. 'ą', 'ę', 'ś', 'ć'