MateuszŁ#33366
I have a pdf file that has many curves, the curves have different fill colors.
Can it be edited? changing fill colors, line colors, etc.,
My next question will be whether it is possible to fill such an object with a raster texture...
I will be very grateful for advice on how to achieve this
Can it be edited? changing fill colors, line colors, etc.,
My next question will be whether it is possible to fill such an object with a raster texture...
var dpi = 300f;
using (var pdfWriter = new PdfWriter("out.pdf"))
{
pdfWriter.AddPage(
UnitConverter.ConvertUnitsToPixels(dpi, 21.0f, Unit.Cm),
UnitConverter.ConvertUnitsToPixels(dpi, 29.7f, Unit.Cm),
dpi, dpi);
using (var graphics = pdfWriter.GetGraphics())
{
using (var pdfReader = new PdfReader("in.pdf", dpi, dpi))
using (var pdfContent = pdfReader.Frames[0].GetContent())
{
// pdfContent.Items[5] < here would like to edit this item
graphics.DrawContainer(pdfContent,
UnitConverter.ConvertUnitsToPixels(dpi, 5.0f, Unit.Cm),
UnitConverter.ConvertUnitsToPixels(dpi, 5.0f, Unit.Cm)
);
}
}
}
I will be very grateful for advice on how to achieve this