flexpaper

This weeks summary of questions and answers

Question : How to trigger a javscript function when we click on print icon.

Answer : There isn’t any event triggered by us when the user clicks the print icon but there is a onDocumentPrinted event that gets fired when the document has completed printing.



Question : Going back to the last page viewed when the reader is opened for the second time

Answer : Yes its possible but you will need to save the information on your server (which page the user left the publication on). You can do this by attaching a event listener to the onCurrentPageChanged event and then reopening the publication by passing the last page number to the StartAtPage parameter.

You can see how to bind to this event if you open the flexpaper_handlers.js that we supply



Question : How to Set UIConfig? How to set UI like Whitepaper ?

Answer :

The easiest way of using UIConfig is by using our desktop publisher. You can set it manually in the following way:

UIConfig : ‘UI_Zine.xml’,



Question : Hello, how to open the JPG format image using FlexPaper Zine? Thank you

Answer : Yes you can load JPEG files in the following way:

http://flexpaper.devaldi.com/Convert-PDF-documents-to-HTML4.jsp



Question : Hello, I am from China, I want to know how to get software after purchase?

Answer : Our software is delivered via our web site. You will get access to our commercial download area after you have completed your purchase where you can register your domain and download all builds we supply.



Question : I want all my clients to use our site to open the document

Answer : 1) Yes all clients can open your uploaded documents on your domain.

2) Yes, our Zine viewer has a sharing dialog window that your end users can be used to share the document on social networks

3) A 1-domain license can only host documents from your domain. You are fully free to let other web sites use the API on the viewer published on your domain.



Question : Server Annotation

Answer :

1- Yes it is saved on the server. We supply a sample with a database that stores the annotations to all our commercial annotation builds

2- Yes you can choose to use the collaboration mode which will show who created the annotation. Turn it on in the following way:

UserCollaboration       : true,
CurrentUser             : ‘A user’,



Question : I have added the Google Analytics code to my publication, but pageviews are not showing up in Events reporting.

Answer : It could be that you have a blocking javascript or a conflict that is preventing the tracking - contact us via email and supply us with a url to where you have deployed the viewer and we can have a look at your configuration



Question : How to integrate flex paper

Answer : We don’t have a tutorial for the Spring framework unfortunately but we do supply full source code to our java JSP example files which you can use to convert your documents



Question : Events for Social media

Answer : We have added this to our request log - follow up next week via email and we may be able to provide you with a prerelease with this included (info@devaldi.com)



How to convert pdf documents to png and jpeg using node.js

We have had a few people ask us about how to convert PDF documents using pdf.js and node.js to JPEG or PNG, so we decided to post a quick example of how this can be done using node-webkit. 

We have made the example including source code available on GitHub under Apachev2. You can find it here:

https://github.com/flexpaper/pdfdraw

This weeks summary of questions and answers

Question : How to print content of flex viewer using asp button in client side using javascript ?

Answer :

$FlexPaper(flx).printPaper(‘current’);  should work fine for printing the current page. As should $FlexPaper(flx).printPaper(‘1-3’); if you want to specify a range or $FlexPaper(flx).printPaper(‘all’); for all pages. 



Question : Online PDF-VIewer. Disallow PDF-Download. However dynamically allow / disallow Printing.

Answer : You can accomplish this in either of our viewers - I would recommend downloading the desktop publisher for zine. Make sure the download button isn’t enabled before exporting your publication.



Question : How do I switch between Tile and Flipview switchmode?

Answer : It will bring the user to the viewing mode that you have supplied in the “InitViewMode” parameter.



Question : Automate the process

Answer : You can automate the process by converting the documents using the command line utilities we recommend. Have a look in our documentation section under manual conversion. Feel free to ask us any questions via email if you can’t figure out how to convert parts of the document



Question : Zine viewer some documents initially show right page blank

Answer : Sounds like this could be a configuration problem - send us the url to where you have deployed your viewer and we will have a look (send it to info@devaldi.com)



Question : We want to disable copy/download of the pdf but allow printing?

