New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Other sites and resources for Inkscape users.
User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Fri Sep 03, 2010 10:33 pm

Hi there!

I'm developing an extension for exporting PDF files with the CMYK colorsystem, using the last version of Uniconvertor.
It's not 100% yet. Text doesn't run so well, just paths. Special effects (blur, filtros...) even so.

http://wiki.softwarelivre.org/InkscapeB ... tarPDFCMYK

If you want to generate a PDF from a Inkscape draw that have objects with special effects, add to the object "ID" the characters "cmyk" (To do that, select the object, click with right button on it, "Object Properties", add the characters "cmyk" on "Id" textbox and click "Apply").
The extension will find the objects that are named with "cmyk" and convert it into CMYK bitmaps.
Due to a technical issue, there isn't the possibility to generate PDFs with CMYK + alpha bitmaps. And it runs only on Linux.

Finally, here is another extension for exporting TIFF in CMYK colorsystem:

http://wiki.softwarelivre.org/InkscapeB ... arTIFFCMYK

Please test and send me feedback.

As a part of the Brazilian Inkscape Users Community, it's in portuguese, but I want to translate it soon.

Thanks very much!
Last edited by jonata on Tue Sep 07, 2010 6:44 am, edited 1 time in total.

User avatar
brynn
Posts: 10203
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby brynn » Sun Sep 05, 2010 4:40 am

WOW!
I'm sorry that I can't test for you, because it's a bit over my head :oops: . But I just wanted give you a shout-out -- THANK YOU!!
We get so, SO many messages here asking for this, so I know that it will be well utilized by many users, when finished. By posting here, others will see it and maybe like to help you with the coding, besides just giving feedback (fingers crossed :P )

Thanks again :D

Guest

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby Guest » Tue Sep 07, 2010 6:43 am

Thanks brynn

As I said, just using and sending me error messages is already helping me. Of course, this is not "the" solution but...
The Brazilian Inkscape mailing list have a lot of messages regarding CMYK too. So, it shows that it's almost a must.

Thanks.

maxim2

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby maxim2 » Tue Sep 07, 2010 9:50 pm

Hi jonata.

In ExportarPDFCMYK
Let's try to replace the "device-cmyk" to "icc-color".
___
sK1project.org

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Wed Sep 08, 2010 11:11 pm

why?

vwanweb
Posts: 169
Joined: Sun Jun 06, 2010 1:48 pm

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby vwanweb » Thu Sep 09, 2010 12:19 am

might be due to the svg spec. reference to icc profiles in a document?
http://www.w3.org/TR/SVG/color.html#Int ... ileElement

maxim2
Posts: 1
Joined: Tue Sep 07, 2010 10:13 pm

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby maxim2 » Thu Sep 09, 2010 1:41 am

jonata wrote:why?


Currently Uniconvertor ignores color profiles of SVG, but the icc-color corresponds to the specification 1.1 and is already supported by inkscape for color in CMYK.
Editing the "ID" would not be necessary.

In the future plan to add option "- forceCMYK"

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby ~suv » Thu Sep 09, 2010 2:40 am

vwanweb wrote:
jonata wrote:
maxim2 wrote:Let's try to replace the "device-cmyk" to "icc-color".
why?
might be due to the svg spec. reference to icc profiles in a document?
http://www.w3.org/TR/SVG/color.html#InterfaceSVGColorProfileElement

Perhaps see also

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Thu Sep 09, 2010 2:49 am

The use of "device-cmyk" is just a trick to uniconvertor generate PDF in CMYK... the generated svg code doesn't need to follow the "specifications", I mean... the user will not see/use the svg, just uniconvertor.

Anyway, I'll test if there is some difference in the final process... my worry is if uniconvertor will consider "icc-color" the same way as "device-cmyk"

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby ~suv » Thu Sep 09, 2010 3:09 am

jonata wrote:The use of "device-cmyk" is just a trick to uniconvertor generate PDF in CMYK... the generated svg code doesn't need to follow the "specifications", I mean... the user will not see/use the svg, just uniconvertor.

I can't comment on UniConvertor and whether it needs to be "tricked"(?).

