Select to view content in your preferred language

Save Flex Map with Alive PDF to a specific location.

634
1
10-11-2010 08:24 AM
JoshTurner
Emerging Contributor
Has anyone tried saving to a specific location with Alive PDF?

I have been able to successfully save a pdf through the file dialog, but I need to save to a specific folder like C:\temp on a button click or at least have the dialog open to the correct location.

It looks possible with an air application, but has anyone done this with flash player?

thanks,

Josh
Tags (2)
0 Kudos
1 Reply
JoshTurner
Emerging Contributor
From everything I have read, it seems this cannot be done inside Flex using FlashPlayer.
Has anyone modified the create.php script to save the pdf to a specific location?

Php Script

<?php

$method = $_GET['method'];
$name = $_GET['name'];


if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {

// get bytearray
$pdf = $GLOBALS["HTTP_RAW_POST_DATA"];

// add headers for download dialog-box
header('Content-Type: application/pdf');
header('Content-Length: '.strlen($pdf));
header('Content-disposition:'.$method.'; filename="'.$name.'"');

echo $pdf;

}  else echo 'An error occured.';

?>
0 Kudos