RSS/Atom feed Twitter
Site is read-only, email is disabled

Print plugin

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

12 of 12 messages available
Toggle history

Please log in to manage your subscriptions.

Print plugin Stefan Roellin 22 Jul 14:10
  Print plugin D. Stimits 22 Jul 22:43
   Print plugin Sven Neumann 23 Jul 19:37
    Print plugin D. Stimits 24 Jul 02:34
     Print plugin Sven Neumann 24 Jul 08:28
  Print plugin Sven Neumann 23 Jul 19:35
   Print plugin D. Stimits 24 Jul 02:34
   Print plugin Stefan Roellin 24 Jul 16:47
    Print plugin Sven Neumann 24 Jul 19:29
     Print plugin Stefan Roellin 24 Jul 22:07
      Print plugin Alexandre Prokoudine 24 Jul 22:13
       Print plugin Simon Budig 24 Jul 22:16
Stefan Roellin
2007-07-22 14:10:45 UTC (almost 17 years ago)

Print plugin

Hi,

I have submitted a patch which (slightly) improves the quality of the print plugin (see Bug #387604). The problem basically was that Postscript can't cope with transparency. In contrast, PDF is able to do so.

The current implementation/patch now has a disadvantage: if you print to a postscript target, the image has to be exported TWICE: once for the 'print preview widget' (with alpha) and once for the postscript target (without alpha). This is certainly not optimal regarding memory consumption.

So the question is, whether this is a real problem or not.

If yes, a solution could be to not distinguish between a Postscript and a PDF target (i.e. to embed only opaque images into a PDF despite the fact that PDF can handle images with alpha values). In this case, we only have to export the image at most once.

Stefan

D. Stimits
2007-07-22 22:43:05 UTC (almost 17 years ago)

Print plugin

Stefan Roellin wrote:

Hi,

I have submitted a patch which (slightly) improves the quality of the print plugin (see Bug #387604). The problem basically was that Postscript can't cope with transparency. In contrast, PDF is able to do so.

The current implementation/patch now has a disadvantage: if you print to a postscript target, the image has to be exported TWICE: once for the 'print preview widget' (with alpha) and once for the postscript target (without alpha). This is certainly not optimal regarding memory consumption.

So the question is, whether this is a real problem or not.

For me, it is a serious problem. I work in the print industry, typically creating PostScript drivers. The PS output is quite good quality, and every conversion generally suffers serious quality issues. Gimp is one of the best tools available for UNIX side PostScript. Photoshop and some other tools, despite being Adobe products, tend to break standards compliant high end print systems (most of those products work great so long as you don't mix them with other people's products, then they suck...gimp PS works flawlessly with all of the certified systems). As soon as you start making PDF-to-PostScript conversions or PostScript-to-PDF-to-PostScript, the output is hopeless. Don't do it.

If yes, a solution could be to not distinguish between a Postscript and a PDF target (i.e. to embed only opaque images into a PDF despite the fact that PDF can handle images with alpha values). In this case, we only have to export the image at most once.

PDF is pretty much a subset of PostScript with a hierarchy, at least in the basic early versions. When you start getting into more recent versions, it diverges, but still contains mainly a subset of PostScript operators for the vector and bitmap part of it. If you wanted support for PDF, you'd be better off making both PS and PDF output options. It'd be nice to have direct PDF output, but this is a document interchange format, and NOT a print format. There is no reason to not add dual output format, but there is an extrordinary loss of quality by removing direct PostScript output (FYI, I must often slice and dice the raw PostScript, and gimp has the most sane version among the common tools).

FYI, a proper conversion tool can convert from PS to PDF without loss, but virtually all tools have issues, mainly when converting vector to bitmap, or using lossy compression without an option to say no to it. If anyone really felt the need to improve print options, my own feeling from coding for the print industry is that more options on compression formats and font embedding (perhaps not relevant for gimp) would be appropriate.

D. Stimits, stimits AT comcast DOT net

Sven Neumann
2007-07-23 19:35:17 UTC (almost 17 years ago)

Print plugin

Hi,

On Sun, 2007-07-22 at 14:10 +0200, Stefan Roellin wrote:

The current implementation/patch now has a disadvantage: if you print to a postscript target, the image has to be exported TWICE: once for the 'print preview widget' (with alpha) and once for the postscript target (without alpha). This is certainly not optimal regarding memory consumption.

I have attached a patch to the bug report that outlines a way to work around this problem.

If yes, a solution could be to not distinguish between a Postscript and a PDF target (i.e. to embed only opaque images into a PDF despite the fact that PDF can handle images with alpha values).

Would this approach have any disadvantages?

Sven

Sven Neumann
2007-07-23 19:37:29 UTC (almost 17 years ago)

Print plugin

Hi,

On Sun, 2007-07-22 at 14:43 -0600, D. Stimits wrote:

For me, it is a serious problem. I work in the print industry, typically creating PostScript drivers. The PS output is quite good quality, and every conversion generally suffers serious quality issues. Gimp is one of the best tools available for UNIX side PostScript. Photoshop and some other tools, despite being Adobe products, tend to break standards compliant high end print systems (most of those products work great so long as you don't mix them with other people's products, then they suck...gimp PS works flawlessly with all of the certified systems). As soon as you start making PDF-to-PostScript conversions or PostScript-to-PDF-to-PostScript, the output is hopeless. Don't do it.

We are talking about the new Print plug-in here, not about the plug-in that is used to save an image as a Postscript file. So your concerns are probably not valid.

Sven

D. Stimits
2007-07-24 02:34:37 UTC (almost 17 years ago)

Print plugin

Sven Neumann wrote:

Hi,

On Sun, 2007-07-22 at 14:10 +0200, Stefan Roellin wrote:

The current implementation/patch now has a disadvantage: if you print to a postscript target, the image has to be exported TWICE: once for the 'print preview widget' (with alpha) and once for the postscript target (without alpha). This is certainly not optimal regarding memory consumption.

I have attached a patch to the bug report that outlines a way to work around this problem.

If yes, a solution could be to not distinguish between a Postscript and a PDF target (i.e. to embed only opaque images into a PDF despite the fact that PDF can handle images with alpha values).

Would this approach have any disadvantages?

It pretty much doesn't matter what you can do with a PDF target, so long as there is still the ability to directly print as PostScript and save as EPS/PS. Should an image be intended for print, then there would be no harm in dumping alpha and using opaque. Someone may want to actually further edit an image, in which case a PDF losing alpha would be a disadvantage...but PDF is the wrong format for this anyway (most of the PDF editing tools out there are junk, set with features to sell a product that breaks if you mix it with the wrong situation).

The up side to only embedding opaque is easier maintenance, common code set, etc. Quite likely it would result in better reuse of code.

If you want a final answer, you're going to have to know who uses alpha in a PDF which is intended to be in its final form, and not as an intermediate product of editing. Newer PDF formats have a lot of features which barely anyone uses...when they are used, I see it for interactive purpose, not for print.

D. Stimits, stimits AT comcast DOT net

D. Stimits
2007-07-24 02:34:39 UTC (almost 17 years ago)

Print plugin

Sven Neumann wrote:

Hi,

On Sun, 2007-07-22 at 14:43 -0600, D. Stimits wrote:

For me, it is a serious problem. I work in the print industry, typically creating PostScript drivers. The PS output is quite good quality, and every conversion generally suffers serious quality issues. Gimp is one of the best tools available for UNIX side PostScript. Photoshop and some other tools, despite being Adobe products, tend to break standards compliant high end print systems (most of those products work great so long as you don't mix them with other people's products, then they suck...gimp PS works flawlessly with all of the certified systems). As soon as you start making PDF-to-PostScript conversions or PostScript-to-PDF-to-PostScript, the output is hopeless. Don't do it.

We are talking about the new Print plug-in here, not about the plug-in that is used to save an image as a Postscript file. So your concerns are probably not valid.

Yes and no. The PostScript which I have to slice-and-dice is from save as, but all of the printers involved are PostScript printers. Some can handle PDF, others cannot. If I were to print a high res image on a quality printer (definitely not some ink jet from the local store), it'd be rare that any conversion process would leave the quality in tact. The only time exporting a transparency is a problem is if you plan to print on some sort of custom paper that isn't plain white, but then there should be a background color anyway. With an exception that is irrelevant, there are no printers with transparent ink (that exception being in the dye sublimation, but the transparent ink is a coating for longevity, and has no knowledge of any alpha channel). Show me a printer takes advantage of mixing transparent inks, taking advantage of an alpha channel, and I'll agree that there is a reason to not export to a non-transparent color space. On the other hand, every single printer out there which handles PostScript natively (and there is no such thing as a good PCLprinter, even if it emulates PostScript) will suffer by removing direct PostScript output.

I do indeed print directly from gimp without an intermediate step, as proofs and other samples going to a quality PostScript printer are best done from gimp...some of the other products are known to crash printers under some images, gimp never does this, it's the only really stable program for that purpose (all of these printers are Adobe certified, the low end systems start at about $10k, the I-Gen systems range from over $100k on up...which Adobe products tend to crash). Being able to take advantage of a PPD file during print from gimp is very useful, and I print directly from gimp daily. A PDF conversion would ruin this, so I'm in the opposite position by having a real PostScript system.

So I pose this question...if print via PDF is to be considered, why remove the existing PS system, which is pretty much the best quality PostScript among all of the apps (commercial and free)? There isn't any reason to not add a PDF print preference, but PDF language is not intended as a print language, it is a document interchange format, and should not be converted to this format until interchange is needed. A preference could easily be set if both formats are available, but there is a genuine need for real PostScript output in the non-windows world. I don't want to hand craft save-as-eps files for specific hardware every time someone wants a sample print, just so I can keep the image quality. I really don't understand why anyone would want to remove PostScript print options instead of adding PDF to it, especially since much of the PostScript code directly translates to PDF code.

D. Stimits, stimits AT comcast DOT net

Sven Neumann
2007-07-24 08:28:59 UTC (almost 17 years ago)

Print plugin

Hi,

On Mon, 2007-07-23 at 18:34 -0600, D. Stimits wrote:

So I pose this question...if print via PDF is to be considered, why remove the existing PS system, which is pretty much the best quality PostScript among all of the apps (commercial and free)?

We are not removing anything. So far GIMP didn't have a Print plug-in maintained in the GIMP source tree. We are now adding one based on GtkPrint as an option for the users who just want to get an image printed easily.

You can still install the GIMP Print plug-in from the Gutenprint project if you need the features or the suberb print quality that it offers.

Sven

Stefan Roellin
2007-07-24 16:47:56 UTC (almost 17 years ago)

Print plugin

Hi,

On Mon, Jul 23, 2007 at 07:35:17PM +0200, Sven Neumann wrote:

If yes, a solution could be to not distinguish between a Postscript and a PDF target (i.e. to embed only opaque images into a PDF despite the fact that PDF can handle images with alpha values).

Would this approach have any disadvantages?

I think the current implementation of the print plugin is fine, i.e. generate the PDF with opaque images. If someone needs to have a PDF with images with alpha values, it would be possible to write a 'save-as-pdf plugin' similar to the print plugin that uses also gtk_print_* functionality. I think that even layers could be embedded into the PDF. I could (try to) write such a plugin.

So, there the question remains whether someone would use this?

Stefan

Sven Neumann
2007-07-24 19:29:20 UTC (almost 17 years ago)

Print plugin

Hi,

On Tue, 2007-07-24 at 16:47 +0200, Stefan Roellin wrote:

I think the current implementation of the print plugin is fine, i.e. generate the PDF with opaque images. If someone needs to have a PDF with images with alpha values, it would be possible to write a 'save-as-pdf plugin' similar to the print plugin that uses also gtk_print_* functionality. I think that even layers could be embedded into the PDF. I could (try to) write such a plugin.

I wouldn't base this on GtkPrint but directly on Cairo. GtkPrint just adds funtionality to deal with printers, it wouldn't offer any advantage if you are just creating a PDF file.

So, there the question remains whether someone would use this?

Export to PDF has often been requested. It would be particularly interesting if it could contain text layers as PDF text elements. We are missing some additions to the PDB text API to make this possible. But the missing API could be added (after 2.4 of course).

Sven

Stefan Roellin
2007-07-24 22:07:42 UTC (almost 17 years ago)

Print plugin

Hi,

On Tue, Jul 24, 2007 at 07:29:20PM +0200, Sven Neumann wrote:

I think the current implementation of the print plugin is fine, i.e. generate the PDF with opaque images. If someone needs to have a PDF with images with alpha values, it would be possible to write a 'save-as-pdf plugin' similar to the print plugin that uses also gtk_print_* functionality. I think that even layers could be embedded into the PDF. I
could (try to) write such a plugin.

I wouldn't base this on GtkPrint but directly on Cairo. GtkPrint just adds funtionality to deal with printers, it wouldn't offer any advantage if you are just creating a PDF file.

Yes, this would of course also be possible and not too different from a GtkPrint approach. GtkPrint offers dialogs to choose the PageSize etc, which Cairo does not.

Export to PDF has often been requested. It would be particularly interesting if it could contain text layers as PDF text elements. We are missing some additions to the PDB text API to make this possible. But the missing API could be added (after 2.4 of course).

Ok, I will try to implement a plugin based on Cairo, but this will take some time...


Stefan

Alexandre Prokoudine
2007-07-24 22:13:49 UTC (almost 17 years ago)

Print plugin

On 7/25/07, Stefan Roellin wrote:

Yes, this would of course also be possible and not too different from a GtkPrint approach. GtkPrint offers dialogs to choose the PageSize etc, which Cairo does not.

Export to PDF has often been requested. It would be particularly interesting if it could contain text layers as PDF text elements. We are missing some additions to the PDB text API to make this possible. But the missing API could be added (after 2.4 of course).

Ok, I will try to implement a plugin based on Cairo, but this will take some time...

Just two question:

- Will it be possible since GIMP doesn't use Cairo yet? - Will it be color managed?

Alexandre

Simon Budig
2007-07-24 22:16:02 UTC (almost 17 years ago)

Print plugin

Alexandre Prokoudine (alexandre.prokoudine@gmail.com) wrote:

- Will it be possible since GIMP doesn't use Cairo yet?

It does implicitely, since it already depends on a GTK+ version that depends on cairo.

Bye,
Simon