5

If I insert a quick part (document property) in both header and body it displays the look up ID after PDF conversion using Word automation services.

If I only insert in the header or body it works fine. I can't use the same look up in both header and body at the same time.

Word template with same quick part in header and body:

http://qikr.co/wqvk5

PDF file after conversion

http://qikr.co/xa8dn

The code:

  string siteUrl = "http://sp2010dev1";

        string wordAutomationServiceName = "Word Automation Services";
        using (SPSite spSite = new SPSite(siteUrl))
        {
            ConversionJob job = new ConversionJob(wordAutomationServiceName);
            job.UserToken = spSite.UserToken;
            job.Settings.UpdateFields = true;
            job.Settings.OutputFormat = SaveFormat.PDF;
            job.AddFile(siteUrl + "/Shared%20Documents/Test.docx",
                siteUrl + "/Shared%20Documents/Test.pdf");
            job.Start();

        }
1
  • Your links seem broken. :(
    – Nicole
    Commented Jan 3, 2014 at 0:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.