Pdf as background to canvas to draw on pdf

<mx:HTML top="0" bottom="0" left="0" right="0" location="test.pdf"/>
    <mx:Canvas top="0" bottom="0" left="0" right="0" initialize="canvasInit(event)">
    </mx:Canvas>
in canvasinit event i did drawing the line in mouse using mouse.
if i try to set pdf as background to the canvas, it is not set as background. it will be in the foreground. how to send pdf as a background of canvas.
i tried lot. i am not able to set pdf as background. it comes to foreground.
so please if anybody is having an idea on tht please hlep me
If i load the html page instead of pdf. it works fines. i.e html page in background of canvas.  i used following code
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute">
    <mx:Script>
        <![CDATA[
            import mx.containers.Canvas;
            private var drawing:Boolean = false;
            private function canvasInit(e:Event):void {
                var c:Canvas = Canvas(e.target);
                c.graphics.lineStyle(2, 0xff0000, 1);
                c.addEventListener(MouseEvent.MOUSE_UP, onMouseEvent);
                c.addEventListener(MouseEvent.MOUSE_DOWN, onMouseEvent);
                c.addEventListener(MouseEvent.MOUSE_MOVE, onMouseEvent);
            private function onMouseEvent(e:MouseEvent):void {
                //trace(e.type);
                if (e.type == MouseEvent.MOUSE_DOWN)
                    drawing = true;
                else if (e.type == MouseEvent.MOUSE_UP)
                    drawing = false;
                else if (e.type == MouseEvent.MOUSE_MOVE) {
                    var c:Canvas = Canvas(e.target);
                    //trace((drawing ? "drawing to " : "moving to ") + e.localX + "," + e.localY);
                    if (drawing)
                        c.graphics.lineTo(e.localX, e.localY);
                    else
                        c.graphics.moveTo(e.localX, e.localY);
        ]]>
    </mx:Script>
    <mx:HTML top="0" bottom="0" left="0" right="0" location="http://labs.adobe.com/technologies/afcs/"/>
    <mx:Canvas top="0" bottom="0" left="0" right="0" initialize="canvasInit(event)">
    </mx:Canvas>
</mx:WindowedApplication>
instead of html page, if i put any pdf  file. it is not in background. it comes to the foreground. i don't know how to set pdf as background. please help me

1. Yes you can load SWF files using Loader and then order that SWF behind or above other display objects. (Although in Flex, I think you would use SWFLoader.) If you load a SWF in an HTML control, it will always be on top.
2. I'm not sure what you mean by the background of the canvas. The flash display list is a tree. A parent object can have its own graphics (drawn with the graphics drawing API). Any children added to that object will display above these graphics. If you added that parent object to another display container, it (and its children) would display above any lower indexed children of that display container. Thus a canvas has a background rectangle that it draws with the graphics api. Any children you add to it are drawn in index order. The object at index 0 is drawn at the bottom of the visual stack.
3. No.
4. Technically you could load the PDF file into memory, parse the file structure and convert what you parsed into ActionScript objects. I suspect that is more work than you want to do.

Similar Messages

  • Forcing a canvas to draw off screen for printing.

    I have a process where I am trying to print a canvas that has not yet been shown.   So basically how do I force it to draw it's components without displaying it to the user.  If I add it to the print job it is blank.. If I first display it visually on the screen it is printed.  But only the visble portion is printed.. I have read up on printing and I understand why only the visble range is printed, but I would like to draw a custom sized canvas and then just print it..
    I have spent a couple of days on this and I feel like I am just missing something.
    I would like to do something like following:
    1.  Grab my canvas object
    2.  Set the height and width;
    3.  Instantiate the drawing routine.
    4.  Add it to the printJob.
    Thanks in advance.

    int() is always popular.

  • How do I save/export an image without a background when using Adobe draw on iPad?

    Hi :-)
    brand new new to adobe draw... Using on an iPad... How do I export/save an image so that it has no background?

    The solution is the following:
    - by default the first drawing layer is white... and will remain so... you have to turn the opacity of this white layer to zero by pushing the white button on the left,
    - then use any of the remaining 9 layers for your drawings,
    - export to adobe Creative Cloud or Illustrator (not as JPEG) and you have you picture with a transparent background...
    Hope this helps..

  • How can I have transparent background on b/w drawing?

    I have many technical drawings saved as tiff files that need the outer background transparent while maintaining the white fill within the drawings.  I need this so that I can place the drawings within other documents created in both ID CS4 and AI CS4.  Any idea how I can achieve this?
    Thanks,
    Mel

    I would say your best bet is to use the wand tool, (make sure Contiguous + Anti-alias are both checked) and select the area around the outside of the drawing.. then use the [ Refine Edge... ] button near the checkboxes, and fine-tune the edge settings, and finally, delete the outside area.  Make sure the layer that you're working with is not a background layer, and if it is, right click the background layer and select "layer from background."
    Hope that helps!
    Jesse

  • Change on a scan a grey background into white background on a pencil drawing

    I have a scan of a pencil drawing the background turn grey instead of white. Ineed to change it back to the white background without losing any of the small detail? Anybody that can suggest how to do that?

    A question that gets asked once a month or so.
    http://forums.adobe.com/message/6099399#6099399
    http://forums.adobe.com/message/6072100#6072100

  • Background data usage: what draws data when you're not looking?

    I have "Fetch New Data" turned off; and I have Wi-Fi at home; and I don't use the 3G connection that much during my work day for fear of cracking my fairly small 250Mb cap. I track it reasonable closely on the iPhone, and in any case I can download my carrier's day by day figures as an extra check.
    And so on average I only get through about 2Mb per day on 3G as measured by my carrier (I find the iPhone tends to underestimate it slightly).
    +Until yesterday.+ I didn't use the iPhone any obviously different way, but my carrier says I used +180Mb during the day+. And even weirder, the iPhone thinks I used around 340Mb yesterday (so clearly my carrier cannot be completely wrong).
    Now I have some overage fees to pay (about US$50) and I'll have to stop using 3G until the billing cycle ends (luckily just three days away)
    Anyone experienced anything like this before?
    Anyone know what may have caused it?
    For example, could Mobile Safari be stuck on an auto-refreshing page and consuming data in the background?

    CTmac wrote:
    I think you are on to it with the self refreshing idea. I am an American user, so our data plan is a little different. We pay a flat 30 dollars extra each month for unlimited data, so nobody tracks usage. But I do know that safari updates mobile pages every 15 seconds on some sites(espn,nfl etc). I would suggest resetting the phone to ensure your safari isn't keeping a page open. You should also look for any apps you have added that may be auto refreshing, weather and sports apps are the most notorious. Good Luck.
    I actually checked my Safari history... and there's nothing for that whole day. On the other hand, I'm pretty sure I did surf some pages that day, so that's a bit screwy in itself.
    I'm going to try and see if the carrier can pull some logs from somewhere. It's a long shot...

  • Create a PDF missing drawing elemets

    When I select Save & Send - Create PDF, most of the background in my Visio drawing is missing. It looks fine in print preview, prints fine on my printer and also prints fine when using the Adobe PDF print driver.

    Hi,
    What do you mean background exactly? background design or background layer? Do you hide the background layer or make it invisible?
    Since this issue may be caused by unexpected factors, maybe you can provide some sample files to let me know, please upload them to OneDrive and share the files with links.
    Some reference:
    http://help.adobe.com/en_US/acrobat/X/pro/using/WSA46B90C8-7B6A-4832-A0D3-A786B0E6E5A4.w.html
    Best regards,
    Greta Ge
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Putting A Layer Over Drawing Canvas - Tile Map

    I want to make it so that a layer will be above the map when its drawn.
    Like I want a layer over this, cause im making a menu for the game, but the game is above the layer.
    var tiles:Object = new Object({width:52, height:26}); // The size of the 'flat' tile. Tiles are allowed to be different dimentions, to give the '3D' effect.
    var offset:Object = new Object({x:130, y:100}); // This object helps center the 'hero' to the stage.
    var hero:Object = new Object({x:1, y:5}); // The starting position of the 'hero'
    var canvas:Object = new Object({mc:_root.createEmptyMovieClip("canvas", _root.getNextHighestDepth())}); // Contains the primary movie clip and map information.
    canvas.map = new Array( // Dictates the topography of the environment
                            // The reason I decided to to use 200 for walls and 100 for ground is to leave
                            // the option open add more tiles, such as 86 for another type of tile that is
                            // walkable. Since the collision detection code checks to see if the tile is
                            // less then 200 (less is walkable, 200 or above is not), there is no need to change
                            // the code toenable new tiles, simply name them a number between 0 and 200.
                            new Array(200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,193,196,196,196,196,189,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,187,182,182,179,190,100,200),
                            new Array(200,100,100,199,199,199,199,199,199,199,199,199,199,186,183,183,180,190,100,200),
                            new Array(201,199,199,199,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,185,181,181,178,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,192,195,195,195,195,188,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
                            new Array(200,100,100,100,100,100,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
                            new Array(200,200,200,200,200,200,200)
    _root.onLoad = function():Void
        initmap(canvas.map); // Draw the map
        initplayer(); // Draw the player
        return;
    _root.onEnterFrame = function():Void
        input(); // Handle keyboard movement
        return;
    function input():Void // Modifies the 'hero' object, handles collision detection ('hero' and wall)
        // Any tile less then 200 is walkable, anything above is not.
        // No need to change this code handle more tiles, just name the tiles a number.
        // (not the best way to do this but simple, quick, and easy to do)
        if(Key.isDown(Key.LEFT) && canvas.map[hero.y - 1][hero.x] < 200) hero.y--;
        else if(Key.isDown(Key.RIGHT) && canvas.map[hero.y + 1][hero.x] < 200) hero.y++;
        else if(Key.isDown(Key.UP) && canvas.map[hero.y][hero.x - 1] < 200) hero.x--;
        else if(Key.isDown(Key.DOWN) && canvas.map[hero.y][hero.x + 1] < 200) hero.x++;
        move();
        return;
    function move():Void // Moves the background and the hero
        // These three lines handle swapping the tile depths to give the '3D' effect
        var d:Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
        hero.mc.swapDepths(d);
        canvas.mc["tile_" + hero.y + "_" + hero.x].swapDepths(d - 1);
        // Move the hero in the opposite direction the environment moves
        hero.mc._x = (tiles.width / 2) * (hero.y - hero.x) + offset.x;
        hero.mc._y = (tiles.height / 2) * (hero.y + hero.x) + offset.y;
        // Move the environment
        canvas.mc._x = (tiles.width / 2) * (-hero.y - -hero.x) + offset.x;
        canvas.mc._y = (tiles.height / 2) * (-hero.y + -hero.x) + offset.y;
        return;
    function initplayer():Void // Self-expalanatory
        var d:Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
        hero.mc = canvas.mc.attachMovie("hero", "hero_mc", d + 1, {_x:hero.x * tiles.width, _y:hero.y * tiles.height});
        move();
        return;
    function initmap(map:Array):Void // Render map
        var map_height:Number = map.length; // Determine height of the map
        var map_width:Number = map[0].length; // Determine width of the map
        for(var y = 0; y < map_height; y++)
            for(var x = 0; x < map_width; x++)
                // Movieclip depth is everything when doing an isometric game
                var depth:Number = (y * tiles.height) + (x * tiles.width) + y;
                // Attach tile to 'canvas'
                var tile:MovieClip = canvas.mc.attachMovie("tile" + map[y][x], "tile_" + y + "_" + x, depth);
                tile._x = (tiles.width / 2) * (y - x) + offset.x;
                tile._y = (tiles.height / 2) * (y + x) + offset.y;
        return;

    there are no layers when your fla is published (or tested).  all displayobjects are assigned depths based on code used to assign depths and compiler code that assigns depths to objects you place on-stage in the authoring environment.
    all objects placed on-stage in the authoring environment are placed at negative depths starting with about -16,380.   that's why your menu (which is probably added to some layer in the authoring environment is below the movieclip you placed at nextHighestDepth() (which adds to no depth less than zero)
    to change a movieclip's depth use the swapDepths() method of movieclips.

  • Is it possible to draw shapes on an background image?

    Hi all,
    I wanna ask if it is possible for loading an jpg as background image in Canvas, and draw shapes(ovals/rectangles) on it?
    I've tried, but it seems the shapes always covered by the image. How can I due with this? I want the shapes drawn on top of the image, not underneath it.
    Please Help! Thx.

    Am I doing anything wrong? cos I've already draw the shapes after the image in the paint method.
    Here's some of the program coding:
    // init
    PictCanvas coffeeCanvas=new PictCanvas();
    //set up Picture Canvas
    coffeeCanvas.thePic=getImage(getCodeBase(),"50p.jpg");
    coffeeCanvas.setSize(200,200);
    // paint method
    public void paint(Graphics g)
    g.drawImage(thePic,0,0,this);
    g.drawOval(0,0,20,20);
    repaint();
    }

  • Clean up background on a PDF

    I have an old property survey that is barely legible.. trying to clean up background without losing surveyors drawing. Any thoughts? I am working in PDE10 and am not a whiz

    Please post the picture in a new message (click the camera icon to upload). You might have to convert the pdf to jpg if pdf is not supported for uploads.

  • How to load background image in canvas fast?

    Hi all,
    I am loading dynamic background in canvas with http path. It takes little bit time. How can i make it fast?
    Please help me.
    Thanks,
    -CK

    Make a friend with firebug &  you could find yourself from where it is getting applied.
    For the website you have given the background image it is using is [1] and it is getting set in css of body tag [2]. So Find the css at [3] and modify it OR replace [1] with other image with same file name.
    [1]   www.hanwha.com/etc/designs/hanwha/images/bg-body.jpg
    [2]
    body {
        background: url("images/bg-body.jpg") repeat-x scroll 50% 0 #FFFFFF;
        color: #757373;
        font: 14px/18px Arial,Verdana,Helvetica,sans-serif;
        margin: 0;
        min-width: 979px;
    [3]
    /etc/designs/hanwha/...../*.css

  • Canvas background color slightly off

    I notice this with certain colors more, but it seems like even if I paint the background the same exact color as my layer background, the canvas color is not exactly the same. I'm assuming it's a color management/profile kind of issue, but I keep that stuff off, so I'm not sure what's causing this. Has anyone had a similar experience?
    Thanks,
    -Onur

    Say what?
    Could you post a screenshot with the Layers Panel visible because I don’t quite follow?
    I'm assuming it's a color management/profile kind of issue, but I keep that stuff off, so I'm not sure what's causing this.
    How exactly did you do that and how do you suppose it should affect you if you have turned it »off«?
    Are you talking about multiple images or one?

  • Cant see the document canvas just grey background

    CANT SEE THE CANVAS PS4 ?just built a new pc and my ps4 (previous hdd ) runs fine ( so the mob and video card seem all good ). I created a new os on a new hdd and installed ps4 everything seems fine but cant see the canvas , can draw on it but just see the grey backround ( i  can see it creating in the layers pallet). Illustrator works fine ..please help

    If all else fails try resetting your preferences as described in the FAQ.
    http://forums.adobe.com/thread/375776?tstart=0
    You either have to physically delete (or rename) the preference files or, if using the Alt, Ctrl, and Shift method, be sure that you get a confirmation dialog.
    This resets all settings in Photoshop to factory defaults.
        A complete uninstall/re-install will not affect the preferences and a corrupt file there may be causing the problem.

  • Removing background from line drawing

    I'm desperate to find out how I can removing the background from a line drawing, leaving only the lines.

    Couple of additional tricks that can help in cleaning the image before using the magic wand. Open Levels and set a white point on the background using the white point eye dropper. This can clean up some stray marks. You can also use Threshold (filter>adjustments>threshold)to better separate the lines from the background.
    Rich

  • Is  drawing canvas always grey?

    When  I open a new project or open a drawing created in IDEAS the drawing canvas is grey.  Is there a way to change this?  Am I missing the obvious?
    thanks for any help.

    The canvas in Draw is an off-white/light-gray color. Currently, there is no way to change it.
    Hope that helps,
    Frank
    Draw Engineering

Maybe you are looking for

  • "Purpose of Payment" Tag in Outgoing Payment (XML) file for India

    Hi All While setting up DME tree for India , we need to populate field "Purpose of Payment" as per the norms laid down by the Reserve Bank of India (RBI). Please help on following points if anyone has experience of developing DME tree for RTGS paymen

  • How to search for value records for a specific period of time?

    Hi, I am building an application where I need to use BDB to store tons of call records. In the call records, I have the following fields: 1. from-caller 2. to-caller 3. begin-time 4. end-time 5. account-code 6. user-code I want to use end-time's micr

  • Can't switch screensaver

    When I open System Preference and then go to Desktop/Screensaver, when i select the screensaver button, it pauses and then the "application quit unexpectedly" window pops up. I reopen it, and it happens again, then I do it a third time and opens but

  • Need help restoring photos onto MacBook

    I have a MacBook Pro and recently had to erase and reset it. I have my laptop and iPhone connected to the cloud and plug my iPhone in regularly. I assumed all my photos taken on my iPhone  would be saved onto iCloud but when i restored the photos fro

  • SQL Loader mystery, OWB 9.0.4

    Can someone please explain this to me? In my generated control file (from OWB 904) I get the following lines: INFILE '{{LOC_SOURCE_FILES.RootPath}}DXMTFIL.435' "STR X'0A'" BADFILE '{{LOC_SOURCE_FILES.RootPath}}com_com_mt_stg.bad' INTO TABLE "{{LOCATI