Good afternoon.
I have to save a PDF and send from your mobile device.
I saved and costs.
Arrives mail without problems.
But when I try to open the pdf gives me error.
Reader, tells me that the file is not what was expected and could be
unencrypted.
I hit you the code. thank infinitely help
Freddy
var pdf:PDF = new PDF;
pdf = new PDF(Orientation.LANDSCAPE, Unit.MM, Size.A4 );
pdf.setDisplayMode (Display.REAL);
pdf.addPage();
pdf.addText('hello nice', 10, 10);
var fs:FileStream = new FileStream();
var file: File = File.applicationStorageDirectory.resolvePath("a.pdf");
fs.open(file,
FileMode.WRITE);
var
pdfBytes:ByteArray = pdf.save(Method.LOCAL);
fs.writeBytes(pdfBytes);
fs.close();
myMailer.sendAttachedMail("jaja [ at ] jaja.jaja", " jaja [ at ] jaja.jaja ", "test smtp",
"<br>*Picture from HTML :)*", pdfBytes, "a.pdf");
I have to save a PDF and send from your mobile device.
I saved and costs.
Arrives mail without problems.
But when I try to open the pdf gives me error.
Reader, tells me that the file is not what was expected and could be
unencrypted.
I hit you the code. thank infinitely help
Freddy
var pdf:PDF = new PDF;
pdf = new PDF(Orientation.LANDSCAPE, Unit.MM, Size.A4 );
pdf.setDisplayMode (Display.REAL);
pdf.addPage();
pdf.addText('hello nice', 10, 10);
var fs:FileStream = new FileStream();
var file: File = File.applicationStorageDirectory.resolvePath("a.pdf");
fs.open(file,
FileMode.WRITE);
var
pdfBytes:ByteArray = pdf.save(Method.LOCAL);
fs.writeBytes(pdfBytes);
fs.close();
myMailer.sendAttachedMail("jaja [ at ] jaja.jaja", " jaja [ at ] jaja.jaja ", "test smtp",
"<br>*Picture from HTML :)*", pdfBytes, "a.pdf");