WidthCannotBeNegative exception when saving Word doc as pdf.

0
danvonfeldt posted this 18 December 2017

Hello,

I'm receiving the following error when saving a word to pdf.

WidthCannotBeNegative at Docentric.Pdf.Drawing.XSize.setWidth(Double value) at Docentric.Pdf.Drawing.FontHelper.MeasureString(String text, XFont font, XStringFormat stringFormatnotyetused)

Working on getting a de-identified sample for you. Save as pdf from Word works fine.

Code being used is:

                Document doc = Document.Load(inputFilePath);
            using (Stream reportDocumentStream = File.Create(outputFilePath))
            {
                doc.Save(reportDocumentStream, Docentric.Documents.ObjectModel.SaveOptions.Pdf);
            }

29 Posts
29 Points
1 Comments
Order By: Standard | Newest | Votes
0
jles posted this 19 December 2017

Hi,

Are you using the newest 5.1 version?

Thanks,

Jure

155 Posts
295 Points

Our 229039 members have posted 345 times in 102 discussions