Your Ad Here

Wednesday, April 1, 2009

Few more things added

Hi all,

I just put some more options into the viewer and fixed some issues.

New features 1.04.2009

  • Text selection holding Shift Key
  • Document scrolling while selecting if view area is smaller than document zoom.
  • Fix: Prevent action on top buttons while selecting/scrolling.
  • Print capabilities;
Check the svn server for updated version

46 comments:

Unknown said...

Awesome work!

I just converted a large LaTeX document using pdf2swf and this view does a very nice job of displaying it. The inter-document hyperlinks even work! A couple of issues I noticed:

-Text selection is very hit-and miss, it seems like the viewer is confused as to whether I want to pan or select when I am holding shift. Maybe a dedicated text selection mode selectable from the tool bar would help?

-When an inter-document hyperlink is followed, the page number doesn't update automatically. For example, using a link from page 4 to page 15 will result in the correct page being displayed but the viewer thinks that page 4 is still the current page. If the next page button is used, page 5 gets displayed instead of page 16.

I really wish I didn't have the end of the semester staring me in the face or I would roll up my sleeves and try to help polish up some of these features myself!

Keep up the good work!

-Charlie

Crirus said...

Why don't you send me the document so I can test what you're saying ...
At this point, I am considering upload/open feature so anyone can pud documents up for demo.

Crirus said...

I noticed what you mean there, it seems I need some more time spent on select vs. pan flag to make sure it works smooth. However, if you first press shift then start dragging, select is fine, the issue seems to appear when you start panning, then press shift .. at this point, bug show up.

Hope to get sometime next week to fix

Unknown said...

Hi Crirus,

The selection is actually working- it's just not visible. Same with search highlighting- it detects the correct number of matches on each page but doesn't highlight them.

I suspect this is probably a result of the way pdfLaTeX generates pdf files and the large amounts of trickery involved with this particular document.

The file in question is part of a group project for an Environmental Impact Assessment class. If you are interested, a copy of the pdf and swf generated with pdf2swf can be downloaded from:

http://github.com/Sharpie/baydeir/tree/swfDemo

Cenna said...

Thanks for your good work.
One thing I couldn't figure out was how to combine zviewer.swf with another swf file as viewport. I mean exactly like simpleviewer or frxview in swftools that one can use swfcombine command and give 'viewport=thefile.swf' and then it combine both into a single swf file with navigation ability.
I want to upload the file into a mediawiki site then.

Thanks

Crirus said...

@Cenna, I never thought of the viewer like the other ones, I built this just to go separate in a browser and let load swf documents from a server. I still use swf as the name of internal movieClip maybe swfcombine will replace it just fine, never tested

Khánh Đỗ said...

Hi, thank you for this project. In my site, I converted ppt slide file to pdf and swf, how I can create a viewer that fit with my slide?

Unknown said...

I just modded your viewer to have some different icons.. Actually ripped the ones from the real Adobe reader, that makes it look a whole lot better.

Can't you include some free toolbar icons instead of the flash ones?

For those who want to replace the toolbar icons themselves: What i did was the following:

* Download Adobe flash CS4
* Download sources from svn
* Cut-n-paste some icons from pdf viewer
* Open each button and drag every icon over the current button so that it's covered.

Vwalla :-)

See how it looksDownload pre-cut-n-edited icons (for private use only ofcourse ;-) )Oh yeah did i mention Zviewer is *awesome* ?

Anonymous said...

HI
Great work! how do you make the swf use up 100% width and height?

i tried this below and got a blank screen!

swfobject.embedSWF('zviewer.swf', 'website', '100%', '100%', '9.0.45', 'swfobject/expressinstall.swf', flashvars, params, attributes);

Cheers,
Mr G.

EDIT - ah found some help on http://blog.deconcept.com/swfobject/fullpage.html

cheers

Crirus said...

@SchizoDuckie, do you have a live demo with new buttons to see the actual highlight on hover and stuff?

Thanks

[VJ] said...

You have done an excellent job.And you have save my time.
I am very thankful to you

Regards,
Ali Vajahat
Software Engineer
Software Innovations
Lahore ,Pakistan

Crirus said...

if any one can suggest how to add tile view for the pages, I will jump in and code that asap.

Unknown said...

Hi,

I found a bug in the javascript, swfobject.js

The script does not work with flash player 10.

Ishu said...

any one in for the tile view?

Unknown said...

Hi, is there some way to open the converted file (pdf2swf) on other then the first page? I really need it and nobody knows how to do it.

Example:
I have some page list on the web:
Titles:
page1
page2
page3

and when I click on page2, it should open the SWF on this page.

Is this possible? Thanks very much and sorry for my english.

Crirus said...

not added in this version but I guess it's not hard to put a parameter in the open URL and jump the viewer to specific frame same way you can do with page input at top.

Unknown said...
This comment has been removed by the author.
Unknown said...

Hi again,
thanks for this tool, it's really useful. I have just two problems with it: fullscreen mode is great but you cant go to next page just by pressing some key because its linked to page up and page down and these are blocked by flash player. Could you bind for example spacebar to NEXT PAGE function? It would be great. And then I think I've found a bug - you cant insert number zero into page number form.
And is there some option to hide search form? Thank You

Unknown said...

There is an extra "," on line 16 which shows error for the index html page and the live demo page on IE.

I downloaded the code and tried it but the whole page flickers badly and test swf size is bit bigger then zviewer swf.

I'd really appreciate any help on this.

Thanks

Crirus said...

I removed that extra comma.
As far as size, the document is not to be the exact viewer size, there are controls and modes to zoom in or out the pages.

As far as flicker, you mean while loading?

