Open GoogleCodeExporter opened 9 years ago
Ok I solved the problem,
here my example how it works savinging an alivePDF with MDM Zinc:
replace the line from above:
mdm.FileSystem.saveFile("ZincPDFTest.pdf",pdfByteBuffer.toString());
with the following code:
var dataString = "";
//converts the byteArray into the format needed by MDM BinaryFile
for (var i=0; i< pdfByteBuffer; i++) {
if (i>0) {
dataString = dataString +"|";
}
dataString = dataString + pdfByteBuffer[i];
}
// set data
mdm.FileSystem.BinaryFile.setData(dataString);
// now write the file on your HD
mdm.FileSystem.BinaryFile.writeData("ZincPDFTestBinary.pdf");
and now it works even with included image data.
Original comment by tohkli...@googlemail.com
on 25 Jul 2008 at 8:37
Hi,
Happy it works now :)
Do you think of any features AlivePDF could have to make life easier for you
guys
working with Zinc ?
let me know !
best,
Thibault
Original comment by thibault.imbert
on 26 Jul 2008 at 7:59
[deleted comment]
hi there,
worked. But went to open the newly created .pdf and I get an error saying .pdf
couldn't be parsed!!! any ideas
guys.
thanks
Dan
Original comment by hucklebo...@gmail.com
on 6 Apr 2009 at 2:35
Hello,
Bow from SlideRocket here!
I am using this solution as well, and I noticed a small error in the 'for'
control
statement definition.
In the line
for (var i=0; i< pdfByteBuffer; i++) {
the middle boolean expression should be
i < pdfByteBuffer.length
This could be one reason why the resulting PDF file is 'unreadable'. because its
EMPTY! The loop never executes :/.
Original comment by barcher4...@gmail.com
on 7 Nov 2009 at 12:10
Hey there, Bow again!
Sadly, this solution does NOT work well for large PDF files or any Large
ByteArray,
since you have to loop through it byte by byte using ActionScript. A 6 page PDF
with
images (hi res), for example will lock up flash player for about 1 minute and a
half
while it loops through the byte array.
This solution is NOT scalable unfortunately :/.
Original comment by barcher4...@gmail.com
on 7 Nov 2009 at 12:15
Original issue reported on code.google.com by
tohkli...@googlemail.com
on 24 Jul 2008 at 2:32