I need to embed fonts in generated PDF fom word Document programtically in C# .net.
Currently I am using Ghostscript 9.53 for embedding fonts. The resultant PDF's are approx 3-4 times bigger comapred to the ones genrarted with Ghostscript 9.07. These PDF's are sent to the Printer and to Archive.
Since bigger PDF's are eating the archive Disk space very quickly, what possibilites exists to make the PDF's smaller with embedded fonts using GS 9.53.3.
I've tried using the resource folder from 9.07 in 9.53.3 and also using the ResourceDir switch. The Resultant PDF was still the same size.
My requirement is that fonts needs to be embedded and keep the PDF's to the smallest size as Possible.
I need to embed fonts in generated PDF fom word Document programtically in C# .net.
Currently I am using Ghostscript 9.53 for embedding fonts. The resultant PDF's are approx 3-4 times bigger comapred to the ones genrarted with Ghostscript 9.07. These PDF's are sent to the Printer and to Archive.
Since bigger PDF's are eating the archive Disk space very quickly, what possibilites exists to make the PDF's smaller with embedded fonts using GS 9.53.3.
I've tried using the resource folder from 9.07 in 9.53.3 and also using the ResourceDir switch. The Resultant PDF was still the same size.
My requirement is that fonts needs to be embedded and keep the PDF's to the smallest size as Possible.
In article <f598435b-83be-4769...@googlegroups.com>,
daffod...@gmail.com says...
I need to embed fonts in generated PDF fom word Document programtically in C# .net.
Currently I am using Ghostscript 9.53 for embedding fonts. The resultant PDF's are approx 3-4 times bigger comapred to the ones genrarted with Ghostscript 9.07. These PDF's are sent to the Printer and to Archive.
Since bigger PDF's are eating the archive Disk space very quickly, what possibilites exists to make the PDF's smaller with embedded fonts using GS 9.53.3.
I've tried using the resource folder from 9.07 in 9.53.3 and also using the ResourceDir switch. The Resultant PDF was still the same size.
My requirement is that fonts needs to be embedded and keep the PDF's to the smallest size as Possible.As I said on IRC (though you did not respond so I have no idea if you
saw it), it is very unlikely that you can reliably produce a new PDF
file with the fonts embedded, which correctly draws the text, without
the file being substantially larger.
It is conceivable that, for PDF files produced systematically in the
same way, a simpler treatment is possible and that is why (for the PDF
files you are processing) an older and less reliable method produces acceptable results.
However, should the production of the original PDF files change you may
well discover the reason that the files are now larger is because you
were taking advantage of some 'quirk' of the original PDF files which no longer applies with the new ones.
As I said, I cannot possibly venture to guess at a reason wiithout
seeing the original files. Nor I suspect can anyone else, given that I maintain the software which creates the PDF files. If you would like
someone to look at your problem you should open a bug report, attach an example file and state the command line you are using.
You can sign up to the Ghostscript bug tracker at bugs.ghostscript.com
Ken
The text and image contents of the files remain the same. The onlyoperation perfomed is to embed the fonts completely.
My concern here ist how can I instruct ghostscript not to use thebigger Fonts or use the Resources from version 9.07?
In article <d9180159-1e0d-4e15...@googlegroups.com>,
daffod...@gmail.com says...
The text and image contents of the files remain the same. The onlyoperation perfomed is to embed the fonts completely.
I'm afraid that's what you *want* to happen, but it isn't what the
pdfwrite device does. It creates a totally new PDF file, it does not
simply embed fonts into the existing PDF file. At the PDF-syntax level
the input and output files will be quite different.
As such there is a great deal going on behind the scenes and fonts are a
a particular problem. It is likely that the reason for the change is
that the simpler method used by the old version of Ghostscript was insufficient and led to incorrect PDF files being created from some
kinds of input files.
Obviously we would fix that, we prefer that the result be correct to
being small.
My concern here ist how can I instruct ghostscript not to use thebigger Fonts or use the Resources from version 9.07?
As I said, I doubt that you can. The likelihood is that the fonts are
being embedded differently to avoid a problem. You are (currently)
fortunate that your usage does not expose the underlying problem in the output from the old version of Ghostscript.
However it is quite possible that at some point in the future you will encounter an input file which does not process correctly using the old scheme, in which case your output file would be incorrect.
That is, of course, a guess. As I have said, I cannot even begin to
guess what changes over the last 7 years would have had this effect,
there have been literally thousands of commits.
You could, of course, carry on using the old version of Ghostscript.
But if you open a bug report, attach an example file and give me a
command line I will look at the problem. Note that if the example
requires the use of non-standard fonts you will have to supply those as
well, and the fontmap.GS file which maps them so that Ghostscript can
use them.
Basically I need to be able to reproduce your problem on my system
before I can investigate it.
KenI have opened a bug ticket as you mentioned. The sample files are attached.
Basically I need to be able to reproduce your problem on my system
before I can investigate it.
KenI have opened a bug ticket as you mentioned. The sample files are attached. The bug id is 703481
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 03:54:08 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,325,733 |