Hi,
Is there any script that can get the byte stream of the current PDF document?
I am using an offline PDF form in the application. On click of a button the, an LC process is invoked via webservice for storing the PDF in server. Is there any script by which the PDF doc itself could be converted to its bytestream and then sent over the webservice so that the PDF could be reconstructed there?
Thanks,
Muniyaraj
Solved! Go to Solution.
Views
Replies
Total Likes
Topics help categorize Community content and increase your ability to discover relevant content.
Are you calling a LiveCycle orchestration? If so then you woudl define a string as your input parameter (make sure you make it so it has no length limitation). Then when you call the service the string will contain the base64 encoded contents of your PDF. You need to get this into a document variable so in a setValue operation you can assign it to a document var using this function:
getDocFromBase64
(java.lang.String)
Paul
Views
Replies
Total Likes
I created a field called TextField2 and made it hidden from the user. I then bound the input (string) in the web service to this field and executed this command before the web service call is made:
TextField2.rawValue =
SOAP.stringFromStream(SOAP.streamEncode(Collab.documentToStream(event.target), "base64"));
Paul
In process side how is the PDF document generated using the input binary stream? can u please explain this also?
Views
Replies
Total Likes
Are you calling a LiveCycle orchestration? If so then you woudl define a string as your input parameter (make sure you make it so it has no length limitation). Then when you call the service the string will contain the base64 encoded contents of your PDF. You need to get this into a document variable so in a setValue operation you can assign it to a document var using this function:
getDocFromBase64
(java.lang.String)
Paul
Views
Replies
Total Likes
Thanks a lot man..
Views
Replies
Total Likes
I am able to generate the PDf document in the LC proces with the byte stream.Is there any way by which the data in this document can be altered in the process? or is it possible to extract the formdata from this document variable?
Views
Replies
Total Likes
Yes you can extract the data from the document .....there are two ways.
1. The easy way - in the Common category there are two Form Data Integration services - one for import and one for export. The export one os what you want. It simpy takes a PDF document type as input and creates a data file (XML) inside of a document variable. You can cast the Doc variable to an XML variable in a setValue operation then perfom XPath statements on teh XML to manipulate it.
2. If you have the Forms module you can use the processFormSubmission service to extract the data as well. This is much more sophosticated. I woudl recommend using option 1.
Paul
Views
Likes
Replies
Views
Likes
Replies