I am trying to turn multiple vector graphic wmf files into a single, multi page vector graphic pdf. Does anyone know how this can be done? We have Aspose.PDF but this does not seem to handle SVG files.
Hi Tony,
Thanks for your interest in our products.
Kindly check the following documentation links for details and code snippets as per your requirement.
Please feel free to contact support in case you need any further assistance.
Thanks & Regards,
Hi Tony,
Adding more to Rashid’s comments, you may also consider visiting the following link for information on Use Image from Local Disk
Thanks Rashid,
Regards
Hi Tony,
Thank you for sharing the details.
Can you please share some details regarding sample source code and template documents you are using or create a sample application to show the issue. This will help us to figure out the exact issue and reply back to you soon.
We apologize for your inconvenience.
Thanks & Regards,
Hi Rashid,
Hi Tony,
Thanks for sharing the sample source code and template document with us.
I tested the scenario using your sample source code and source SVG file and able to notice that there might be an issue with your source file. I have also tested the scenario with another sample file and it's working fine. Source and resultant documents are attached for your reference.
Please feel free to contact support in case you need any further assistance.
Thanks & Regards,
Much appreciated Rashid. Your file indeed converts fine. All I really need now is something that can convert immediately from vector graphic wmf to vector graphic pdf. Although Aspose.PDF can convert SVG files to PDF it does not look as though it can go straight from vector graphic wmf to PDF without rasterising which loses quality.
Hello Tony,
Hi Rashid,
Regards
Hi Tony,
Thanks for your inquiry. Kindly use the below mentioned code for converting WMF to PDF.
[C#]
//Instantiate Pdf instance by calling its empty constructor<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
//Add a section into the pdf document
Aspose.Pdf.Generator.Section sec = pdf1.Sections.Add();
//Create a FileStream object to read the imag file
FileStream fs = File.OpenRead(@"d:\pdffiles\grid.wmf");
//Read the image into Byte array
byte[] data = new byte[fs.Length];
fs.Read(data, 0, data.Length);
//Create a MemoryStream object from image Byte array
MemoryStream ms = new MemoryStream(data);
//Create an image object in the section
Aspose.Pdf.Generator.Image imageht = new Aspose.Pdf.Generator.Image(sec);
//Set the type of image using ImageFileType enumeration
imageht.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Wmf;
//Specify the image source as MemoryStream
imageht.ImageInfo.ImageStream = ms;
//Add image object into the Paragraphs collection of the section
sec.Paragraphs.Add(imageht);
//Save the Pdf
pdf1.Save(@"d:\pdffiles\grid.pdf");
// Close the MemoryStream Object
ms.Close();
Please feel free to contact support in case you need any further assistance.
Thanks & Regards,
tonyhucks:Can you confirm if Aspose.PDF can convert from WMF to PDF but maintaining the vector graphic format for quality reasons. As stated before it looks as though the WMF file is maybe being converted to PNG and then to PDF since quality is obviously reduced.
Hi Nayyer,
Hi Tony,
Thanks for your patience.
I have verified the status of this issue from our issue tracking system and regret to share that, this issue is still unresolved. Currently it is pending for analysis and is in the queue. Also, at the moment we can't provide you the ETA for this issue. However, I have requested the development team to share the ETA regarding its resolution. As soon as we get required information, we will be more than happy to update you with the status of correction. Please be patient and spare us little time.
We apologize for your inconvenience.
Thanks & Regards,
Hi Rashid,
Hi Tony,
tonyhucks:Hi Rashid,Sorry to keep asking. In your last reply you mentioned asking the development team for an ETA regarding my issue. Do you have any more news?
Hi Guys,
Tony
Hi Tony,
has completed the analysis of your reported issue and the root cause has been
identified. However, the implementation of the fix of this issue has been
postponed till a later date due to other priority tasks and complexity of the issue. We will inform you as soon as this is resolved.