Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bruno 30 posts 50 karma points
    May 25, 2010 @ 11:50
    Bruno
    0

    I can install any package or something that will read a pdf file in a flash viewer?

    I need read a .pdf file in browser but not in adobe reader or any pdf reader.

    I want that pdf will appear in a flash viewer, anyone have an idea?

    Cumps

  • stc 72 posts 101 karma points
    May 25, 2010 @ 12:04
    stc
    0

    My guess is you'll never get an answer :P

    And not because of asking the quesion 10 times (though that might be a problem too), mostly because this is hardly the section to ask this question.

    I think you need templating...AFAI, there is no such package/template yet, however you could make it yourself using some of the pdf viewers like flash flippingbook or sl wpfbookcontrol.

    Cheers.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    May 25, 2010 @ 12:09
    Lee Kelleher
    0

    Hi Bruno,

    I looked into this recently, I was going to use the following...

    Convert the PDF files into Flash movies using SWFTOOS - PDF2SWF: http://www.swftools.org/

    Then display the Flash movie using FlexPaper: http://flexpaper.devaldi.com/

    Its a manual process to convert the PDF to SWF, but if you find a better approach, I'd be happy to hear it!

    Good luck, Lee.

  • Bruno 30 posts 50 karma points
    May 25, 2010 @ 12:15
    Bruno
    0

    Thanks and sorry about 10 times question, but i click in submit and the page stay the same, so i thought that probably have an error and click many times, and the page always stay the same. I´m sorry

    and thanks.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    May 25, 2010 @ 12:18
    Lee Kelleher
    0

    No worries Bruno, all sorted now. :-)

  • Bruno 30 posts 50 karma points
    May 25, 2010 @ 12:18
    Bruno
    0

    Thanks Lee, but like you said it´s a manual process, and i have to find one way to do that automatically.

    But thanks anyway.

  • stc 72 posts 101 karma points
    May 25, 2010 @ 12:28
    stc
    0

    Or...I might be wrong...but only because Mr. Lee is such a great guy (and deleted your repeated posts)...

    However, I'd like this approach a bit more, first use something like http://www.pdfsharp.com/PDFsharp/ to convert your PDF to JPGs (an event handler could do it) and store them in a single media directory page numbered...

    Afterwards just use some page flipping framework like the aforementioned ones and maybe Mr. Hoehlers GetAllFilesInDirectory XSLT extension which I saw here somewhere (on this forum) pointed to the media folder which holds all of the page numbered JPGs.

    Or is that too much hassle? I'm not sure...what do you say Mr. Lee?

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    May 25, 2010 @ 12:49
    Lee Kelleher
    0

    LOL Mr. Lee! That's made my day! haha

    stc's suggestion would work too... there are a few other ideas, but depend on how public the PDFs are going to be (for my client they were very private).

    Adobe has an online PDF viewer, as does Google too? You pass it a URL to the PDF, and they display it, you embed it?

    I did look at TallComponents PDFRasterizer.NET, but the price was a little out of my client's budget.

    http://www.tallcomponents.com/default.aspx?id=pdfrasterizer2

    But it all comes down to whether you want to spend time or money, (or both) on a solution! ;-)

    Cheers, Lee.

  • stc 72 posts 101 karma points
    May 26, 2010 @ 11:46
    stc
    1

    Mr. Kelleher then :)

    However, I tried the pdf2swf and I must say it's a better professional solution then what I proposed. With it you get an extra perk of being able to search (by you or search engine) through your pdf documents in that pdf/swf preview mode. With my proposed approach you'll get jpgs from pdf (non searchable) with a visually pleasing page flipping experience, but no real professional usefulness, so swf is better for "lots of data" sites IMHO.

    I've rewritten an action handler (much thanks to the video thumb generator package:) so that upon your pdf upload you'll get a file with the same name as the original pdf extended by "_preview.swf"...I've tested it and it worked...except for a pdf which had a lot of images in it (that pdf2swf gave me some transparency layers error there) but for such pdfs I'd use page flipping anyway. Here's the source:

    void Media_AfterSave(Media sender, umbraco.cms.businesslogic.SaveEventArgs e)
            {
                Media media=sender as Media; //get uploaded media file
                string file_location = media.getProperty("umbracoFile").Value.ToString(); //get uploaded file location
                string file_extension = media.getProperty("umbracoExtension").Value.ToString(); //get uploaded file extension
                string file_path = Path.Combine(umbraco.GlobalSettings.FullpathToRoot, file_location.Substring(1)); //get the uploaded file physical location
    
                if (file_extension == "pdf")
                {
                    Process pdf2swf; // creating process
                    string pdfdoc;
                    string preview;
                    int mediaID = sender.Id;
    
                    pdfdoc = file_path; // setting video input name with path
                    //create preview path.. just insert _preview and replace extension with swf
                    preview = file_path.Insert(file_path.LastIndexOf("."), "_preview");
                    preview = preview.Replace("pdf", "swf");
                    preview = preview.Replace("/", "\\");
                    pdf2swf = new Process();
    
                    // -T 9 means swf version 9 compatible
                    pdf2swf.StartInfo.Arguments = "\"" + pdfdoc + "\" -o \"" + preview + "\" -T 9 -f"; // arguments !
                    pdf2swf.StartInfo.FileName = umbraco.GlobalSettings.FullpathToRoot + @"data\assets\pdf2swf\pdf2swf.exe";
                    pdf2swf.Start(); // start !
                }

    Now all you should have to do is make a template for your PDF media files, something that I really can't remember how to do (but it should be most basic stuff), it's due to a mental block I'm having these days (mostly caused by me not being able to setup properties being editable in Windows Live Writer) and I would be much obliged to anyone helping me with it (so I've even asked a question in this forum's templating section) -> HOW TO TEMPLATE MEDIA FILES (BY EXTENSION)?!? PLEASE :)))

    P.S.

    You'll also need to copy the pdf2swf.exe to the <your_umbraco_install>\data\assets\pdf2swf directory - which obviously won't exist - before you make it...

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    May 26, 2010 @ 12:03
    Lee Kelleher
    0

    Hey stc, nice snippet of code... I think I'll be making use of that soon!

    In answer to your media template code, I've replied over on that thread:

    http://our.umbraco.org/forum/templating/templates-and-document-types/9395-Template-media-files?p=0#comment34442

    Cheers, Lee

  • stc 72 posts 101 karma points
    May 26, 2010 @ 17:19
    stc
    0

    Hi Lee,

    Thanks for the reply, however I'm gonna have to polish up on my XSLT before I fugure out the errors I'm getting when writting your code, must also rethink everything...I wrote on the other post what I'm trying to make..but it might be a pipe dream (since maybe it can't be done by little ol' me:)

    Wish only I figured out the wlw manifesto first so I could devote my full attention to your code...properties (F2) is not possible to enable via content channel in windows live writter...just tell me it's not (cause I'm lost here:)))

    TIA

  • merryflip 6 posts 26 karma points
    Oct 09, 2012 @ 03:46
    merryflip
    0

    well, try to use flash magazine maker to create wonderful emagazine from pdf files for easy viewing! 

  • merryflip 6 posts 26 karma points
    Nov 21, 2012 @ 10:11
    merryflip
    0

    Thanks Lee, but like you said it´s a manual process, and i have to find one way to do that automatically.

    Is this a manual process? Or maybe a software can solve the problem,

  • sharryhou123 1 post 21 karma points
    Jan 05, 2013 @ 09:40
    sharryhou123
    0

     well, I have some experiences to share.

    I recommend a simple tool 3D page flip converter. I think it’s quite suitable to you because the output book can be published directly with HTML format and you can read via a browser without install any other program like adobe reader or any pdf reader you mentioned. Actually, I quite satisfied with its animation effects because it vivid PDF with 3D effect. Really fantastic!

  • Nigel Wilson 944 posts 2076 karma points
    Jan 05, 2013 @ 19:30
    Nigel Wilson
    0

    Hi Bruno

    Just to throw another idea into the mix (altough I like the pdf2swf idea) in my day job we use issuu.com for virtual pdf rendering.

    There is a cost associated, but if budget permits...

    So on our sites, we upload the PDF to media section. Then we add node in the content tree (specific document type).

    We have added functionality to the site that then sends the PDF to issuu.com (via their API) and we get back the document ID.

    The resulting output on the page then provides for both download of PDF and online viewing of the virtual PDF.

    One advantage of this too is that  issuu.com provide a couple of options for displaying the virtual pdf - flash based (not compatible with ipad) and non flash based. This may / may not be an important consideration for you.

    Cheers, Nigel

  • merryflip 6 posts 26 karma points
    Apr 07, 2013 @ 10:35
    merryflip
    0

    when it comes to converting the PDF files into Flash movies, we would highly recommend the xflip digital publishing software to you, which allows you to convert portable PDF documents into fantastic Flash SWF files

Please Sign in or register to post replies

Write your reply to:

Draft