Answer : Use our desktop publisher to publish your document, simply make sure the download button isn’t ticked when publishing your document.



Question : Why isn’t the PDF2JSON installation working properly on CentOS?

Answer : Hello, the way to solve this problem is to provide the path to pdf2json which is: /usr/local/bin/



Question : The getMarkList() method returns a empty list when it only contains area or text notes, what am I doing wrong?

Answer : Sounds like a configuration error - we did have a bug related to note marks not having their note property properly populated for some scenarios in some of our previous builds but its fixed as long as you download the latest build we have in our download area.

Supply us with a url to where you have deployed the viewer and we can have a look at your configuration. Send your details to info@devaldi.com

This weeks summary of questions and answers

Question : How do I enable cross domain ajax requests originated from flex paper ?

Answer : If you’re using the html5 viewer then you need to enable CORS on your server to make this possible. Have a look in our Q&A and search for CORS and you will find multiple responses on this.



Question : Is it possible to create a menu of the magazine contents populated by bookmarks in the pdf?

Answer :

We don’t automatically populate any bookmarks section outside of the viewer but its easy to add your own bookmarks outside of the viewer and then simply linking to each page by calling:

$FlexPaper(‘documentViewer’).gotoPage(123);



Question : Change single page mode to two page mode when tablet is rotated?

Answer : Its unfortunately not switching to single page automatically when turning a tablet, but its a great idea! I have passed this on to our devs!



Question : Is there extracting image tool about PDF page?

Answer : You can use mudraw in the MuPDF open source package to convert pages to images, you can also use pdftocairo to do the same. There are multiple similar open source tools



Question : Converting documents manually using the command line or via php script?

Answer : You can convert by either command line or by using one of our php scripts. If you want to convert documents manually then I recommend having a look at our documentation under “manual conversion”



Question : Can I use the wordpress plug-in with Zine?

Answer : Yes you can use the same wordpress plugin with Zine



Question : Problem displaying PDF as HTML5

Answer : Sounds like some scripts may be missing - contact us via email with a link to where you have deployed the viewer and we will have a look



Question : What does forceSinglePage allow and what version of the web product supports it?

Answer : Its a parameter you can set in the UIConfig file that you pass to Zine if you want to force the single page mode to all browsers (not just iPhone). It works with the html5 rendering mode. Search our Q&A for examples of how to set  it



Question : Initial zoom-level set to below 50%, annotations only become active on zoom

Answer : Sounds like it could be a conflict in your parameters - contact us via email and include a link to where you have deployed the viewer and we will have a look



Question : Mobile repeated number of pages (¿?)

Answer : Not sure sounds like it could be a conversion issue - how did you convert your document? Feel free to include a link to where you have published your document



FlexPaper 2.2.8 Release Notes

We have started rolling out version 2.2.8 today. We will first be updating our classic and annotations viewer and will be updating the zine viewer in the next few days.

How to update:
This release does not require you to republish any of your documents so if you want to install the update without republishing your documents then simply copy and replace the following resources from the distribution file that you are using:

  • FlexPaperViewer.swf
  • js/ (directory)
  • css/ (directory)


Significant changes in this release:

  • Fixed an issue related to twitter modal windows conflicting with the modal window rule in flexpaper.css

  • Ability to disable and enable page shadows in Zine publications added to desktop publisher for both Flash and HTML5

  • Fixed an issue where the Reply button wasn’t initially fully visible in flash mode when using collaborative annotations for some zoom levels

  • Fixed an issue where the tooltip wasn’t correct when using the flash annotations viewer in collaboration mode

  • Fixed an issue where printing the current page in flash mode would hide the annotations after completion

  • Fixed an issue where the reply button would be visible in print when using collaborative annotations in flash mode

  • Improved publishing speed in desktop publisher

  • Fixed an issue where minimising an empty annotation in flash mode would cause an incorrect dialog to appear about deleting the annotation

  • Performance adjustments for desktop Safari on OSX (HTML5 mode)

  • Improved mouse wheel scrolling support for FireFox and fixed an issue where mouse wheel scrolling in Chrome version 36 and higher would cause the viewer to get out of position

  • Corrected an issue where the drawing cursors were not enabled in the annotations viewer for MSIE 10 and higher

  • New method: refreshMarks method to the annotations viewer. Refreshes all annotations on all visible pages (accessed using $FlexPaper(‘documentViewer’).refreshMarks())

  • Printed range added to the onDocumentPrinted event

  • Fixed an issue where differently sized pages would not load properly in HTML5 single file mode

  • Fixed an issue where the drawing color wasn’t being set properly in the annotations viewer when using sticky mode

  • Fixed an issue where the annotations viewer was not including note property properly in onMarkCreated and onMarkChanged events for some scenarios

  • Fixed an issue where the android soft keyboard was not hiding properly when leaving focus on text notes in the annotations viewer

