Hi,
I've just checked in a few more "fixes" to Cairo PDF, PS, and, PNG output. Clipping and masking now work at least at a basic level. Let me know if you find any problems. Note, evince may not display an object using an image as a mask but acroread will.
I know of a few more problems with Cairo output:
1. First and last points of closed paths aren't joined properly. At least in the PS output, the last point is doubled and there is no closepath.
2. Clipping path output twice in PS (maybe PDF too). The second time it is unused.
3. Patterns don't always display correctly in PNG output.
Any other problems people know about?
Tav
On Sun, Sep 14, 2008 at 9:14 AM, Tavmjong Bah <tavmjong@...8...> wrote:
- First and last points of closed paths aren't joined properly. At
least in the PS output, the last point is doubled and there is no closepath.
known problem, see the comment in inkscape-cairo.cpp, we're waiting for cairo to provide a new function to fix this
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of Tavmjong Bah Sent: zondag 14 september 2008 15:14
I know of a few more problems with Cairo output:
- First and last points of closed paths aren't joined
properly. At least in the PS output, the last point is doubled and there is no closepath.
- Clipping path output twice in PS (maybe PDF too). The
second time it is unused.
Patterns don't always display correctly in PNG output.
Any other problems people know about?
When exporting the attached svg to pdf, the pattern is shifted.
-johan
Exports correctly from mine now as well Johan. Looks like Tavmjong fixed it :)
2008/9/14 Tavmjong Bah <tavmjong@...8...>
On Sun, 2008-09-14 at 18:58 +0200, J.B.C.Engelen@...1578... wrote:
When exporting the attached svg to pdf, the pattern is shifted.
-johan
Looks correct to me when I do the export... see attached PDF.
Tav
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Hi,
sorry for the late reply. It works indeed, thanks a bunch!
Johan
________________________________
From: john cliff [mailto:john.cliff@...400...] Sent: zondag 14 september 2008 22:52 To: Tavmjong Bah Cc: Engelen, J.B.C. (Johan); inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Cairo PDF, PS, and PNG output. Exports correctly from mine now as well Johan. Looks like Tavmjong fixed it :) 2008/9/14 Tavmjong Bah <tavmjong@...8...>
On Sun, 2008-09-14 at 18:58 +0200, J.B.C.Engelen@...1578... wrote: > > When exporting the attached svg to pdf, the pattern is shifted. > > -johan Looks correct to me when I do the export... see attached PDF. Tav ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Hi, I tried to export the attached svg to pdf and some elements are missing (the circled numbers). I tried with both 0.46 and trunk (rev 19967). i don't think they use any filter effect, they just are semi-transparent. g
On Tue, Sep 30, 2008 at 8:56 AM, <J.B.C.Engelen@...1578...> wrote:
Hi,
sorry for the late reply. It works indeed, thanks a bunch!
Johan
From: john cliff [mailto:john.cliff@...400...] Sent: zondag 14 september 2008 22:52 To: Tavmjong Bah Cc: Engelen, J.B.C. (Johan); inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Cairo PDF, PS, and PNG output.
Exports correctly from mine now as well Johan. Looks like Tavmjong fixed it :)
2008/9/14 Tavmjong Bah <tavmjong@...8...>
On Sun, 2008-09-14 at 18:58 +0200, J.B.C.Engelen@...1578... wrote:
When exporting the attached svg to pdf, the pattern is shifted.
-johan
Looks correct to me when I do the export... see attached PDF.
Tav
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Sun, 2008-10-05 at 19:56 -0400, Guillaume Pothier wrote:
Hi, I tried to export the attached svg to pdf and some elements are missing (the circled numbers). I tried with both 0.46 and trunk (rev 19967). i don't think they use any filter effect, they just are semi-transparent. g
I don't see the problem. A PDF file made with latest trunk on Linux is attached.
Tav
Hmm funny, part the problem seems to be with kpdf/okular then, as I can indeed see the circled numbers in acroread. However, the generated pdf is very slow to open, both with kpdf and acroread. In the former the whole page takes about 7 seconds to get (incorrectly) rendered. In the latter I can see the circled numbers appearing one after another, like two elements per second; it takes about 5s to render the whole page. I imported the generated pdf back into inkscape, and it seems the structure just isn't right. There is an awful lot of nested groups that contain only one leaf element. Many of those are paths filled with a pattern, it seems those patterns are the circled numbers. It seems the main image is also a pattern-filled path with some clipping. There are also a lot of clip paths and masks being used. If the structure of the imported svg reflects the structure of the pdf, then I'm not surprised rendering is so slow and the pdf is so big. Any idea why is this rather simple svg transformed into such a complex pdf? Cheers, g
On Mon, Oct 6, 2008 at 4:26 AM, Tavmjong Bah <tavmjong@...8...> wrote:
On Sun, 2008-10-05 at 19:56 -0400, Guillaume Pothier wrote:
Hi, I tried to export the attached svg to pdf and some elements are missing (the circled numbers). I tried with both 0.46 and trunk (rev 19967). i don't think they use any filter effect, they just are semi-transparent. g
I don't see the problem. A PDF file made with latest trunk on Linux is attached.
Tav
On Mon, Oct 6, 2008 at 12:27 PM, Guillaume Pothier <gpothier@...400...> wrote:
Hmm funny, part the problem seems to be with kpdf/okular then, as I can indeed see the circled numbers in acroread. However, the generated pdf is very slow to open, both with kpdf and acroread. In the former the whole page takes about 7 seconds to get (incorrectly) rendered. In the latter I can see the circled numbers appearing one after another, like two elements per second; it takes about 5s to render the whole page.
Most likely because cairo had to rasterize some parts of image that cannot be in PDF.
I imported the generated pdf back into inkscape, and it seems the structure just isn't right. There is an awful lot of nested groups that contain only one leaf element. Many of those are paths filled with a pattern, it seems those patterns are the circled numbers. It seems the main image is also a pattern-filled path with some clipping. There are also a lot of clip paths and masks being used. If the structure of the imported svg reflects the structure of the pdf, then I'm not surprised rendering is so slow and the pdf is so big. Any idea why is this rather simple svg transformed into such a complex pdf?
The structure of the output PDF is the responsibility of cairo. Inkscape feeds it the document without changing its structure in any way, just converting SVG objects to cairo calls. Everything else (such turning things to patterns) is cairo business; I don't know the reason but there should be some reason I guess. You may want to ask on the cairo list.
Most likely because cairo had to rasterize some parts of image that cannot be in PDF.
It doesn't seem that anything beyond the original bitmap image was rasterized, just placed into patterns.
The structure of the output PDF is the responsibility of cairo.
Ok, I'll rebuild inkscape with a more recent version of cairo, and if the problem persists I'll see with the cairo guys. Thanks for the explanations! g
Guillaume Pothier wrote:
Hmm funny, part the problem seems to be with kpdf/okular then, as I can indeed see the circled numbers in acroread.
Generally when you are having issues with a PDF file is is best to check it with acroread. Many PDF viewers do not have complete support for everything in the PDF Reference.
However, the generated pdf is very slow to open, both with kpdf and acroread. In the former the whole page takes about 7 seconds to get (incorrectly) rendered. In the latter I can see the circled numbers appearing one after another, like two elements per second; it takes about 5s to render the whole page.
What is happening here is you are drawing circles with a fill and stroke and an opacity of 86%. To achieve this effect in cairo requires drawing the fill and stroke in a group then painting the group through a mask with alpha = 86%. In the PDF file there is a group for the fill and stroke of the circle that is painted through a soft mask containing a solid fill with alpha = 86%.
The reason for the slow rendering is that currently cairo creates this group and smask with the size of the page. The problem for PDF viewers is that they need to render the fill and stroke to an image the size of the page then composite the image though an smask the size of the page. Obviously this is not ideal. Cairo should create groups with the exact size of the group. This is something I intend to fix.
I imported the generated pdf back into inkscape, and it seems the structure just isn't right. There is an awful lot of nested groups that contain only one leaf element. Many of those are paths filled with a pattern, it seems those patterns are the circled numbers. It seems the main image is also a pattern-filled path with some clipping.
The PDF structure that cairo writes is not optimized for importing. This is something that I intend to fix. I have previously focussed on eliminating unnecessary rasterization in the cairo PDF output. Now that work is complete I can do more to optimize the PDF output.
On Tue, Oct 7, 2008 at 6:02 AM, Adrian Johnson <ajohnson@...1679...> wrote:
The PDF structure that cairo writes is not optimized for importing. This is something that I intend to fix. I have previously focussed on eliminating unnecessary rasterization in the cairo PDF output. Now that work is complete I can do more to optimize the PDF output.
Thanks Adrian now I understand the issue much better! Please keep us posted when you have some progress on this front! Cheers, g
participants (6)
-
unknown@example.com
-
Adrian Johnson
-
bulia byak
-
Guillaume Pothier
-
john cliff
-
Tavmjong Bah