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

154 Posts
294 Points

Our 225963 members have posted 342 times in 101 discussions