#1 2019-03-14 19:30:54

EvaF
Member
Registered: 2014-07-19
Posts: 40

Texture brushes in PDF

In my project I have to generate and include into pdf many pictures (from ten to hundred - depends on customer design) and the pictures have to be very readable and illustrative and of course the smallest as possible. Therefore I use texture brush for drawing them. (f.e. brush n x 1 pixels).The drawing picture is stored as metafile (.wmf), that can be rendered into pdf. But a recognization of texture brush bitmap from metafile is difficult and time/memory consuming because rounding color leads to similiar (but not equal) bitmaps.
Therefore I decided to such step: instead of real texture brush to use dummy brush of 1x1 pixel(to minimalize wmf metafile itself) and add into GDI comments information about bitmap, that will be used as texture brush for filling shapes right in pdf
Pdf has the tools for texture/pattern brush - there are Pattern and XObject/Form
Because I need primarily to render metafiles into pdf, I have prepared the option to read info about texture brushes from metafile and write into pdf  the filling the shapes by texture brushes by efficient way.

more at:
https://github.com/Eva-F/SynPDF/tree/Ev … re-pattern

examples at
https://github.com/Eva-F/SynPDF/tree/Ev … /documents

Offline

#2 2019-03-15 08:56:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Texture brushes in PDF

Very nice.

I guess this is a somewhat specific need, but I will add a link to your repository.

Offline

Board footer

Powered by FluxBB