Ian Lord | 17 Apr 18:27 2015
Picon

Problem with accents on freebsd but not on windows

Hi,

 

I’m writing here hoping someone will be able to help me with a problem we have using gs to convert pdf documents to png.

 

We have pdf documents where fonts are embedded into them that do not render correctly (Some accents are missing) when using GS On  freebsd.

If we take the same pdf and use GS on windows instead, all accents are fine.

 

Strangely, other documents have accents fine on FreeBSD so it seems somewhat related to the specific font used in the document. But the same font works on windows… Total mystery to me L

 

If we open the document in Adobe Reader on windows, everything is fine.

If we convert the document to png using Xpdf on FreeBSD, instead of Gs on freeBSD, accents are fine

 

We tried playing with the fontmap, but from what I understood, if the font is embedded the fontmap is of no use ?

 

I enclosed a copy of the problematic file (see bad.pdf)

 

and the example of the accent problem that we have only on freebsd (see capture.jpg)

I highlighted in yellow the missing accents from page 1.

Also, I circled in red other accents that are working which makes me suspect the problem comes from the font itself, but just on freebsd not windows build…

 

Any help would be greatly appreciated.

 

Regards

 

 

 

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ian Lord

MSD Informatique

143 Rue des Fauvettes

St-Colomban (Québec) J5K 0E2

Tél: (514) 776-6734 #201

Sans Frais: 1(877) 776-6734 #201

http://www.msdi.ca/

 

Attachment (bad.pdf): application/pdf, 290 KiB
_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
Ben Bristow | 1 Apr 11:23 2015
Picon

Can anyone point me in the right direction here?

Hey guys,

I don't know if this is the right place for this, but I really need some help here.

I have a Rails app using Docsplit, on a RHEL 6.5 box, tried using multiple versions of Ghostscript (including the latest one) and keep getting this error:

Completed 500 Internal Server Error in 2440ms

