Hugo
         Ghazi told me that  alivePDF AlivePDF ownership has been transferred 
to RIADVICE. It now lives in
this repository https://github.com/riadvice/AlivePDF 
<https://github.com/riadvice/AlivePDF>. I would be happy
to assist or need implementing new features, so | will upgrade soon this is a 
clip form my code that show a lot of the common elements


      [Embed(source="Records_Badge.jpg", mimeType="application/octet-stream")]
      protected var jpgBytes:Class;


      [Embed(source="Records_Logo_BW.jpg", mimeType="application/octet-stream")]
      protected var LogoBytes:Class;

      [Embed(source="Records_Star_Y.jpg", mimeType="application/octet-stream")]
      protected var starOn:Class;


      [Embed(source="Records_Star_N.jpg", mimeType="application/octet-stream")]
      protected var starOff:Class;

      public function genPDF():void {
         var _hvbold:IFont = new CoreFont(FontFamily.HELVETICA_BOLD);
         var _hv:IFont = new CoreFont(FontFamily.HELVETICA);

         var _roset:Image


//set up the page size
         var myPDF:PDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.A4);

// add a blank page
         myPDF.addPage();

// set a font
         myPDF.setFont(_hvbold, 34);
         myPDF.addText("Dictation", 10, 20);

// add an image 
         // add images to
         myPDF.addImageStream(new jpgBytes() as ByteArray, 
ColorSpace.DEVICE_RGB, null, 168, 1, 19.9, 22.01, 0, 1, "normal", null);

 

// reset font

 
         myPDF.setFont(_hv, 12);
         myPDF.addText(dateResult, 10, 41);

// add a line across the page     

        

         // Report boddey
         //set fint size
         

//-------------------------- bottom  -------------------------------------------

         var _rec4:Rectangle = new Rectangle(10, 260, 190, 0.05);
         myPDF.drawRect(_rec4);


         // the hight and with will scale the object
         myPDF.addImageStream(new LogoBytes() as ByteArray, 
ColorSpace.DEVICE_RGB, null, 70, 255, 50, 20, 0, 1, "normal", null);


// save the work 

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

         file.save(buffer, “report.pdf");

 
      }




> On 16 Nov 2017, at 23:42, hugo <hferreira...@gmail.com> wrote:
> 
> Hello Scott,
> 
> Yes, please.
> I will share want I can improve.
> 
> Thank you,
> Hugo.
> 
> 
> 
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Reply via email to