[Printing-japan] Fixed packages of the CUPS PDF filters

Till Kamppeter till.kamppeter @ gmail.com
2008年 8月 7日 (木) 08:52:43 PDT


Koji Otani wrote:
> This patch is not wrong, but it is insufficent.
> When you compile pdftopdf with old version poppler, you have problems.
> 
> I attached a better patch to this mail.
>

I have applied your patch and it works great. Please apply it to the SVN 
repository of the filter.

I have found some other issues:

1. The compilation of pdftopdf produces tons of warnings

deprecated conversion from string constant to 'char*

Seems that some variables declared as "char *" need to be declared as 
"const char *". I have used gcc 4.3.1 on Ubuntu Intrepid 32-bit

For now it does not break things, but it makes it more difficult to find 
errors in the compilation and in the future it can happen that these 
warnings will get errors.

2. To build imagetopdf I have to use 'make imagetopdf_CFLAGS=""', as the 
default imagetopdf_CFLAGS are supplying the compiler line option 
"-Werror" which turns warnings into errors.

I get the following warning (with gcc 4.3.1):

-------------------------------------------------------------------------
gcc -DHAVE_CONFIG_H -I.     -g -O2 -g -Wall -O2 -I/tmp/buildd/cups-1.3.8 
-MT ima
getopdf-imagetopdf.o -MD -MP -MF .deps/imagetopdf-imagetopdf.Tpo -c -o 
imagetopd
f-imagetopdf.o `test -f 'imagetopdf.c' || echo './'`imagetopdf.c
imagetopdf.c: In function 'main':
imagetopdf.c:683: warning: ignoring return value of 'write', declared 
with attribute warn_unused_result
-------------------------------------------------------------------------

3. I have also tried to actually print through the new filters. To force 
a job through pdftopdf one needs a driver which accepts PDF input. So I 
have set up a queue with Gutenprint (Raster driver, data can come 
through pdftoraster) and printed a PDF file:

lpr -P gutenprint /home/till/walking-map-portland-1.pdf

Doing this on a box without your filters I get a perfect printout and 
the filter chain

pdftops -> pstops -> pstoraster -> rastertogutenprint

is used.

With your filters the page is slightly shifted to the right and to the 
bottom (~5 mm in each direction) and due to the shift to the right a 
small part of the page gets lost on the right. I do not know whether 
pdftopdf or pdftoraster is the culprit. It is for sure not 
rastertogutenprint as it works perfectly with the PostScript workflow. I 
am using A4 paper and have set A4 as page size, but the problem occurs 
as well with Letter chosen as page size.

    Till


Printing-japan メーリングリストの案内