1,622 questions
0
votes
1
answer
47
views
Using copypage in PostScript
I have some not-so-old PostScript programs that create an animation using the copypage operator. See a simple example below [*].
They worked fine in macOS using Preview and pstopdf while Apple ...
2
votes
1
answer
80
views
How are ghostscript and ps2pdf related?
My initial problem was: How can I use my Mac's system fonts in a PostScript file; that is, a font that is NOT among the standard 35 (?) PostScript fonts.
It is no longer my problem because I stumbled ...
0
votes
0
answers
68
views
PDF: Embedding a document yields a /rangecheck error
From the official pdfmark documentation I copy-pasted into a file named example.ps:
[ /NamespacePush pdfmark
[ /_objdef {fstream} /type /stream /OBJ pdfmark
[ {fstream} << /Type ...
0
votes
0
answers
74
views
Generating EPS Files with Clipping Paths that Photoshop Correctly Recognizes as Vector Paths
I'm working on a web application (Vue.js) that removes backgrounds from images. An important component is exporting EPS files with clipping paths that are correctly recognized in Adobe Photoshop.
The ...
2
votes
1
answer
77
views
Is %%EOF more than a comment in EPS?
Contrary to regular PostScript (PS) files, some comments in Encapsulated PostScript (EPS) file have a special meaning. For example, they must start with %!PS-Adobe-3.0 EPSF-3.0 and have a special %%...
1
vote
0
answers
30
views
PostScript - text outline doesn't match the text [duplicate]
In PostScript, I'm trying to get a precise bounding box for rendered text.
I believe I'm using the built-in PostScript operators correctly, but the results are unexpected.
The outline doesn't match ...
1
vote
1
answer
94
views
Pass argument from GhostScript CLI to PostScript
I'm using Ghostscript to convert PDF to PDF/A files, which works fine. I want to use the -dSAFER option, which forces me to use absolute path name for the ICCProfile in the file PDFA_def.ps:
% in the ...
0
votes
0
answers
218
views
Detect /OpenAction in a PDF with Ghostscript
I have a pdf with a Pages dictionary like this
<< /Type /Pages /Kids [
5 0 R
142 0 R
225 0 R
296 0 R
302 0 R
308 0 R
314 0 R
4 0 R
336 0 R
] /Count 9
...
0
votes
1
answer
43
views
How do I get a large integer value from the REALTIME operator in postscript? miliseconds?
The REALTIME operator is supposed to output the time in miliseconds.
I want to use that as a seed for RAND, but the output is always a two digit number between 24 and 31. How am I misunderstanding the ...
0
votes
0
answers
54
views
PostScript: Suppress/hide charpath outline
The following PostScript code generates the y axis of a diagram.
I just need the charpath for getting the bounding box of the text to align it.
How can I prevent the charpath from being be shown?
%!PS
...
1
vote
1
answer
202
views
Ranges in CMap files
In a CMap file (for use in PostScript or PDF documents), is it allowed to have CID ranges where the start end end codes differ in more than the last byte? For example, would the following be valid?
1 ...
2
votes
1
answer
245
views
Using Ghostscript to add page numbers via batch
I am trying to add pages to PDFs in the format page out of total_num_pages, I have about 100K documents to process, so I need to figure out a way to do this with many documents.
I have a batch file ...
1
vote
0
answers
59
views
In Postscript, does loading a dictionary to run a procedure have the same overhead as doing a lookup of the procedure name in the dict?
/myDict<<
/myProc {
(Hello world) =
}
>>def
myDict begin %A
myProc %A
end %A
myDict /myProc get exec %B
Given the above Postscript ...
0
votes
0
answers
81
views
Is it possible to export the width and height of a string to an external program writing native Postscript
I have a program that writes Postscript code to draw various diagrams using a Postscript graphics library. I would like to know in the main program what the actual size (height and length) of the text ...
1
vote
1
answer
169
views
PostScript circles: how accurate, how improve?
The PostScript command arc can draw circles, and part circles. Adobe Distiller draws angles ≤90° as a single Bézier cubic. How accurate is this; how can it be made more accurate?
Similar content to ...
0
votes
0
answers
145
views
how to extract location state from postscript?
I am writing a quiz generator, started using HTML which turns out to be hard to deterministically decide where things will be. So I am going to use postscript.
When I write out a question, and the box ...
1
vote
0
answers
189
views
how to make Accessibiity pdf from postscript file
I came to knew from one thread "ghostscript ps pdfmark command /BDC for content tagging (PDF/UA and WCAG 2.0)" that it is possible to create Accessibility PDF from postscript file. is there ...
0
votes
0
answers
187
views
convert postscript file to eps file that is in a vector format
I want to generate an eps file (.eps) that contains vector data rather than rasterized data. I am trying to do so by converting a postscript file (.ps) into an eps file using ps2eps like so:
ps2eps ...
0
votes
0
answers
728
views
How to embed unembedded fonts in a PDF?
I am currently working on a project where I need to embed fonts into an existing PDF file that has some fonts that are not embedded. My primary goal is to ensure that all fonts used in the PDF are ...
2
votes
1
answer
51
views
How to use postscripts from metapost as images in graphviz?
I produce two postscript files runing metapost on the file example.mp containing:
beginfig(1);
u=1cm;
draw (2u,2u)--(0,0)--(0,3u)--(3u,0)--(0,0);
pickup pencircle scaled 4pt;
for i=0 upto 2:
for j=0 ...
2
votes
0
answers
103
views
PostScript to PDF conversion problem with shfill
I have a PostScript file with a shfill in it that views fine in tools such as gv and converts fine to png using ghostscript however the shfill disappears when using ps2pdf on Linux (which uses gs ...
3
votes
1
answer
108
views
PostScript "half stroke"?
In PostScript, once a path is defined, one can stroke it with the current linewidth. I imagine a pen of that width drawn along the path to create the line, the "ink" from this pen is ...
3
votes
1
answer
364
views
compute bounding box for arbitrary PostScript code, from within PostScript
I want to be able to run some arbitrary PostScript code, and find out what its bounding box is, for the purpose of centering and/or scaling that PostScript code when I run it again. This needs to all ...
0
votes
0
answers
127
views
Is there a workaround exporting larger Postscript files (.eps) via Python-turtle?
This is a follow-up off my first post, Workaround for exporting larger Postscript files (.eps) via Python-turtle
In short, I spend last evening and this morning studying cdlane’s “The key”.
And had ...
0
votes
0
answers
505
views
How to use Ghostscript to embed fonts (ttf) into PDFs?
I modify my pdf structure adding this:
/F1 <<
/Type /Font /Subtype /TrueType /BaseFont /MyFont /Encoding /WinAnsiEncoding /FontDescriptor 3 0 R /FirstChar 32 /LastChar 255 >>
Then, I ...