How to create a page flip publication on PC

 I have previously blogged on how to publish your digital publication on a Mac. This week I will focus on how you turn your PDF to an online publication using FlexPaper desktop publisher on a PC.

The only real difference between publishing your document online using FlexPaper on a PC compared to a Mac is the setup of Flexpaper on your computer.

Start by download the installation files for FlexPaper Desktop Publisher.You can find the file here

image

Start the setup then tick the terms and conditions box and click the install button. The installation script will start and within one minute your configuration is finished and you are ready to go.

image

Yep, that’s how easy it is!

The first time you save an edited digital publication, FlexPaper will create a folder in your documents folder. FlexPaper then saves your publication every time you hit the publish button. The automatically saved publication can be found in the same folder under a subfolder with a corresponding name as your PDF document name. 

I want to finish of with a few words on what I have done on this example blow (just click the image to open the example in full). I have chosen a recipe publication as I love cooking myself and this publication example is packed with mouthwatering creations.

image

(click on image for a live example)

 - I customised the background to tie in with the publication. FlexPaper will proportionally stretch you image to fit your background no matter what the device you are viewing the publication in, just make sure you tick the option box when you are importing the image. 

- I customised the toolbar color with a nice contrasting black. 

-  I added a social sharing link to one of the recipes because it was too good not to. The social sharing option does come as default in the toolbar menu so make sure you activate the button under the toolbar menu if you want to add this feature. 

Happy cooking

Camilla

FlexPaper team

This week’s Q&A snapshot

Question : How can i display the converted PDF-documents in Browser?

Answer : Looks like something isn’t right in the conversion - perhaps a permission problem. Are you hosting this on a Windows or Linux server? We typically recommend the ASP.NET scriptsi on Windows and the PHP scripts on Linux. Contact us via email and we’ll help you investigate further



Question : Display One Page at a time - forceSinglePage

Answer : Have a look at this Q&A post:
http://devaldi.com/FlexPaper_QnA/?qa=762/one-page-flipping-mode-mobile-on-desktop&show=776#a776

The same syntax as described for the <mobile> element can be applied to the <desktop><general> element from version 2.2.7



Question : Can you link directly to a single page in a multi-page PDF?

Answer : yes absolutely. You can use our API like so: $FlexPaper(‘documentViewer’).gotoPage(55) or using a config file if you use our desktop publisher for Zine.



Question : PDF with Landscape and Portrait

Answer : You can run mixed size pages in portrait mode but the two page flip mode only allows one size of pages (otherwise some pages would be too small to be clearly visible and in other cases too large to fit the viewer)



Question : TypeError: $(…).FlexPaperViewer is not a function

Answer : Looks like not all javascript files were included after all- feel free to send us a url via email and we can help you have a look



Question : Are page up and page down supported in split mode?

Answer : yes it is supported accross the modes



Question : Customising UI toolbar

Answer : You can download our customizable version from our commercial download area. It allows the toolbars to be fully customized using CSS and HTML.



Question : Is there any way to get current zoom level or scale value?

Answer : We don’t have any API method for this unfortunately but may be able to add this for you. Contact us via email for a follow up



How to print content of the viewer form using outside print function ?

Answer :

Hi

  I am use Master page for one aspx page,in that i use iframe,in that iframe i call the flex viewer page,so how to print content of the flexviewer .Below is my code how get the flex viewer id in javascript

