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);
            }

22 Posts
22 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

115 Posts
241 Points

Our 4274 members have posted 260 times in 75 discussions