Hello,
I'm trying convert my svg to png/pdf.
while doing so it add black strips on the image.
Attached is the sample pdf which shows the issue. if just convert it to png only that also has same issue.
Attached is the sample pdf file link:
https://svcweufixtureclob.blob.core.windows.net/svc-weu-printjob/524f2935-b5a3-4f42-93b0-7ff524607249_113.pdf
Code:
//ToDo: Convert source SVG file to PDF, and update to dest folder.
string text = System.IO.File.ReadAllText(sourceFie);
byte[] bytes = Encoding.UTF8.GetBytes(text);
MagickNET.UseOpenCL = false;
MagickReadSettings settings = new MagickReadSettings()
{
Density = new PointD(3000, 3000),
ColorSpace= ColorSpace.RGB,
Format = MagickFormat.Svg
};
string pdfFileName = Path.ChangeExtension(destFileName, ".pdf");
using (MagickImage image = new MagickImage(bytes, settings))
{
image.ColorSpace = ColorSpace.RGB;
image.
image.Format = MagickFormat.Pdf;
image.Density = new PointD(150, 150);
image.CompressionMethod = CompressionMethod.JPEG;
image.Resize(1240, 1753);
image.ResolutionUnits = Resolution.PixelsPerInch;
image.Write(pdfFileName);
}
Comments: Unable to reproduce threading issue
I'm trying convert my svg to png/pdf.
while doing so it add black strips on the image.
Attached is the sample pdf which shows the issue. if just convert it to png only that also has same issue.
Attached is the sample pdf file link:
https://svcweufixtureclob.blob.core.windows.net/svc-weu-printjob/524f2935-b5a3-4f42-93b0-7ff524607249_113.pdf
Code:
//ToDo: Convert source SVG file to PDF, and update to dest folder.
string text = System.IO.File.ReadAllText(sourceFie);
byte[] bytes = Encoding.UTF8.GetBytes(text);
MagickNET.UseOpenCL = false;
MagickReadSettings settings = new MagickReadSettings()
{
Density = new PointD(3000, 3000),
ColorSpace= ColorSpace.RGB,
Format = MagickFormat.Svg
};
string pdfFileName = Path.ChangeExtension(destFileName, ".pdf");
using (MagickImage image = new MagickImage(bytes, settings))
{
image.ColorSpace = ColorSpace.RGB;
image.
image.Format = MagickFormat.Pdf;
image.Density = new PointD(150, 150);
image.CompressionMethod = CompressionMethod.JPEG;
image.Resize(1240, 1753);
image.ResolutionUnits = Resolution.PixelsPerInch;
image.Write(pdfFileName);
}
Comments: Unable to reproduce threading issue