Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7902473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:30:07+00:00 2026-06-03T09:30:07+00:00

I have an app that is built from Flash CS5.5, exported using AIR3.1 and

  • 0

I have an app that is built from Flash CS5.5, exported using AIR3.1 and distributed through the Enterprise setup from Apple (allows me to bypass appstore approval).

I’m now trying to have a PDF (generated using AlivePDF) exported somehow into the iPad, either into iBooks or just have it opened in Safari.

This is what I’m using for my desktop version of the app. Although the scripting is very messy it gets the job done. I just don’t know how to convert this over and make it work on an iPad

//Populate listbox component from array

function noEmpty(item:*, index:int, array:Array):Boolean{
  return item != undefined;
}

for(var i:int = 0; i < MovieClip(root).selectedProducts.length; i++) {
    if(MovieClip(root).selectedProducts[i] != undefined){
        selectedProductsText.dataProvider.addItem({label: MovieClip(root).selectedProducts[i]});
    }
}

var myTextFormat:TextFormat = new TextFormat();
myTextFormat.size = 20;
myTextFormat.font = "Arial";
myTextFormat.color = 0x000000;
myTextFormat.leftMargin = 30;
selectedProductsText.rowHeight = 40;

selectedProductsText.setRendererStyle("textFormat", myTextFormat);

//AlivePDF, generate PDF

import org.alivepdf.pdf.PDF;
import org.alivepdf.layout.Orientation;
import org.alivepdf.layout.Size;
import org.alivepdf.layout.Unit;
import org.alivepdf.display.Display;
import org.alivepdf.saving.Method;
import org.alivepdf.fonts.FontFamily;
import org.alivepdf.fonts.Style;
import org.alivepdf.colors.RGBColor;
import com.adobe.images.*;

function convertString(_value:String):String
{
 var returnString:String = "";
 var _chr:String = String.fromCharCode(13);
 var tempArray:Array = _value.split(_chr);
 for(var i:uint = 0; i < tempArray.length; i++)
  {
   returnString += tempArray[i] + "\n";
  }   
  return returnString;
}

var pdf:PDF = new PDF(); 

pdf.setDisplayMode (Display.REAL);     
pdf.addPage(); 

pdf.writeText(7, convertString(  MovieClip(root).selectedProducts.filter(noEmpty).join('\n')    ));

var buffer:ByteArray = pdf.save(Method.LOCAL); 
var file:FileReference = new FileReference(); 

//save PDF button

btnPdf.addEventListener( MouseEvent.CLICK, generatePDF );

function generatePDF ( e:MouseEvent )
{
    file.save(buffer, "Product Selection List.pdf");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:30:09+00:00Added an answer on June 3, 2026 at 9:30 am

    Having done some work with AIR for iOS I would say your issue will be that you need to change how the file is saved and stored on the device.

    You need to save the file to the apps storage directory with something like this that I used to store a jpg image:

    f = File.documentsDirectory.resolvePath(imagename+".jpg");      
    stream = new FileStream();
    stream.open(f, FileMode.WRITE);                                         
    j = new JPGEncoder(80);     
    bytes = new ByteArray();
    bytes = j.encode(snapShot.bitmapData);
    stream.writeBytes(bytes, 0, bytes.bytesAvailable);
    stream.close();
    

    I’m not sure how or if it’s even possible through AIR to send the pdf to iBooks. You could use StageWebView within your app though to display the PDF.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PHP.. I have a small app that I built that currently uses a
I have an app that is built starting from a tab bar controller. It's
I have built an iPhone app that needs to pull data from a server.
I have a flash message in Django that is built using a standard char
I have an iPhone app that I built using PhoneGap. I'm now looking to
I am using ANT to compile an Android app that I have built. It
I have an iphone app that I built based off a tutorial (for a
I have been working with a Windows Mobile 6 app that is built with
I have built an app that plays lots of sounds the easy way: AudioServicesPlaySystemSound(someSoundID);
I have built an app that works only when not run as a Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.