First i have master page for aspx in that i use iframe so here i get iframe id first 

  var vframe = document.getElementById(“ContentPlaceHolder1_viewframe”);

Here flex  viewer id ,documentViewer is my flex paper id

  var flx = vframe.contentWindow.document.getElementById(“documentViewer”);

And file i try for print in follwing ways

   flx.printPaper(‘current’);
or
    $FlexPaper(‘documentViewer’).printPaper(‘current’);
or
 flx.printPaper();
 
None of these above work,so pls tell me how to print viewer content form our own button click event in javascript.
 
Note: i am use master page and iframe,in iframe i call flex viewer page.
if i try to print form without master page and use this line in javascript can print 
    $FlexPaper(‘documentViewer’).printPaper();
 
Regards
   Aravind



Question : Wordpress Integration - how to open Flexpaper in new Window?

Answer : There is no such option unfortunately - we may be able to help you further via email or incorporate this as a parameter to the viewer. Contact us at info@devaldi.com for further discussion



This weeks summary of questions and answers

Question : Wordpress Integration - how to open Flexpaper in new Window?

Answer : There is no such option unfortunately - we may be able to help you further via email or incorporate this as a parameter to the viewer. Contact us at info@devaldi.com for further discussion



Question : Does FlexPaper have any Ruby bindings?

Answer : We have some samples ready for Ruby but we have not yet updated these to be fully compatible with our latest build, we’re happy to send these to you though. Contact us via email and we’ll send you the samples



Question : How to remove print,download button individually in viewer for html ?

Answer : You either have to download the read only package (from our commercial download area) if you want to use our web server package or you have to tick the “Read Only” option in our desktop publisher



Question : Are there any keyboard shortcuts for the online document viewer?

Answer : Yes our classic viewer supporst page up, page down and both our viewers support left and right navigation using the keyboard arrows



Question : How can I had a logo in the top of the page?

Answer : You can add a custom button which has your logo as graphics. Search for custom button in this Q&A and you will find multiple answers to this



Question : Define PDF Url for each page?

Answer : Not at the moment unfortunately, I am not even sure how that would be specified, perhaps with a array of urls to each page?



Question : annotation: double or dribble click on text

Answer : Double clicking could absolutely be added - I have added this to our feature request list - follow up via mail for a new build!



Question : Flexpaper cross domain support is not working using the latest version.

Answer : Have a look at this answer:

http://devaldi.com/FlexPaper_QnA/?qa=470/im-not-able-to-load-a-file-from-amazon-s3



Question : Does Flexpaper support Internet explorer 8?

Answer : FlexPaper supports IE8 but you will need to supply the IMGFiles parameter and the JSONFile parameter to the viewer to support lower versions of IE. You can find a browser compatibility page in our documenation



Question : Pre-generate data from batch file

Answer : Have a look at our documentation and you will find how to manually convert to these formats. You can easily create batch scripts with the commands we recommend for each format.



This weeks summary of questions and answers

Question : publish 100 pdf files as html5

Answer : No need to convert anything if you just want to publish them in HTML5 mode. We render to html5 directly from a PDF file. If you want to convert to html4 or flash in a batch then I recommend having a look at the “manual conversion” documentation section in our docs



Question : can we delete print and copy action in zine with commercial license?

Answer : Yes you can, all our commercial clients are given access to a read only build in where copy and print has been disabled



Question : How do I add a custom element and download link to my publication?

Answer : The question around buttons has been answered before. Please see the following thread:
http://devaldi.com/FlexPaper_QnA/?qa=655/how-to-add-an-extra-button-in-flexpaper-zine

You can add a download link to the pdf document by ticking the download button inside desktop publisher (its right hand side)



Question : Can we use zine viewer unbranded?

Answer : You can indeed. The Zine viewer is unbranded when you are using a commercial license.



Question : gotoPage() API method

Answer : Not quite sure why it would do this - please forward the url you’re using to our email address (info@devaldi.com) and we’ll inspect further.



Question : Set custom urls for each page?

