postscript

Postscript - forcing a text search

五迷三道 提交于 2020-01-03 03:22:09
问题 Okay, I now "know" postscript, everything makes a lot more sense now. I've found that if I change the colour though it affects backgrounds in other areas, I now know that sc, SC, cs and CS are procedures: /cs { /pdfFillXform exch def dup /pdfFillCS exch def setcolorspace } def /CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def setcolorspace } def /sc { pdfLastFill not { pdfFillCS setcolorspace } if dup /pdfFill exch def aload pop pdfFillXform setcolor /pdfLastFill true def

PostScript versus PDF as an output format

倖福魔咒の 提交于 2020-01-01 01:39:23
问题 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

Create a tiff with only text and no images from a postscript file with ghostscript

喜你入骨 提交于 2019-12-31 04:58:06
问题 Is it possible to create a tiff file from a postscript-file (created from a pdf-document with readable text and images) into a tiff file without the images and only the text? Like add a maxbuffer so images will be removed and only text remaining? And if boxes and lines around text could be removed as well that would be awesome. Best regards! 回答1: You can redefine the various 'image' operators so that they don't do anything: /image { type /dicttype eq not { % uses up argument, only one if dict

How to get Ghostscript to use embedded fonts in PDF

做~自己de王妃 提交于 2019-12-28 13:36:10
问题 gs -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dBATCH \ -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf I'm using (trying anyway) to use Ghostscript to reduce my PDF file size. The command above looks like it works, it reduces file size greatly, but then several of the fields are garbled. As for as I can track it down, It's doing font substitution. IE, The same text = same garbled text. The fonts are embedded in the PDF when it gets to me. Additionally, I have tried to add

Which approach is best for creating PostScript in C#?

不想你离开。 提交于 2019-12-25 01:48:54
问题 I need to create PostScript output from our system. Our system produces highly formatted documents to numerous formats and I need to add .ps as an additional format. One bit of weirdness, our code is all written in Java and we use IKVM for the .net version of our library. We have about 5% of the code written in C# and the rest is Java converted with IKVM. I create .ps files on the Java side using a library that allows me to write to a Graphics2D object it provides. Unfortunately, in .NET (via

Saving a large turtle graphics image from the entire canvas, not just the window

泄露秘密 提交于 2019-12-25 01:22:20
问题 After looking for answers all around, I find lots of help and guidance on how to save a file either using turtle screen or tkinter canvas mixed with the turtle module. I'm drawing a large image and the windows size is fine and scrollable, letting me see the entire image. But when I try to save the image to postscript, I only get the window view, not the entire canvas. Cannot find out how to proceed, any tips? There might be an answer in How can I convert canvas content to an image? but I

Bitmap Image from Hex string - extra bytes being added

£可爱£侵袭症+ 提交于 2019-12-24 18:21:25
问题 I have a Hex string that's coming from postscript file. << /ImageType 1 /Width 986 /Height 1 /BitsPerComponent 8 /Decode [0 1 0 1 0 1] /ImageMatrix [986 0 0 -1 0 1] /DataSource < 803fe0503824160d0784426150b864361d0f8844625138a4562d178c466351b8e4763d1f904864523924964d27944a6552b964b65d2f984c665339a4d66d379c4e6753b9e4f67d3fa05068543a25168d47a4526954ba648202 > /LZWDecode filter >> image } def Below are the methods that I am using. I have commented out the method for updating color. public static

How to insert a TIFF into PostScript?

核能气质少年 提交于 2019-12-24 15:08:39
问题 I would like to include a TIFF image into my PostScript similarily to an EPS and a JPEG. But it fails on creation stating the file ImageType isn't JPEG. Is this possible? 回答1: You can't use a TIFF directly in PostScript, as PostScript doesn't support the TIFF file format. You can use a PostScript program to read a TIFF file and process it as an image, for example : Conversion of TIFF to PDF with Ghostscript 来源: https://stackoverflow.com/questions/30707216/how-to-insert-a-tiff-into-postscript

How can I make DOT correctly process UTF-8 to PostScript and have multiple graph/pages?

馋奶兔 提交于 2019-12-24 12:51:41
问题 This dot source graph A { a; } graph B { "Enûma Eliš"; } when compiled with dot -Tps generates this error Warning: UTF-8 input uses non-Latin1 characters which cannot be handled by this PostScript driver I can fix the UTF-8 problem by passing -Tps:cairo but then only graph A is in the output -- it is truncated to a single page. The same happens with -Tpdf . There are no other postscript driver available on my installation. I could split the graphs into separate files and concatenate them

How do I stop an .EPS file from breaking text into multiple lines in PostScript?

怎甘沉沦 提交于 2019-12-24 07:58:04
问题 I'm trying to specifically change out text from an .EPS file that's generated by an Adobe product, like Illustrator or InDesign. For whatever reason some fonts are broken onto separate lines and moved a tiny bit. It's not a TrueType versus OpenType thing. Here's an example, the text is "$$tag1$$": %ADOEndSubsetFont /ZDCMCB+NiagaraSolid-Reg /NiagaraSolid-Reg findfont ct_VMDictPut /ZDCMCB+NiagaraSolid-Reg*1 [36{/.notdef}rp /dollar 12{/.notdef}rp /one 47{/.notdef}rp /a 5{/.notdef}rp /g 12{/