I never tested on extra large swf like 100 pages or so...

Unknown said...

Thanks for replying to my earlier question.

I got the flick effect when viewed the html page directly in the browser, but then I copied the html and swf files on webserver it worked okay.

It looks good now.

I've one more question. I was checking the search functionality. It seem to work fine on the live demo page. It shows the searched word in yellow background. But for my file I got the number of result next to the search button but the yellow background effect did not work. I'm using pdf2swf to convert the pdf files to swf. Any clue? Any specific part of code I should look into ?

Thanks.

Crirus said...

Try converting using -t -T 8 when converting, it's something about searchable text in pdf2swf manual.

Unknown said...

Hi,

I used -t and -T 8. But still no luck with the yellow background color for the searched text.

I get the count though.

Hmmm any more clue

I really appreciate your help.

Thanks

Unknown said...

-f -F worked

http://wiki.swftools.org/index.php/How_do_I_highlight_text_in_the_SWF%3F

thanks

Unknown said...

Thanks for your good work.
How can I create my own viewer. Would you send me some tutorials for that.

my email id is: mytestjabber@gmail.com

Unknown said...

Hi there!

I used your viewer to create Wordpress Plugin, also i changed buttons, i hope you'll like them.

plugin url: http://rusterra.com/wordpresspdf/

Crirus said...

Looks cook, nice buttons.

One thing though, the page count is missing somehow.

Unknown said...

>One thing though, the page count is missing somehow.

my bad, i accidentally changed textbox color to white, so it was invisible :)

fixed.

Brian said...

Hi Crirus,

Your viewer is terrific! Thanks for the great update to rfxview. I have a small obstacle in using it that perhaps you or other readers of this blog can help me to understand. I'm just getting started with Flash...

I'm using PDF2SWF, version 0.8.1 (I can't get 0.9.0 to compile on Fedora and cannot find a repository for a prepackaged version.) The SWF files generated thereby appear correctly when linked to a viewer--that is, they appear inside of the viewer and respond to the viewer's paging controls.

However, when I try to view the raw files (not including the linked viewer) through ZViewer, my SWF file appears on top of ZViewer and though the zoom buttons work (they can be clicked 'through' the overlying SWF), the paging buttons don't.

Your test file (test.swf) works fine in my implementation of ZViewer (which uses SWFObject identically to your implementation on your demo page.)

Any idea what I'm doing wrong?

Thanks in advance,

Brian Howell

Crirus said...

What is your converting command line?

Unknown said...

I am having issues while printing, I want the document to print, filling the entire page. Right now it prints filling only about 2/3 of the page on a grey bg.

I am a php developer, so flash is new to me.
Could someone please lend me a hand?

am I even trying to edit the correct file? (zevent.as)

Many Thanks!

Unknown said...

Ok so I got it to work, but only in Adobe Flash Editor, not in a real browser.

my code:

swf.width = pj.pageWidth;
swf.scaleY = swf.scaleX;
printArea = new Rectangle(0, 0, pj.pageWidth/swf.scaleX, pj.pageHeight/swf.scaleY);

then in the while loop i change:

pj.addPage("swf");

to:

pj.addPage("swf", printArea);

any help would be great!

Martin Ostrovsky said...

Hi,

First off, great tool. Easy to use. Thanks for putting this together for us to use.

I'm trying to remove the scrollbars (both vertical & horizontal), but can't seem to do it. I removed the layers from the .fla file and I commented out some code from the action script files, but I still see them. By "them", I don't mean the actual scrollbars but an outline of the space that would normally be occupied by the scrollbars. Hope that makes sense.

Any ideas?

Crirus said...

In zUtils.as, go to line 211 and comment all block to line 231

That will remove the droawing lines for the scroll area.

Unknown said...

added some things during wordpresspdf development, maybe useful

/* zutils.as */

/* ***** here **** */
stop();
setPageNr = function ()
{
et.text = pagenr + " / " + swf._totalframes;
swf.gotoAndStop(pagenr);
topOfPage();
_root.my_snap = swf.getTextSnapshot();
hltext(st.text);

};

topOfPage = function (){
swf._y = top;
swf._x = left;
swfpos2scrollbars();
}

/* ***** end ***** */

Crirus said...

Thanks for the update, added to source in svn

Monkiki said...

When zviewer loads a (large) document from a remote server there is a progress meter which shows the load percentage. This is ok.

Once loaded, zviewer seems to show all the document pages very quickly and after that, the first page is shown. How can I avoid this? Is a very ugly effect.

Crirus said...

Check the new svn version, the page flicker is fixed. Rebuild the sfw to use it.

Monkiki said...

There is a zviewer.swf in the SVN repository. This one includes the last modifications or do I need to compile from source. By the way... How can compile it? I'm on Ubuntu Linux.

Crirus said...

the updated swf is there, I have no idea of Linux Adobe Flash builder

Unknown said...

monkiki, check here http://osflash.org/projects

Monkiki said...

Thanks Alex!

Unknown said...

Hi Crirus,

I'm just a beginner in flash, I want to know how to load my swf(created from pdf using pdf2swf). How to make it searchable in your great zviewer.

hope your response.
Kaushik

Crirus said...

Why don't you just download the source code from svn and se how it works, I had it split in to several classes so you don't have to search through flash components code

Dave C said...

I have two questions/requests:

1. I want to embed my SWF inside of a content text block and not on its own block. Can i do that?

2. How do i get rid of the controller box around the SWF file?

Thanks.

Dave C said...

I have two questions/requests:

1. I want to embed my SWF inside of a content text block and not on its own block. Can i do that?

2. How do i get rid of the controller box around the SWF file?

Thanks.