Export InfoPath-form to pdf-file with individual name - InfoPath Dev
in

InfoPath Dev

Export InfoPath-form to pdf-file with individual name

Last post 05-31-2016 01:57 PM by John1006. 38 replies.
Page 3 of 3 (39 items) < Previous 1 2 3
Sort Posts: Previous Next
  • 04-02-2014 08:50 AM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    I'm betting your form is a browser form instead of a filler form?

    EDIT - sorry, that was a little terse and unhelpful. http://msdn.microsoft.com/en-us/library/microsoft.office.infopath.view.export(v=office.14).aspx - CurrentView.Export requires a filler form, full trust - it is not available for browser.

    Hilary Stoupa

  • 04-02-2014 10:37 PM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    Hi Hilary, Yes, you are right here. My form was Blank InfoPath form (i.e. Web browser form). I have created one more new infopath filler form and this time i am facing this issue: InfoPath cannot open the selected form because of an error in the form's code. InfoPath will fail to load this form because Microsoft .NET Framework 3.5 is not installed or is installed incorrectly. Download and install Microsoft .NET Framework 3.5 or contact your system administrator. A floating attribute may not be passed as the context node for an XSLT transform or an XPath query. Please assist me. Thanks, Ankit
  • 06-02-2014 06:44 AM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    Hi Hillary, your code works well for me as shown below. The only problem is that the user's selections made on a Repeating table pulled in from a Sharepoint list as a Secondary Data Connection is not reflected on the saved PDF. Is there some way for me to insure the user's selections on the InfoPath form? Public Sub CTRL50_5_Clicked_1(ByVal sender As Object, ByVal e As ClickedEventArgs) Dim fileName As String Dim nameNode As XPathNavigator 'Set the values. Replace "/my:myFields/my:textField" with the xpath to the field that has the value you want as the file name nameNode = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Name", NamespaceManager) fileName = nameNode.Value + ".pdf" 'Do the work -- notice we use the variable fileName as part of the path for the file Me.CurrentView.Export("MyServer" + fileName, ExportFormat.Pdf) End Sub
    Jeffrey J Vojtko
  • 06-02-2014 02:12 PM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    If you manually export the form to PDF, do you see the data you expect?

    Hilary Stoupa

  • 06-03-2014 04:58 AM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    When I manually export the form there is no data. But, when I print it out as a PDF the data appears as expected on the form.
    Jeffrey J Vojtko
  • 06-03-2014 09:04 AM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    I may have been unclear. I'm wondering, if you create the form from InfoPath's "File > Info > Publish as PDF" does it render correctly? I think you are saying when you go to File > Print and then print the form as a PDF (using some 3rd party software, I'm guessing?) it renders correctly? The code in this thread uses InfoPath's built in "Publish as PDF" functionality....

    Hilary Stoupa

  • 06-03-2014 09:16 AM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    The "File > Info > Publish as PDF or XPS document feature in InfoPath results in a blank form. So, no the form doesn't render properly. But, when printed to PDF through Windows it does render correctly.
    Jeffrey J Vojtko
  • 06-03-2014 09:28 AM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    You'll probably need to print the form instead via code - I'm guessing you'll be able to change the printer settings to print as PDF via code, but don't have a sample off-hand.

    Hilary Stoupa

  • 05-31-2016 01:57 PM In reply to

    Re: Export InfoPath-form to pdf-file with individual name

    Hi Hilary, I have followed the instructions from the previous posts and I have a few issues. First of all, my form is an InfoPath-Browser Enabled form which I think is the issue. The two errors I get are Error 1 'Microsoft.Office.InfoPath.View' does not contain a definition for 'Export' and no extension method 'Export' accepting a first argument of type 'Microsoft.Office.InfoPath.View' could be found (are you missing a using directive or an assembly reference?) C:\Users\j...\AppData\Local\Temp\Vsta\InfoPath\VstaSZ8wQSwu8ky9cqI5oR5d0A\VstaB__EDh8t1l0iLkOdH5__eXAg\FormCode.cs 52 34 Form1 Error 2 The name 'ExportFormat' does not exist in the current context C:\Users\j...\AppData\Local\Temp\Vsta\InfoPath\VstaSZ8wQSwu8ky9cqI5oR5d0A\VstaB__EDh8t1l0iLkOdH5__eXAg\FormCode.cs 52 60 Form1 Basically, I have a browser-enabled InfoPath form in which i want the users to be able to click on a button and convert the form to either a PDF or Word Doc. I have tried XML, XSL, XSLT stuff and I am a little stumped. We are on SharePoint 2013 and Designer Workflow does not support the conversion in 2013. We don't want to buy 3rd party. Would you have any suggestions on how I can convert this InfoPath - browser- enabled form to PDF or DOCx ? Thank you So much in advance. -John
Page 3 of 3 (39 items) < Previous 1 2 3
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.