ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Huge PDFs
@ 2011-12-29 14:46 Jan Heinen
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Heinen @ 2011-12-29 14:46 UTC (permalink / raw)
  To: ntg-context

>  pdf ->  pdftops ->ps ->ghostscript ->pdf
>  seems to be more robust and gives better results
>  -- 
>  luigi

I will give it a try:
Can you tell me the commands with all the parameters I need ?

Regards
Jannis

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Huge PDFs
  2011-12-29 18:44           ` Jan Heinen
@ 2011-12-29 18:47             ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2011-12-29 18:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jan Heinen

On 29-12-2011 19:44, Jan Heinen wrote:
> I found another way to compress PDFs: The ConText-command
>
> \pdfcompresslevel=9
>
> qpdf and ghostwriter also helped.

use \maximumpdfcompression instead if the low level \pdf* command


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Huge PDFs
  2011-12-29 16:57         ` luigi scarso
@ 2011-12-29 18:44           ` Jan Heinen
  2011-12-29 18:47             ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Heinen @ 2011-12-29 18:44 UTC (permalink / raw)
  To: ntg-context

I found another way to compress PDFs: The ConText-command

\pdfcompresslevel=9

qpdf and ghostwriter also helped.

Thanx
Jannis
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Huge PDFs
  2011-12-29 16:34       ` Jan Heinen
@ 2011-12-29 16:57         ` luigi scarso
  2011-12-29 18:44           ` Jan Heinen
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2011-12-29 16:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Dec 29, 2011 at 5:34 PM, Jan Heinen <JaHeinen@gmx.de> wrote:
>>  pdf ->  pdftops ->ps ->ghostscript ->pdf
>>  seems to be more robust and gives better results
>>  --
>>  luigi
>
> I will give it a try:
> Can you tell me the commands with all the parameters I need ?
>
>
> I have tried the following:
>
> #!/bin/sh
> suffix="_opt.pdf"
> pdftops -paper match -level3 $1.pdf tmp.ps
> gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook
> -dColorConversionStrategy=/LeaveColorUnchanged -dBATCH -dNOPAUSE
> -sOutputFile=$1.pdf$suffix tmp.ps
> rm tmp.ps
>
>
> But in some cases the PDF-files got bigger instead of smaller.
Yes this also my experience.
I suppose that gs acts only on images, not streams compression
You can try qpdf
http://qpdf.sourceforge.net
see 3.4. Advanced Transformation Options
http://qpdf.sourceforge.net/files/qpdf-manual.html#ref.advanced-transformation

-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Huge PDFs
  2011-12-29 13:32     ` luigi scarso
@ 2011-12-29 16:34       ` Jan Heinen
  2011-12-29 16:57         ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Heinen @ 2011-12-29 16:34 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 547 bytes --]

>/   pdf ->   pdftops ->ps ->ghostscript ->pdf
/>/   seems to be more robust and gives better results
/>/   -- 
/>/   luigi
/
I will give it a try:
Can you tell me the commands with all the parameters I need ?


I have tried the following:

#!/bin/sh
suffix="_opt.pdf"
pdftops -paper match -level3 $1.pdf tmp.ps
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dColorConversionStrategy=/LeaveColorUnchanged -dBATCH -dNOPAUSE -sOutputFile=$1.pdf$suffix tmp.ps
rm tmp.ps


But in some cases the PDF-files got bigger instead of smaller.


Regards
Jannis



