PDF Attachment is altered with filename and other characters - InfoPath Dev
in

InfoPath Dev

PDF Attachment is altered with filename and other characters

Last post 11-07-2012 11:29 AM by jwmjPens. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-01-2012 06:19 AM

    PDF Attachment is altered with filename and other characters

    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 A pdf that has not been attached to InfoPath and sent via http to a java service looks like this (if opened using Wordpad):

    %PDF-1.5
    %äãÏÒ
    1 0 obj
    [/PDF/ImageB/ImageC/ImageI/Text]
    endobj
    4 0 obj
    <</Length 5 0 R
    /Filter/FlateDecode
    >>
    stream
    xœ}=kÂA [...]

     

    A pdf that has been attached to InfoPath and sent via http to a java service looks like this:

    CIFA[paragraph symbol]   xS- + A R 1 3 0 7 0 2 X = I . p d f   %PDF-1.5
    %µµµµ
    1 0 obj
    <</Type/Catalog/Pages 2 0 R/Lang(en-US) /StructTreeRoot 13 0 R/MarkInfo<</Marked true>>>>
    endobj
    2 0 obj
    <</Type/Pages/Count 2/Kids[ 3 0 R 8 0 R] >>
    endobj
    3 0 obj
    <</Type/Page/Parent 2 0 R/Resources<</Font<</F1 5 0 R>>/XObject<</Image7 7 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 614.88 845.28] /Contents 4 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 0>>
    endobj
    4 0 obj

     

    Where would the additional info (highlighted in bold) come from? This is causing a problem when sending the pdf to a printer.

  • 11-01-2012 08:06 AM In reply to

    Re: PDF Attachment is altered with filename and other characters

    Your image is not displaying.

    Are you trying to get the attached PDF from the InfoPath XML? All attachment files are stored as base64 in the XML - are you saying there are additional changes after decoding the base64?

    Hilary Stoupa

  • 11-01-2012 08:19 AM In reply to

    Re: PDF Attachment is altered with filename and other characters

     Yes, the attached pdf is sent within the xml as a byte stream. For testing purposes, the stream is sent thru a base 64 decode and then displayed. Viewing the pdf file within Wordpad prior to sending thru the form and after sending it thru the form demonstrates the differences highlighted above.

    Thanks for helping!

  • 11-01-2012 08:28 AM In reply to

    Re: PDF Attachment is altered with filename and other characters

    Can you attach your screenshot under the Options tab on a reply? I'm not sure how much help I can be, but if others can see your screenshot, they may be able to help...

    Hilary Stoupa

  • 11-01-2012 09:04 AM In reply to

    Re: PDF Attachment is altered with filename and other characters

     This is the file in its original state.

  • 11-01-2012 09:07 AM In reply to

    Re: PDF Attachment is altered with filename and other characters

     This is the same file after it is attached to the InfoPath form.

    Both are saved as txt files to 1) allow it to be uploaded to this site and 2) better display the change made to the file.

  • 11-07-2012 11:29 AM In reply to

    Re: PDF Attachment is altered with filename and other characters

     http://support.microsoft.com/kb/892730

    This site shows that InfoPath puts a few 'header' fields before righting the actual file. Is there a way to override this code?

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.