There are other reasons not to base a workflow on 'device-cmyk' as explained in the previously posted links:
#444021, in the comments:
(…) device-cmyk should almost NEVER be used. First of all, there is not really such a thing as "the generic CMYK color space". By definition CMYK color is very device dependent, and without the context of a specific instance of a specific printer, the numbers themselves are meaningless and dangerous. That is mainly since the exact same numbers are almost guaranteed to create a different output each place they are used.

Someone *needs* to know a specific target for CMYK to be able to use CMYK. (…)

(…) uncalibrated device color should avoided for any normal work. The main expected use case is for someone sending raw data to a printer in order to be able to print swatches to measure and create a printer-specific ICC profile from.

#542346
One first problem is that device CMYK is not the type of CMYK that the average end user should be dealing with. What they actually need is ICC CMYK tagged to some standard/common profile (such as SWOP).

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Thu Sep 09, 2010 3:42 am

I can't comment on UniConvertor and whether it needs to be "tricked"(?).


Uniconvertor doesn't save PDF in CMYK by default, so I need to use this "trick" in SVG code.

There are other reasons not to base a workflow on 'device-cmyk' as explained in the previously posted links:


Please understand me. This is not an extension for producing "SVG in CMYK", it's for producing PDF in CMYK. The extension doesn't apply to the original SVG any kind of "device-cmyk" or "icc-color". This piece of code comes just to Uniconvertor generate the PDF in CMYK, because actually there isn't any other way to have Uniconvertor generating PDF in CMYK, just RGB. Keep in mind: the generated SVG with "device-cmyk" is just a workarround for Uniconvertor while it doesn't have the option to save PDF in CMYK.
Last edited by jonata on Thu Sep 09, 2010 3:50 am, edited 1 time in total.

vwanweb
Posts: 169
Joined: Sun Jun 06, 2010 1:48 pm

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby vwanweb » Thu Sep 09, 2010 3:48 am

just a thought, to make the object id (label) more user friendly, "device pdf2cmyk". The thought is to "remind" the user this is a pdf based operation.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby ~suv » Thu Sep 09, 2010 3:55 am

jonata wrote:Sorry, but I think you didn't get my point. This is not an extension for producing "SVG in CMYK", it's for producing PDF in CMYK.
I did get your point - my point OTOH was questioning the usefulness of producing generic 'CMYK' files without context (like standard/common or printer-specific ICC color profiles to support a color-managed workflow). But I'll leave the discussion to Inkscape users with more experience in "professional prepress work"... ;)

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Thu Sep 09, 2010 4:15 am

Oh... sorry, now I see...

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Thu Sep 09, 2010 9:09 pm

Editing the "ID" would not be necessary.


Editing the ID is just to generate bitmap of certain object. All the other objects are automatically converted in "CMYK"

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Tue Oct 19, 2010 6:09 am

Hi there!

I updated the extensions, they are a bit more fast and with less bugs. For more details, try to read the following pages from InkscapeBrasil.org's wiki:

http://wiki.softwarelivre.org/InkscapeB ... arTIFFCMYK
http://wiki.softwarelivre.org/InkscapeB ... tarPDFCMYK
http://wiki.softwarelivre.org/InkscapeB ... rtarJPGICC
http://wiki.softwarelivre.org/InkscapeB ... rtarPNGICC

The only one of them that doesn't runs on Windows is the no updated version of "TIFF in CMYK". I'm not able to get it working with the windows "shell" version of inkscape - or python is not able to talk with it.

Thank you for the attention, I'm waiting your comments.

borisbastos
Posts: 1
Joined: Thu Oct 28, 2010 12:59 am

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby borisbastos » Thu Oct 28, 2010 1:26 am

hi,

i'm not very technical at this, but i am curious for it to work, because i'm using inkscape and all other free software for my job. Since inkscape doesn't support the export to PDF in CMYK, i'm all in favour of your work done here.

