Hi. I want to embed an emf image in a PDF using Aspose.PDF.
When embedding an emf image in PDF with AddImage of PdfFileMend
emf is an image in vector format, but when embedded in PDF, it became a raster image.
Is there a way to save the image in PDF as it is in vector format?
Best regard.
The sources I couldn’t convert to CMYK are:
var generator = new BarcodeGenerator(EncodeTypes.GS1Code128, barcode);
generator.Parameters.Barcode.XDimension.Millimeters = 1f;
generator.Save(outPath, BarCodeImageFormat.Emf);
var pdfFile = Path.Combine(Path.GetDirectoryName(outPath), Path.GetFileNameWithoutExtension(outPath) + "_pdf.pdf");
using (var image = Aspose.Imaging.Image.Load(outPath))
{
var pdfOptions = new PdfOptions();
image.Save(pdfFile, pdfOptions);
}
var doc = new Aspose.Pdf.Document(pdfFile);
doc.Convert(Path.Combine(Path.GetDirectoryName(outPath), "logfile.log"), PdfFormat.PDF_X_1A, ConvertErrorAction.Delete);