Create a PDF with an area filled with a raster pattern

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
gabuliatko
In need of some credit
In need of some credit
Posts: 9
Joined: Wed Sep 02, 2020 3:57 pm

Re: Create a PDF with an area filled with a raster pattern

Post by gabuliatko »

utelle wrote: Sun Sep 06, 2020 9:18 pm However, you only talked about adding partial extracts from EMF files to a PDF document. This goal seems to be very specific to your current application and does not seem to impose a generic use case beneficial to a wider audience.
Yes, while reading the whole EMF, I came across the need to write elements to PDF that are not used in WMF.

When the whole EMF is done, I will send you my source code.

If I may ask, could you show me which variables determine things around objects so I can add colorspace?

I don't want to be in a dispute, nor do I want you to finish some functions for me, I just ask for help and the direction I should go.
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Create a PDF with an area filled with a raster pattern

Post by utelle »

gabuliatko wrote: Mon Sep 07, 2020 5:27 am Yes, while reading the whole EMF, I came across the need to write elements to PDF that are not used in WMF.
As said before, there is only partial support for the WMF format. Even if I decide to enhance the WMF support and/or to add EMF support, there will still be operations that can't be applied to PDF (e.g. "flood fill").
gabuliatko wrote: Mon Sep 07, 2020 5:27 am If I may ask, could you show me which variables determine things around objects so I can add colorspace?
Internal method NewObj must be used on starting the output of an object to PDF. This is required, because each object has an entry in the cross reference section. If NewObj is called without parameter, a new object id will be created automatically.

Member variable m_n contains the current object number. Method GetNewObjId can be used to retrieve a new object id without actually starting to output it to PDF.

There are cases where fixed object ids are used or where implicitly a continuous sequence of object ids is used. This behaviour was inherited from FPDF on which wxPdfDocument was based 15 years ago. If I would start from scratch again, I would implement many things differently now. There are plans to completely rework wxPdfDocument in the future, but for the time being, we have to live with what we currently have.
Post Reply