Free Support Forum -

Convert Word to PDF affects images

I’m converting a series of letters to PDF utilising ASPOSE Words and PDF which have images set at the top and the bottom of the document to make it look like it is on headed paper. However the images are being ‘brightened’ so that they appear to be different colours than the originals. Any ideas on how to fix it so that they are not being converted like this?

Can you please provide an example that can reproduce this error?

I’m working in C# - the following to convert the word doc - attached.

//create the document object
Document doc = new Document(strTemplateFilename);
//create the document builder object
DocumentBuilder builder = new DocumentBuilder(doc);
//save the document into xml format - to be converted into PDF
doc.Save(strTempDirectory + “tempFile.xml”, SaveFormat.AsposePdf);

//create the PDF object
Pdf pdf = new Pdf();
//load the XML file into the pdf object

pdf.BindXML(strTempDirectory + “tempFile.xml”, null);
//Instruct to delete temporary image files
pdf.IsImagesInXmlDeleteNeeded = true;
//try to save the pdf
//save the pdf file
//set the flag to true
bPdfWritten = true;
//catch directory not found exception exeception
catch (System.IO.DirectoryNotFoundException)
error = “Invalid path: '” + strPdfFilename + “’.”;
//catch an IOException
catch (System.IO.IOException)
error = “Cannot access file: '” + strPdfFilename + “’ because it is currently being used by another process.”;

this is the pdf it generates

I have reproduced this error and logged this issue as DFNET-3909. We will try to fix it in the future version.