[Bf-committers] GPencil I/O Project: Request to integrate libharu lib to export PDF format

Antonio Vazquez blendergit at gmail.com
Wed Dec 9 22:07:27 CET 2020


I don't know Cairo lib and how to manage PDF, but looking at the features
and uses of Cairo, for grease pencil requirements is like using a
sledgehammer to crack a nut!

Anyway, if this is the way to go we could try.

Antonio


El mié, 9 dic 2020 a las 20:53, Ray Molenkamp via Bf-committers (<
bf-committers at blender.org>) escribió:

> I can't say I'm super thrilled to build cairo on windows,
> but if that's the direction we want to go, so be it.
>
> --Ray
>
>
> On 2020-12-09 11:19 a.m., Brecht Van Lommel via Bf-committers wrote:
> > I'm not sure there exists a simple utility to convert SVG to PDF that we
> > could include, if we want to go that way?
> >
> > Inkscape uses Cairo for PDF writing, that could be a more actively
> > maintained alternative.
> > https://www.cairographics.org/
> >
> > It has also been proposed to be added to handle Wayland window
> decorations
> > in D7989, so it would let us solve both problems with one library.
> >
> >
> > On Wed, Dec 9, 2020 at 11:46 AM Antonio Vazquez via Bf-committers <
> > bf-committers at blender.org> wrote:
> >
> >> There are several reasons why I decided to use libharu.
> >>
> >> * The PDF format is very stable and does not change substantially, so we
> >> are not at great risk due to format changes.
> >> * I already know that this library is not maintained, but since the PDF
> >> format does not change, it does not require much maintenance.
> >> * This library is widely used in other software to generate PDF, so it
> is
> >> well proven.
> >>
> >> Regarding the bugs you comment, I have seen that several have a patch to
> >> solve them, but in any case, the use I make of the library does not
> include
> >> using images, only a very simple use. I do not expect, in the short or
> >> medium term, to use anything related to appending images, so these bugs
> do
> >> not affect us at all. Attaching images to a PDF does not make much
> sense in
> >> our case.
> >>
> >> Including a converter from SVG could work, but the problem is that in
> PDF
> >> we can generate a document with several pages and in SVG I have not seen
> >> that this is supported. Imagine that we want to generate a storyboard
> with
> >> 100 frames ... we would need to export 100 SVG and join them later ...
> now
> >> that is very simple. We would also have to assess the speed of the
> >> conversion, since now it is all C / C ++ and it is very fast.
> >>
> >> The other option I have been considering is to fork libharu and create a
> >> tiny version with the functions we need and remove any appended image
> >> support.
> >>
> >> Antonio
> >>
> >> El mié, 9 dic 2020 a las 0:46, Campbell Barton via Bf-committers (<
> >> bf-committers at blender.org>) escribió:
> >>
> >>> Hi Antonion,
> >>>
> >>> From what I can tell libharu hasn't been very active since 2013, their
> >>> site states they're looking for a new maintainer.
> >>> Would we become the defacto maintainers of this library?
> >>>
> >>> I checked their issue tracker, while many reports are support requests
> >>> and build issues, there are some more serious looking issues too, eg:
> >>>
> >>> https://github.com/libharu/libharu/issues/73
> >>> https://github.com/libharu/libharu/issues/71
> >>> https://github.com/libharu/libharu/issues/63
> >>>
> >>> Is there a significant advantage in integrating a library compared
> >>> with bundling a utility that converts SVG to PDF?
> >>> In this case it could be an optional dependency, or we bundle the
> >>> conversion tool in official releases so PDF support is still
> >>> integrated from a user perspective.
> >>>
> >>> On Wed, Dec 9, 2020 at 6:31 AM Antonio Vazquez via Bf-committers
> >>> <bf-committers at blender.org> wrote:
> >>>> Hi All,
> >>>>
> >>>>
> >>>>
> >>>> As some of you may already know, for version 2.92 we want to focus on
> >> the
> >>>> Import and Export processes of Grease Pencil (T83190).
> >>>>
> >>>>
> >>>>
> >>>> Currently, the grease pencil is in some way an "island" in the studios
> >>>> pipeline and we need to add tools to integrate it. Part of these
> >>>> integration processes were the work we did to make image traces (2.91)
> >>> and
> >>>> shortly, video traces (2.92).
> >>>>
> >>>>
> >>>>
> >>>> During the contacts that the members of grease pencil team usually
> have
> >>>> with 2D studios, they have detected that some commercial software very
> >>>> important in the studios pipeline does not support the import of SVG,
> >> but
> >>>> of PDF. In addition, the PDF format allows working in many softwares
> >> and
> >>> is
> >>>> very useful for generating storyboards and work in comics.
> >>>>
> >>>>
> >>>>
> >>>> Past weeks, I have been working on a new I/O module for grease pencil
> >> in
> >>> C
> >>>> ++ and I already have the SVG Importer (T79875) and the SVG Exporter
> >>>> (T83191) and PDF Exporter (T83192) working. All work has been done on
> a
> >>>> private branch on my PC.
> >>>>
> >>>>
> >>>>
> >>>> You can see a PDF exporter video here: https://youtu.be/BMm0KeMJsI4
> >>>>
> >>>>
> >>>>
> >>>> To export to PDF I have used an open source library (libharu
> >>>> http://libharu.org/) and would need to integrate that library into
> >>> Blender.
> >>>> This library is very simple (<1.6 MB on Windows) and allows export to
> >> PDF
> >>>> easily.
> >>>>
> >>>>
> >>>>
> >>>> Finally, exporting to PDF opens up a world of possibilities and
> >>> especially
> >>>> when the new LineArt module will be integrated into Blender.
> >>>>
> >>>>
> >>>>
> >>>> If we agree to integrate libharu, I can prepare the patch for review
> >> the
> >>>> I/O code I did.
> >>>>
> >>>>
> >>>>
> >>>> I would like to hear your opinions.
> >>>>
> >>>>
> >>>>
> >>>> Best Regards,
> >>>>
> >>>> Antonio Vázquez
> >>>>
> >>>> Grease Pencil Team
> >>>> _______________________________________________
> >>>> Bf-committers mailing list
> >>>> Bf-committers at blender.org
> >>>> https://lists.blender.org/mailman/listinfo/bf-committers
> >>>
> >>>
> >>> --
> >>> - Campbell
> >>> _______________________________________________
> >>> Bf-committers mailing list
> >>> Bf-committers at blender.org
> >>> https://lists.blender.org/mailman/listinfo/bf-committers
> >>>
> >> _______________________________________________
> >> Bf-committers mailing list
> >> Bf-committers at blender.org
> >> https://lists.blender.org/mailman/listinfo/bf-committers
> >>
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > https://lists.blender.org/mailman/listinfo/bf-committers
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list