postscript

Print PDF using GhostScript

帅比萌擦擦* 提交于 2019-12-04 09:44:30
问题 I am in need of your support on the following issue since its pulling me for a while. We have a small c# utility, which print given PDF using GhostScript . This print as expected but fail to retain the page formatting’s. However, pages are printed as expected when I switch Adobe Acrobat in place of GhostScript . So I presume, I am making some obvious mistake on the GhostScript's command line arguments . Background Following is the core c# logic, which print a given PDF file with varying style

Converting correctly pdf to ps and vice-versa

两盒软妹~` 提交于 2019-12-04 09:41:23
问题 I'm using "pdftops" to convert .pdf files to .ps files and then "ps2pdf" for the reverse process (poppler-utils). The problem is that when creating the .pdf files from the .ps files, the text looks ok, but when i try to copy it, the characters are very strange (it's like they are corrupted). I used these tools on other files for a long time and it worked fine. I also tried "pdftohtml -xml" to create an .xml file, and the text is ok (the characters are extracted correctly). What problem could

Postscript: concatenate two strings?

坚强是说给别人听的谎言 提交于 2019-12-04 07:05:01
How do I concatenate two strings in Postscript? (foo) (bar) ??? -> (foobar) lhf PostScript doesn't have a built-in string concatenation operator. You need to write some code for that. See http://en.wikibooks.org/wiki/PostScript_FAQ#How_to_concatenate_strings.3F for instance. (update by mh: copied here) /concatstrings % (a) (b) -> (ab) { exch dup length 2 index length add string dup dup 4 2 roll copy length 4 -1 roll putinterval } bind def Same idea generalized to any number of strings. Earlier revisions use a helper function acat which takes an array of strings (for easy counting and iteration

create two pdfs from one .ps file?

喜欢而已 提交于 2019-12-04 01:42:36
问题 I need to reformat a text file into a PDF. Using Perl, I am modifying an existing PostScript template file based on what is in the text file. Sometimes this text file will be long enough to require a two page PDF. Can I create a two page PDF file from one .ps file using GhostScript? If so, what tells GhostScript where the page break should occur? Maybe I need to use two template files. One for a one page pdf and another for a two page PDF. 回答1: PostScript doesn't directly have the concept of

Can transparency be used with PostScript/EPS?

隐身守侯 提交于 2019-12-04 00:43:54
I am trying to save an R plot as an EPS file but I have a problem with the following component of the plot - the gray transparent polygon (transparent black = gray effect): polygon(x.polygon, y.polygon.6, col="#00000022", border=NA) This line of code works fine when saving the plot as PDF but not as EPS. Looks like EPS does not support transparency? What other choice would I have? Here is the code for the full plot: postscript(file="Figure.eps", width=5.5, height=5.5, onefile=F, horizontal=F) ts(t(data.frame(initial_timepoint, second_timepoint, third_timepoint, final_timepoint)))->obj obj[,-c

How can I write arc text in postscript file

南笙酒味 提交于 2019-12-03 21:07:00
I have this, But I want to have text alignment like an arc. Is it possible? /outputtext { /data exch def /rot exch def /xfont exch def /y1 exch def /x1 exch def /Times-Roman findfont xfont scalefont setfont x1 y1 moveto rot rotate data show rot neg rotate } def % x y fontsize rotation (text) outputtext 20 300 12 0 (text1) outputtext 20 400 12 90 (text2) outputtext 20 500 12 90 (text3) outputtext 20 600 12 0 (text4) outputtext showpage Adobe's famous Blue Book ( PostScript Language Tutorial and Cookbook, Adobe Systems, Addison-Wesley 1985; ISBN 0201101793 ) contains a very well explained

PDF to PostScript Using Ghostscript: large files having issues printing

不羁岁月 提交于 2019-12-03 17:16:18
I'm currently using Ghostscript to convert 500 page PDF files into PostScript. I'm using Windows 7, Ghostscript x64 v 9.16, and a Kodak Digimaster Commercial Printer. I use the following arguments for GhostScript to convert a PDF into PS: C:\Program Files\gs\gs9.16\bin\gswin64c.exe" -dCompressFonts=true -dSubsetFonts=true -dEmbedAllFonts=true -sFONTPATH=C:\Windows\Fonts\ -dNOPAUSE -dBATCH -sDEVICE=ps2write -sOutputFile="PostScript.ps" "MyPdf.pdf" I then add %KDK (proprietary) commands to dictate which pages need to print on which paper by using the %KDKSlip command based on the Printer

PostScript versus PDF as an output format

只谈情不闲聊 提交于 2019-12-03 05:04:42
I'm currently writing a typesetting application and I'm using PSG as the backend for producing postscript files. I'm now wondering whether that choice makes sense. It seems the ReportLab Toolkit offers all the features PSG offers, and more. ReportLab outputs PDF however. Advantages PDF offers: transparancy better support for character encodings ( Unicode , for example) ability to embed TrueType and even OpenType fonts hyperlinks and bookmarks Is there any reason to use Postscript instead of directly outputting to PDF? While Postscript is a full programming language as opposed to PDF, as a

Print PDF using GhostScript

瘦欲@ 提交于 2019-12-03 04:53:12
I am in need of your support on the following issue since its pulling me for a while. We have a small c# utility, which print given PDF using GhostScript . This print as expected but fail to retain the page formatting’s. However, pages are printed as expected when I switch Adobe Acrobat in place of GhostScript . So I presume, I am making some obvious mistake on the GhostScript's command line arguments . Background Following is the core c# logic, which print a given PDF file with varying style across each pages. The given PDF file has pages; with inconsistent font style and colour some of the

Converting correctly pdf to ps and vice-versa

此生再无相见时 提交于 2019-12-03 03:51:36
I'm using "pdftops" to convert .pdf files to .ps files and then "ps2pdf" for the reverse process (poppler-utils). The problem is that when creating the .pdf files from the .ps files, the text looks ok, but when i try to copy it, the characters are very strange (it's like they are corrupted). I used these tools on other files for a long time and it worked fine. I also tried "pdftohtml -xml" to create an .xml file, and the text is ok (the characters are extracted correctly). What problem could it be regarding the conversion? Maybe if I use "pdftops" and "ps2pdf" are there some options that need