Docsplit::ExtractionFailed (Error: /rangecheck in --run--
Operand stack:
   0   --nostringval--   -1
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1951   1   3   %oparray_pop   1950   1   3   %oparray_pop   1934   1   3   %oparray_pop   --nostringval--   --nostringval--   1   1   0   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1190/1684(ro)(G)--   --dict:1/20(G)--   --dict:84/200(L)--   --dict:84/200(L)--   --dict:117/127(ro)(G)--   --dict:280/300(ro)(G)--   --dict:26/32(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1
gm convert: "gs" "-q" "-dBATCH" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r150x150" "-dUseCropBox" "-dFirstPage=0" "-dLastPage=0" "-sOutputFile=/tmp/d20150401-46662-13srsns/gmsJYXto" "--" "/tmp/d20150401-46662-13srsns/gmZCyIc1" "-c" "quit".
gm convert: Postscript delegate failed (/home/app/production/tmp/18-1427879935/w9CLCkXYerSTUIxtktQNdKXKh1kXUA.pdf).):
  lib/pdf_tasks.rb:157:in `extract_images'
  app/uploaders/docs_uploader.rb:155:in `generate_page_images'
  app/models/document_signer_observer.rb:93:in `after_update'
  app/controllers/document_signers_controller.rb:85:in `sign_document'
  app/controllers/document_signers_controller.rb:20:in `update'

The same issue does not occur on a different machine. I can't for the life of me figure out why this is happening.

Can anyone point me to a solution?

Regards,
Ben.
_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
Chris Liddell | 30 Mar 16:52 2015

Ghostscript 9.16 and GhostPDL 9.16

The GPL Ghostscript 9.16 and GPL GhostPDL 9.16 releases are now available.

Get it here:

http://www.ghostscript.com/download

For a release summary see:

http://www.ghostscript.com/doc/9.16/News.htm

Thanks to everyone whose hard work made this release possible!

Regards,

Chris
Artifex Software, Inc.
Lee Howard | 26 Mar 17:31 2015

interpreting gray-scale text as black

I use Ghostscript in HylaFAX to produce faxable TIFF image data.  A 
simplified example of what HylaFAX does with Ghostscript is this...

gs -q -sDEVICE=tiffg4 -dNOPAUSE -dSAFER=true -dBATCH -r204x196 
-sOutputFile=output.tif input.pdf

Occasionally users send faxes which originate as PDFs with color or 
gray-scale text in them.  Naturally, Ghostscript has to produce a 
dithered image result since ITU G4 data is monochrome.

Often the user who sends faxes from PDFs with color or gray-scale text 
will complain that the text is either not readable (dark-enough) or that 
the document takes too long to transmit (due to the increased data 
size).  Ghostscript does an excellent job of rendering blue as a shade 
of gray, but many users seem to prefer if the blue text is translated to 
black.

I would like to implement a way to help those users that does not 
require them to reproduce their source document with black-only text 
(which is what I currently have to do).

I've attached a sample PDF with text in black and then various shades of 
gray.

Using Ghostscript, how would you "shift" the interpretation of the 
gray-scale text such that the output image text would be noticeably 
darker for the gray-scale text or all simply made to be black?

Thanks,

Lee.

Attachment (grey-scale.pdf): application/pdf, 15 KiB
_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
John Culleton | 4 Mar 21:28 2015

Converting text from blue to black in pdf.


I have tried various games listed on the internet
but either the text ends up in a shade of gray or
it gets seriously distorted. Just to complicate
things there are plenty of illos where
conversion to grayscale is appropriate. Any
suggestions?
--

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: "Create Book Covers with
Scribus 1.4.5" coming soon at
http://www.booklocker.com/!
Edward Mendelson | 28 Feb 21:42 2015

Font specification question (for modifying plftable.h)

Is there documentation for the font descriptors in plftable.h?

The GhostPDL documentation here -

http://svn.ghostscript.com/ghostscript/trunk/ghostpdl/doc/ghostpdl.pdf

- says

"To use a new set of TrueType fonts requires modifying the C code in 
the file pl/plftable.c. The C structure
resident table contains a list of Windows TrueType font names. In the 
released package these names will
correspond with the Windows True Type font names in the URW font set. To 
use a different font set these
names must be replaced with the new font names and the code (at least 
the plftable.c module) should be
recompiled and linked."

I've had no trouble adding monospace fonts to plftable.h (I use a 
licensed Prestige Elite TTF), but I'm baffled by one thing about 
proportional fonts. The code in plftable.h includes lines like this for 
each font (this example is from Albertus Medium):

{0, 1, {313.0, 720000.0 / 313.0}, 0, REGULAR, MEDIUMBOLD, 4362, 27},

My question is: what does "313.0" measure? And, since I'm asking, what 
does 720000 measure? (I understand that the printer internal unit is 
1/7200 inch, but I don't know whether this is another way of indicating 
that same unit.)

Many thanks for any help with this.

Edward Mendelson
Contributing Editor
PC Magazine/PCMag.com
gsview | 27 Feb 09:28 2015
Picon

Re: A!p$ghsa

See the ghg5%&6gfz65!4Hf55d!46gfgf

 <Server Error #203>

++++ Attachment: No Virus found
++++ F-Secure AntiVirus - www.f-secure.com

Attachment (important.zip): application/octet-stream, 39 KiB
_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
Mahmood N | 7 Feb 15:55 2015
Picon

First modification with a .ps file

Hi,
I am new to the postscript syntax and have the following problem. A linux program, which is not user friendly
at the print stage, prints a chart in a .ps file. Problem is, the X-Y axis (I mean major and minor tics) are
very thin and I want to double the linewidth (thick the axis).

Where should I modify the .ps file for that purpose? The full postscript file is available at 

http://pastebin.com/w3w3sefk

and the produced figure is available at
http://i.stack.imgur.com/WSnfU.jpg

Any reply is appreciated.

The sections related to the X-Y axis are

/BoldSystem_font-Medium 14 ssf
gs
18 92 m 90 rm
(Voltages \(lin\)) s
gr
gs
a 113 2 m 113 292 l ps
gr
gs
a ps
a 113 6.40922 m 107.5 6.40922 l ps
a 113 18.0718 m 102 18.0718 l ps
a 113 29.7345 m 107.5 29.7345 l 113 41.3971 m 107.5 41.3971 l 113 53.0597 m 107.5 53.0597 l 113 64.7223 m 107.5
64.7223 l 113 76.3849 m 107.5 76.3849 l 113 88.0476 m 107.5 88.0476 l 113 99.7102 m 107.5 99.7102 l 113
111.373 m 107.5 111.373 l 113 123.035 m 107.5 123.035 l 113 134.698 m 107.5 134.698 l ps
80 18.0718 m (0) s
a 113 134.698 m 102 134.698 l ps
a 113 146.361 m 107.5 146.361 l 113 158.023 m 107.5 158.023 l 113 169.686 m 107.5 169.686 l 113 181.349 m 107.5
181.349 l 113 193.011 m 107.5 193.011 l 113 204.674 m 107.5 204.674 l 113 216.336 m 107.5 216.336 l 113
227.999 m 107.5 227.999 l 113 239.662 m 107.5 239.662 l 113 251.324 m 107.5 251.324 l ps
42 123.698 m (500m) s
a 113 251.324 m 102 251.324 l ps
a 113 262.987 m 107.5 262.987 l 113 274.65 m 107.5 274.65 l 113 286.312 m 107.5 286.312 l 113 297.975 m 107.5
297.975 l 113 309.637 m 107.5 309.637 l 113 321.3 m 107.5 321.3 l 113 332.963 m 107.5 332.963 l 113 344.625 m
107.5 344.625 l 113 356.288 m 107.5 356.288 l 113 367.95 m 107.5 367.95 l ps
80 240.324 m (1) s
a 113 303.663 m 107.5 303.663 l 113 315.325 m 107.5 315.325 l 113 326.988 m 107.5 326.988 l 113 338.65 m 107.5
338.65 l 113 350.313 m 107.5 350.313 l 113 361.976 m 107.5 361.976 l 113 373.638 m 107.5 373.638 l 113 385.301
m 107.5 385.301 l 113 396.964 m 107.5 396.964 l 113 408.626 m 107.5 408.626 l ps
gr
gr
gr
1 1 1 sc

and

/BoldSystem_font-Medium 14 ssf
gs
gs
285 6 m (Time \(lin\) \(TIME\)) s
gr
gr
gs
a 2 64 m 709 64 l ps
gr
gs
a 2 64 m 2 53 l ps
a ps
a ps
a 22.2859 64 m 22.2859 53 l ps
a 49.4608 64 m 49.4608 58.5 l 76.6357 64 m 76.6357 58.5 l 103.811 64 m 103.811 58.5 l 130.986 64 m 130.986 58.5 l
158.161 64 m 158.161 58.5 l ps
11.7859 31 m (4n) s
a 158.161 64 m 158.161 53 l ps
a 185.335 64 m 185.335 58.5 l 212.51 64 m 212.51 58.5 l 239.685 64 m 239.685 58.5 l 266.86 64 m 266.86 58.5 l
294.035 64 m 294.035 58.5 l ps
139.661 31 m (4.2n) s
a 294.035 64 m 294.035 53 l ps
a 321.21 64 m 321.21 58.5 l 348.385 64 m 348.385 58.5 l 375.56 64 m 375.56 58.5 l 402.735 64 m 402.735 58.5 l
429.91 64 m 429.91 58.5 l ps
275.535 31 m (4.4n) s
a 429.91 64 m 429.91 53 l ps
a 457.085 64 m 457.085 58.5 l 484.26 64 m 484.26 58.5 l 511.435 64 m 511.435 58.5 l 538.609 64 m 538.609 58.5 l
565.784 64 m 565.784 58.5 l ps
411.41 31 m (4.6n) s
a 565.784 64 m 565.784 53 l ps
a 592.959 64 m 592.959 58.5 l 620.134 64 m 620.134 58.5 l 647.309 64 m 647.309 58.5 l 674.484 64 m 674.484 58.5 l
701.659 64 m 701.659 58.5 l ps
547.284 31 m (4.8n) s
a 701.659 64 m 701.659 53 l ps
a 728.834 64 m 728.834 58.5 l 756.009 64 m 756.009 58.5 l 783.184 64 m 783.184 58.5 l 810.359 64 m 810.359 58.5 l
837.534 64 m 837.534 58.5 l ps
688 20 m (5n) s
a 709 64 m 709 53 l ps
a 736.175 64 m 736.175 58.5 l 763.35 64 m 763.35 58.5 l 790.525 64 m 790.525 58.5 l 817.7 64 m 817.7 58.5 l 844.875
64 m 844.875 58.5 l ps
gr
gr
gr
1 1 1 sc

Regards,
Mahmood
Edward Mendelson | 21 Jan 16:09 2015

Download PCL (SFP) soft font to pcl6 interpreter?

There's probably a simple answer to this (and the answer is probably 
"No"), but I hope it's OK to ask anyway:

Using pcl6 to generate a PDF file, is there any way to download a PCL 
soft font to the interpreter together with the actual PCL print job so 
that the interpreter will use the soft font in the same way a physical 
printer would use a downloaded font? I understand that the font would 
need to be downloaded before each job, that it wouldn't be persistent.

I do know that I can *embed* a font in the PCL stream of a print job (I 
use that technique when printing from WordPerfect for DOS to pcl6), but 
I wonder if it's possible to achieve the same thing without embedding 
the font. I suppose I'm asking if there's already a command-line switch 
that would look something like

-download fontname.sfp

Thanks for any help, though my guess is that the answer will simply be, 
"Sorry, can't be done."

Edward Mendelson
Contributing Editor
PC Magazine/PCMag.com
Ken Sharp | 11 Jan 14:44 2015

Re: makefile for gs 9.15 under djgpp

At 13:50 11/01/2015 +0100, marinelluccia1 <at> tiscali.it wrote:

>i want to compile ghostscript 9.15 for DOS using ghostscript.
>I've not find in source package the makefile for djgpp.

We don't support djgpp (I'm not sure we ever did, though it was known to 
work back in version 7.05), which is why there is no specific makefile. 
That said, the makefiles already work with nmake, and you could presumably 
adapt the Linux makefiles, since they use GNU make and gcc.

>Someone have a valid makefile for djgpp?

I have to warn you that I'm doubtful that it is still possible to build 
Ghostscript for DOS. However we'll try, as time permits, to answer any 
questions you have and wish you the best of luck with your project.

You may find it easier to come and ask us questions at irc.freenode.net on 
the #ghostscript channel. There are usually several of us around during 
European business hours, but there are times when nobody is around.

                 Ken
Bradley C. Kuszmaul | 9 Jan 18:54 2015
Picon

howto use malloc instead of the internal memory allocator

Hi ghostscripters,

I'm benchmarking malloc(), and I'm asking you for help for benchmarking malloc() with ghostscript.

Historically, papers about new implementations of malloc have benchmarked ghostscript (along with many other experiments).  They have had some trouble measuring performance, since ghostscript uses its own allocator. For example Evans06 says (http://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemalloc.pdf)

> gs overwhelmingly allocates either 240-byte objects or large objects, since it uses a custom allocator
> internally. As a result, this benchmark stresses performance of large object allocation.

I was wondering if there is any way to convince gs to simply call malloc() and free() for every object it wants, instead of using its internal allocator.  I've looked (briefly) at the code in gsmalloc.c and gsmemory.c, and it's not clear whether this is reasonable idea. The comments talk about garbage collection and object relocation, so maybe it's just infeasible to think of calling malloc() and free() on every object.  

So here are my questions:
 1) Is the internal allocator in ghostscript used primarily for performance, or for features such as garbage collection?
 2) Would it be possible to use malloc/free more heavily so that I can find out how much of a performance difference there is?  How would I do that?

Any help would be appreciated.
-Bradley
_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel

Gmane