Answer : You can create custom urls for your pages if you use our desktop publisher for Zine. It defines a configuration file which can contain your own url’s. No need to know anything about javascript.



Question : Only one zoom level? Not enough for phone/tablet.

Answer : You can add further zoom levels by expanding the advanced settings in the publishing dialog in desktop publisher and ticking the “Optimize publication for low memory / CPU devices using PHP”. This will add further depth to the zoom.



Question : Is it possible to disable mousewheel zoom?

Answer : I’m afraid this is not currently possible. We have added this as a enhancement request



Question : Why won’t the folder with my flexpaper document appear in Filezilla?

Answer : Not sure why it wouldn’t show up in FileZilla - perhaps you can post a few screenshots of what it looks like? The folder has no special attributes so it should show up fine



Question : gotoPage() API method

Answer : Its probably better to place the gotoPage call in the “onDocumentLoaded” event handler as opposed to the onPageLoaded event handler. A reason for this is that if you load the document in two page mode then the viewer may trigger that it has navigated to page 9 if that is the left hand side of the page even if you are triggering gotoPage for page 10, so this could confuse things for your script.



FlexPaper 2.2.7 Release Notes

We have started rolling out version 2.2.7 today. We will first be updating our classic and annotations viewer and will be updating the zine viewer early next week.


How to update:
This release does not require you to republish any of your documents so if you want to install the update without republishing your documents then simply copy and replace the following resources from the distribution file that you are using:

  • FlexPaperViewer.swf
  • js/ (directory)
  • css/ (directory)


Changes in this release:

  • Regression issue fixed where the viewer wouldn’t download the full publication in some scenarios even if provided (Zine)

  • Issue fixed where the hide/show annotations were not calling hide/show properly in the customizable annotations build

  • 'forceSinglePage' will now work on desktop as well as mobile mode of the html5 viewer. Please note that the bottom thumb nails will not be visible with this turned on.

  • FlexPaper classic flash version will now use the supplied JSON file (if any) to generate links with better accuracy. It will also precache JSON files to improve search speed

  • Correction where onCurrentPageChanged didn’t fire properly on touch based devices when using the page number input box

  • Further checks added to next() and previous() in the HTML5 viewer to avoid spamming with events

  • Corrected an error related to displayFormat not being set properly when creating associative annotations

  • Improved checks for avoiding asp.net to fork too many processes in split mode

  • Improved the ability for Safari on desktop to zoom using transform scale in HTML5

  • The aspnet package for our annotations viewer has been updated and a few issues fixed

  • Alternative export option added for images in desktop publisher. It uses the SWF file format to export to PNG. Enable it under the conversion settings in desktop publisher

  • onPageLoaded event added to the HTML5 viewer

  • Improved responsiveness to the toolbar in the annotations viewer for small touch devices (such as the iPhone)

  • Issue fixed where IE10 and below would draw associative lines in HTML5 mode for the annotations viewer incorrectly

  • Fixed an issue where onMarkDeleted was not triggered when using the api for the HTML5 annotations viewer

  • Further checks added for new annotation marks being added to the HTML5 viewer in order to avoid duplicates in very specific scenarios

  • Added a missing swfsize query script for our ASP.NET annotations set up package

  • Fixed an issue where the HTML5 viewer would return the note in note marks as a XML object as opposed to a string when using collaborative mode

  • Fixed an issue where some annotations would not update properly in HTML5 mode when using the ASP.NET sample scripts

  • Fixed an issue where collaborative annotations were not recreated properly in HTML5 mode for some server side scripts

  • Fixed an issue where marks in collaboration mode would sometimes cause a jQuery error to be thrown

  • Improved sharpness of HTML5 rendering in both Classic and Zine

  • HTML5 rendering routine updated (version 1.0.441 build #0ac8380)

  • Issue related to using odd number of backslash characters in flash mode of our annotations viewer fixed

  • Issue related to the print and cancel print button of our html5 viewer fixed where it would cause incorrect navigation in some scenarios

  • Issue fixed where StartAtPage was not passed through properly in the Flash customisable classic viewer for some scenarios