But i need some help. I've gotten as far as installing the 2 scripts into the folder mentioned, and installing Uniconvertor. When i reopen my draw in inkscape i add the characters 'cmyk' to the object properties' ID. I don't know if i need to do this for each object in my draw or on the overall draw? Furthermore i don't quite know what is meant with 'device cmyk' and 'icc color'. When i want to export, i notice there are 2 options to my 'save as' list, namely 'CMYK tiff' and 'CMYK PDF'. When i try the last, i get following error message:

convert: unable to open image `/tmp/separatedbackgroundC.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundC.png' @ png.c/ReadPNGImage/2917.
convert: missing an image filename `/tmp/separatedbackgroundC.png' @ convert.c/ConvertImageCommand/2838.
convert: unable to open image `/tmp/separatedbackgroundM.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundM.png' @ png.c/ReadPNGImage/2917.
convert: missing an image filename `/tmp/separatedbackgroundM.png' @ convert.c/ConvertImageCommand/2838.
convert: unable to open image `/tmp/separatedbackgroundY.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundY.png' @ png.c/ReadPNGImage/2917.
convert: missing an image filename `/tmp/separatedbackgroundY.png' @ convert.c/ConvertImageCommand/2838.
convert: unable to open image `/tmp/separatedbackgroundK.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundK.png' @ png.c/ReadPNGImage/2917.
convert: missing an image filename `/tmp/separatedbackgroundK.png' @ convert.c/ConvertImageCommand/2838.
convert: unable to open image `/tmp/separatedbackgroundC.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundC.png' @ png.c/ReadPNGImage/2917.
convert: unable to open image `/tmp/separatedbackgroundM.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundM.png' @ png.c/ReadPNGImage/2917.
convert: unable to open image `/tmp/separatedbackgroundY.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundY.png' @ png.c/ReadPNGImage/2917.
convert: unable to open image `/tmp/separatedbackgroundK.png': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/separatedbackgroundK.png' @ png.c/ReadPNGImage/2917.
convert: missing an image filename `/tmp/background.jpg' @ convert.c/ConvertImageCommand/2838.
convert: unable to open image `/tmp/background.jpg': Bestand of map bestaat niet @ blob.c/OpenBlob/2480.
convert: missing an image filename `/tmp/background.jpg' @ convert.c/ConvertImageCommand/2838.
Cannot list directory /home/EcoPuur/gebruikers/vanheckebart/.uniconvertor:[Errno 2] No such file or directory: '/home/EcoPuur/gebruikers/vanheckebart/.uniconvertor'
ignoring it in font_path
Cannot list directory /home/EcoPuur/gebruikers/vanheckebart/.uniconvertor:[Errno 2] No such file or directory: '/home/EcoPuur/gebruikers/vanheckebart/.uniconvertor'
ignoring it in font_path
/usr/lib/pymodules/python2.6/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
from popen2 import popen2
No plugin-type information in /usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/__init__.py
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 980, in Load
xml_reader.parse(input_source)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 301, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 338, in startElement
getattr(self, method)(attrs)
File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 837, in begin_path
self.parse_style(style)
File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 384, in parse_style
self.try_add_style(key, val)
File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 401, in try_add_style
color = csscolor(val)
File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 79, in csscolor
color = CreateRGBColor(r, g, b)
UnboundLocalError: local variable 'r' referenced before assignment
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/uniconvertor/__init__.py", line 82, in uniconv
doc = load.load_drawing(input_file)
File "/usr/lib/pymodules/python2.6/uniconvertor/app/io/load.py", line 364, in load_drawing


As i mentioned before, it's all very technical for me, but i'm willing to solve this. Hope by the way that i can help by sending you the errors i get.

Thx
B

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Thu Oct 28, 2010 9:55 pm

The last version of the extensions recognises the layer with ID "background", not "cmyk" as before. Try to name the layer that has special effects with the word "background".

Thanks for using it!

Pander
Posts: 19
Joined: Tue Sep 08, 2009 7:46 pm

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby Pander » Wed Dec 01, 2010 6:34 am

I have installed the extension in Inkscape 0.48.0-1ubuntu1 and tried to save me design with bitmap, text and shapes to CMYK PDF and got the following error. Can this be fixed please? I'm willing to test improved implementation because Inkscape simply has to support at least CMYK exporting.

Code: Select all

convert: unable to open image `/tmp/separatedbackgroundC.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundC.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundC.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundM.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundM.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundM.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundY.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundY.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundY.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundK.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundK.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundK.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundC.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundC.png' @ error/png.c/ReadPNGImage/3072.
convert: unable to open image `/tmp/separatedbackgroundM.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundM.png' @ error/png.c/ReadPNGImage/3072.
convert: unable to open image `/tmp/separatedbackgroundY.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundY.png' @ error/png.c/ReadPNGImage/3072.
convert: unable to open image `/tmp/separatedbackgroundK.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundK.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/background.jpg' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/background.jpg':  @ error/blob.c/OpenBlob/2498.
convert: missing an image filename `/tmp/background.jpg' @ error/convert.c/ConvertImageCommand/2970.
Cannot list directory /home/sander/.uniconvertor:[Errno 2] No such file or directory: '/home/sander/.uniconvertor'
ignoring it in font_path
Cannot list directory /home/sander/.uniconvertor:[Errno 2] No such file or directory: '/home/sander/.uniconvertor'
ignoring it in font_path
/usr/lib/pymodules/python2.6/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  from popen2 import popen2
No plugin-type information in /usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/__init__.py
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 980, in Load
    xml_reader.parse(input_source)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 301, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 338, in startElement
    getattr(self, method)(attrs)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 905, in begin_text
    self.parse_style(style)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 384, in parse_style
    self.try_add_style(key, val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 394, in try_add_style
    color = csscolor(val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 79, in csscolor
    color = CreateRGBColor(r, g, b)
UnboundLocalError: local variable 'r' referenced before assignment
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/uniconvertor/__init__.py", line 82, in uniconv
    doc = load.load_drawing(input_file)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/io/load.py", line 364, in load_drawing
    return load_drawing_from_file(file, filename)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/io/load.py", line 337, in load_drawing_from_file
    doc = loader.Load()
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 980, in Load
    xml_reader.parse(input_source)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 301, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 338, in startElement
    getattr(self, method)(attrs)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 905, in begin_text
    self.parse_style(style)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 384, in parse_style
    self.try_add_style(key, val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 394, in try_add_style
    color = csscolor(val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 79, in csscolor
    color = CreateRGBColor(r, g, b)
UnboundLocalError: local variable 'r' referenced before assignment
Traceback (most recent call last):
  File "export-pdf-cmyk.py", line 217, in <module>
    effect.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 216, in affect
    if output: self.output()
  File "export-pdf-cmyk.py", line 23, in output
    out = open(tempfile.gettempdir() + os.sep + 'final.pdf','rb')
IOError: [Errno 2] No such file or directory: '/tmp/final.pdf'

Pander
Posts: 19
Joined: Tue Sep 08, 2009 7:46 pm

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby Pander » Wed Dec 01, 2010 6:40 am

With only some simple shapes in the same version of Inkscape, I also get:

Code: Select all

convert: unable to open image `/tmp/separatedbackgroundC.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundC.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundC.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundM.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundM.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundM.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundY.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundY.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundY.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundK.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundK.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/separatedbackgroundK.png' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/separatedbackgroundC.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundC.png' @ error/png.c/ReadPNGImage/3072.
convert: unable to open image `/tmp/separatedbackgroundM.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundM.png' @ error/png.c/ReadPNGImage/3072.
convert: unable to open image `/tmp/separatedbackgroundY.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundY.png' @ error/png.c/ReadPNGImage/3072.
convert: unable to open image `/tmp/separatedbackgroundK.png':  @ error/blob.c/OpenBlob/2498.
convert: unable to open file `/tmp/separatedbackgroundK.png' @ error/png.c/ReadPNGImage/3072.
convert: missing an image filename `/tmp/background.jpg' @ error/convert.c/ConvertImageCommand/2970.
convert: unable to open image `/tmp/background.jpg':  @ error/blob.c/OpenBlob/2498.
convert: missing an image filename `/tmp/background.jpg' @ error/convert.c/ConvertImageCommand/2970.
Cannot list directory /home/sander/.uniconvertor:[Errno 2] No such file or directory: '/home/sander/.uniconvertor'
ignoring it in font_path
Cannot list directory /home/sander/.uniconvertor:[Errno 2] No such file or directory: '/home/sander/.uniconvertor'
ignoring it in font_path
/usr/lib/pymodules/python2.6/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  from popen2 import popen2
No plugin-type information in /usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/__init__.py
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 980, in Load
    xml_reader.parse(input_source)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 301, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 338, in startElement
    getattr(self, method)(attrs)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 599, in rect
    self.parse_style(style)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 384, in parse_style
    self.try_add_style(key, val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 394, in try_add_style
    color = csscolor(val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 79, in csscolor
    color = CreateRGBColor(r, g, b)
UnboundLocalError: local variable 'r' referenced before assignment
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/uniconvertor/__init__.py", line 82, in uniconv
    doc = load.load_drawing(input_file)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/io/load.py", line 364, in load_drawing
    return load_drawing_from_file(file, filename)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/io/load.py", line 337, in load_drawing_from_file
    doc = loader.Load()
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 980, in Load
    xml_reader.parse(input_source)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 301, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 338, in startElement
    getattr(self, method)(attrs)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 599, in rect
    self.parse_style(style)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 384, in parse_style
    self.try_add_style(key, val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 394, in try_add_style
    color = csscolor(val)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/svgloader.py", line 79, in csscolor
    color = CreateRGBColor(r, g, b)
UnboundLocalError: local variable 'r' referenced before assignment
Traceback (most recent call last):
  File "export-pdf-cmyk.py", line 217, in <module>
    effect.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 216, in affect
    if output: self.output()
  File "export-pdf-cmyk.py", line 23, in output
    out = open(tempfile.gettempdir() + os.sep + 'final.pdf','rb')
IOError: [Errno 2] No such file or directory: '/tmp/final.pdf'

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in CMYK

Postby jonata » Wed Dec 01, 2010 7:46 pm

Hi Pander

Nice to know you tested the extension.

Did you check the extension to "rasterize" special effects? If so, did you put them to a new layer with the id "background"?

Thanks!

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in C

Postby jonata » Fri Jan 14, 2011 5:20 am

Hi there

I've translated the brazilian wikipage of the extension into english on Inkscape wiki. Here you are:
http://wiki.inkscape.org/wiki/index.php/ExportPDFCMYK

The english is not so good, so I'll check it soon.

Thanks!

User avatar
jonata
Posts: 22
Joined: Fri Jul 27, 2007 12:11 am
Location: Tapejara/RS/Brazil
Contact:

Re: New inkscape extension: Export PDF in CMYK and TIFF in C

Postby jonata » Fri Jun 17, 2011 1:06 pm

Hi there!

Just to say that I updated the extension: no need to put every special graphic on a separate layer.

Thanks!

katsarov
Posts: 1
Joined: Sun Aug 07, 2011 12:35 am

Re: New inkscape extension: Export PDF in CMYK and TIFF in C

Postby katsarov » Sun Aug 07, 2011 12:42 am

jonata wrote:Hi there!


http://wiki.softwarelivre.org/InkscapeB ... tarPDFCMYK
http://wiki.softwarelivre.org/InkscapeB ... arTIFFCMYK

Please test and send me feedback.

As a part of the Brazilian Inkscape Users Community, it's in portuguese, but I want to translate it soon.

Thanks very much!


Hi, guys,

here is a simple icc-color support patch:

http://home.katsarov.org/export-tiff-cmyk.patch

Regards,
Katsarov

tjindy
Posts: 9
Joined: Wed Sep 22, 2010 8:07 pm

Re: New inkscape extension: Export PDF in CMYK and TIFF in C

Postby tjindy » Tue Sep 13, 2011 5:15 pm

Is someone tested it on Windows ?
Trying with Uniconvertor 1.1.5 but got nothing on save as PDF CMYK...


Return to “Inkscape Resources”

Who is online

Users browsing this forum: No registered users and 2 guests