[-- Attachment #1.2: Type: text/html, Size: 824 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Huge PDFs
  2011-12-29 13:19   ` Hans Hagen
@ 2011-12-29 13:32     ` luigi scarso
  2011-12-29 16:34       ` Jan Heinen
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2011-12-29 13:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Dec 29, 2011 at 2:19 PM, Hans Hagen <pragma@wxs.nl> wrote:
> On 29-12-2011 13:45, luigi scarso wrote:
>>
>> On Thu, Dec 29, 2011 at 12:16 PM, Jan Heinen<JaHeinen@gmx.de>  wrote:
>>>
>>> Hello,
>>>
>>> lots of my images are huge 200x250mm. I reduce their size with:
>>> \externalfigure[cow][width=20mm, heigth=25mm]
>>>
>>> After generating the PDF, the pdf is very huge.
>>>
>>> 1. Can't Context put the reduced image into the PDF?
>>> 2. How can I generate one PDF version for printing (300dpi) and one for
>>> the
>>> screen (72dpi)?
>>>
>>> I am using Context mk-IV.
>>
>> no, you need something like ghostscript.
>> In this case (if you have not problems of space and time) it's better
>> to transform the pdf in ps with
>>  pdftops yourfile.pdf
>> and then apply ghostscript to the final ps (see the documentation
>> about ghostscript)
>
>
> ghostscript can do that directly with the pdf (no need to go through ps)
>
> (also see:
> http://article.gmane.org/gmane.comp.tex.context/71919/match=lowres)
yes, but latest ghostscript (ver. 9)  sometimes fail when used
directly with pdf.
pdf -> pdftops ->ps ->ghostscript ->pdf seems to be more robust and
gives better results
(although space and time consuming).



-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Huge PDFs
  2011-12-29 12:45 ` luigi scarso
@ 2011-12-29 13:19   ` Hans Hagen
  2011-12-29 13:32     ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2011-12-29 13:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 29-12-2011 13:45, luigi scarso wrote:
> On Thu, Dec 29, 2011 at 12:16 PM, Jan Heinen<JaHeinen@gmx.de>  wrote:
>> Hello,
>>
>> lots of my images are huge 200x250mm. I reduce their size with:
>> \externalfigure[cow][width=20mm, heigth=25mm]
>>
>> After generating the PDF, the pdf is very huge.
>>
>> 1. Can't Context put the reduced image into the PDF?
>> 2. How can I generate one PDF version for printing (300dpi) and one for the
>> screen (72dpi)?
>>
>> I am using Context mk-IV.
> no, you need something like ghostscript.
> In this case (if you have not problems of space and time) it's better
> to transform the pdf in ps with
>   pdftops yourfile.pdf
> and then apply ghostscript to the final ps (see the documentation
> about ghostscript)

ghostscript can do that directly with the pdf (no need to go through ps)

(also see: 
http://article.gmane.org/gmane.comp.tex.context/71919/match=lowres)


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Huge PDFs
  2011-12-29 11:16 Jan Heinen
@ 2011-12-29 12:45 ` luigi scarso
  2011-12-29 13:19   ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2011-12-29 12:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Dec 29, 2011 at 12:16 PM, Jan Heinen <JaHeinen@gmx.de> wrote:
> Hello,
>
> lots of my images are huge 200x250mm. I reduce their size with:
> \externalfigure[cow][width=20mm, heigth=25mm]
>
> After generating the PDF, the pdf is very huge.
>
> 1. Can't Context put the reduced image into the PDF?
> 2. How can I generate one PDF version for printing (300dpi) and one for the
> screen (72dpi)?
>
> I am using Context mk-IV.
no, you need something like ghostscript.
In this case (if you have not problems of space and time) it's better
to transform the pdf in ps with
 pdftops yourfile.pdf
and then apply ghostscript to the final ps (see the documentation
about ghostscript)


-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Huge PDFs
@ 2011-12-29 11:16 Jan Heinen
  2011-12-29 12:45 ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Heinen @ 2011-12-29 11:16 UTC (permalink / raw)
  To: ntg-context

Hello,

lots of my images are huge 200x250mm. I reduce their size with:
\externalfigure[cow][width=20mm, heigth=25mm]

After generating the PDF, the pdf is very huge.

1. Can't Context put the reduced image into the PDF?
2. How can I generate one PDF version for printing (300dpi) 
and one for the screen (72dpi)?

I am using Context mk-IV.

Regards
Jannis

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-12-29 18:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-29 14:46 Huge PDFs Jan Heinen
  -- strict thread matches above, loose matches on Subject: below --
2011-12-29 11:16 Jan Heinen
2011-12-29 12:45 ` luigi scarso
2011-12-29 13:19   ` Hans Hagen
2011-12-29 13:32     ` luigi scarso
2011-12-29 16:34       ` Jan Heinen
2011-12-29 16:57         ` luigi scarso
2011-12-29 18:44           ` Jan Heinen
2011-12-29 18:47             ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).