Gimp-Forum.net
xcf to pdf - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: xcf to pdf (/Thread-xcf-to-pdf)



xcf to pdf - tanda - 03-23-2017

Hello, 
somebody did a poster for me in GIMP and we need to print it both in format A3 and A4. I usually export the file in ps by setting the X offset and the Y offset to 0, then use ps2pdf (if needed with the option -sPAPERSIZE=a3) to produce a pdf file. The X offset=0 and Y offset=0 were to eliminate a white border all around the ps file, but it does not seem to work, as in fact the ps file does contain a white border on top. 

I really do not care about the intermediate ps file, as all I want is a pdf that can be printed both in A3 and in A4. Can you help me, please? You might have noticed that I am really a rookie trying to get by... Thanks.


RE: xcf to pdf - rich2005 - 03-23-2017

Welcome to gimp-forum.net

Problem - not many (any) OSX users here. However

What pixel dimensions is the poster in Gimp? Are they 'A' proportions 1: root(2)? The standard Gimp A3 template @ 300 ppi is 3508 x 4960 pix. If the height is a bit off then that would account for a border at the top. A quick test and that is what happens here in linux.

An alternative to ps2pdf might be ImageMagick. The Gimp file is bitmap anyway so export to png. This would produce a PDF to size

Code:
convert A3.png  -compress jpeg -resize 3508x4960 -units PixelsPerInch -density 150x150 poster.pdf

or whatever ppi value you desire. That will stretch the image and eliminate the 'border'


RE: xcf to pdf - tanda - 03-24-2017

I think it is 1536x2048.  Actually it turns out that, when I print the file, the border is always all the way around.  I tried to export to png, and print this directly or convert as you suggested and then print, but the result was the same.  I spoke with the person who prepared the poster and I know she has been working on the issue, but it is still not resolved.
Do you think that in linux it would be different?  If so, I will try as soon as I am back in my office on Monday.


RE: xcf to pdf - rich2005 - 03-24-2017

(03-24-2017, 09:08 AM)tanda Wrote: I think it is 1536x2048.  ...snip...
Do you think that in linux it would be different?  If so, I will try as soon as I am back in my office on Monday.

Different in linux than OSX, doubt it.

I certainly think the image proportions are off for A3. Without more details of your image difficult to determine where that pixel size for A3 came from. You can find canvas size the top of the Gimp window.

The metric size for A3 is 297 mm x 420 mm 
Creating a new canvas in Gimp closest to your image of 1536 x 2048 pix  comes up with  1450 x 2050 pix @ 124 ppi. There are of course rounding errors involved but even so, the width of your image is well out for A3.

Trying to get some meaningful screenshots and failing 
This one making a A3 canvas and the export to .ps parameters I used.

[attachment=406]

This does convert to a correct PDF in linux. This using ps2pdf and opened in Evince to view and show the pdf properties.

[attachment=407]

Edit:
First, ask the originator if a bleed margin (3 mm on all sides) and any provision for a printing company crop are used.
Regardless of that, another look using Gimp.

This is what gives me an A3 PDF using your canvas 1536 x 2048 pix

Open the image in Gimp and in Image -> Print Size (1) Change the height to 420 mm the other values should change to values as shown (2).

[attachment=408]

Now go and export as something.ps, mm units, zero offsets. Untick keep aspect ratio(3), set the width and height to A3 size 297 x 420 mm (4)

[attachment=409]

Run the resulting file through ps2pdf 
Code:
ps2pdf -sPAPERSIZE=a3 in-file.ps out-file.pdf

If you want to check the PDF in Gimp open the PDF (not sure if the OSX Gimp supports opening a PDF). The default ppi is always 100 so use say 124 ppi  and you should get close to the original pixel size, A3-size proportions and no white borders.


RE: xcf to pdf - tanda - 03-26-2017

I changed the parameters while exporting to ps but did not have any effect. And I know too little about gimp to be able to tamper with the original file.
But I doubt that the A3 format is the problem, as the white border appears already in the ps file, even before starting to think about printing. If I print the ps file on A4 the white border is there anyway.

Could I perhaps send you the file?


RE: xcf to pdf - rich2005 - 03-26-2017

(03-26-2017, 08:28 AM)tanda Wrote: Could I perhaps send you the file?

Certainly. Assuming it is too large for the forum.

If you can use dropbox or similar and post a link.

If you do not want it to be public you can PM (personal message) the link. If you can post it on the forum you will get more than my opinion and more is better.


RE: xcf to pdf - rich2005 - 03-26-2017

Thanks for the .xcf, Nothing controversial in the poster and I understand your wish to respect the artists rights.

Keeping the topic open, maybe more ideas coming or it might assist in the future. 

I still think you need to ask the artist why the 1536 x 2048 pix @ 132 ppi dimensions. Which is not 'A' proportions

From that, exporting in Gimp to postscript I do get a one pixel white line at the very top. I put some index marks in the corner and you see that carries through to the pdf. (1) Is that a problem? If you send to a printer, bleed area takes care of that.

[attachment=418]

If you want no borders then try.  Scale the image to 1546 x 2186, export to ps, accept the slightly oversize dimentions. You lose a pixel-and-a-half at the top (2) but there is no border and of course the original image is not exactly the same proportions.

[attachment=419]

I do remember posts in the past where ghostscript/pdf was very sensitive to pixel sizes, typically putting a border on the left of A4 pdf's.


RE: xcf to pdf - tanda - 03-26-2017

Thanks, I will try. Could it be that she is using the proportions for the Letter size paper?


RE: xcf to pdf - rich2005 - 03-26-2017

(03-26-2017, 02:36 PM)tanda Wrote: Thanks, I will try.  Could it be that she is using the proportions for the Letter size paper?

The size is certainly closer to US letter than metric, but there will be some considerations for printing.

[attachment=420]

Next question - how to convert to CMYK Wink