Fixing your personal web server after upgrading to OSX Yosemite

This is not related to FlexPaper but thought we’d share this with other developers since some of our users just upgraded to Yosemite and we think many others may have this problem.

If you have just upgraded to Yosemite and you are using the apache personal web server in OSX you may have noticed that your personal directory isn’t available any longer. To help you out we decided to post some notes on how to get this working

1. Open your /etc/apache2/httpd.conf in a text editor
uncomment the following line
#LoadModule userdir_module libexec/apache2/mod_userdir.so
#Include /private/etc/apache2/extra/httpd-userdir.conf

2. Open /private/etc/apache2/extra/httpd-userdir.conf in a text editor
uncomment  the following line
#Include /private/etc/apache2/users/*.conf

3. Make sure you have a /private/etc/apache2/users/(Username).conf file
also make sure that its contents looks like so:

<Directory “/Users/(Username)/Sites/”>
Options Indexes MultiViews
AllowOverride All
Require all granted


The “Require all granted” is important since apache has been upgraded to version 2.4 with Yosemite

FlexPaper 2.2.9 Release Notes

We have started rolling out version 2.2.9 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)

Changes worth mentioning in this release:

  • Issue fixed related to collaborative annotations where the notes property of marks would cause a javascript error in certain configurations.

  • Our HTML4 and HTML5 rendering modes now feature full support for printing annotations

  • Improved fallback mechanisms for desktop publisher on problematic PDF documents

  • Our HTML5 and HTML4 viewers now support dragging in annotations mode with correct cursors

  • Fixed an issue where links were incorrectly positioned in html5 mode after resizing the browser

  • Fixed an issue where the author name of a note in the annotations viewer was unintentionally repeated

  • Fixed an issue where the ’ character caused an error in the annotations viewer

  • Fixed an issue where the confirmation dialog deleting an annotation appeared twice

  • Fixed an issue where documents with upper and lower case characters of file extensions were ignored in asp.net

  • Del key keycode now working to delete annotations in the annotations viewer

  • The HTML5 and HTML4 viewer now exits full screen if fullscreen button is pressed in full screen

  • Issue fixed where IE was causing a unintentional repeat of the author name in the annotations viewer

  • Improved full screen sizing for the HTML5 / HTML4 viewer to avoid cutting the toolbar off in certain sizes

  • Search panel adjusted to avoid covering the annotation tools

  • Fixed an issue wher the refreshMarks method wasn’t clearing out old annotations properly in HTML4 and HTML5 modes.

  • Fixed an issue where it wasn’t possible to set focus on the search text field in the customizable build for annotations

  • A number of minor issues corrected in our HTML5 and HTML4 annotations viewer

  • You can now add phone numbers to your publications in FlexPaper Desktop Publisher

  • New event triggered in FlexPaper Zine when a user clicks one of the social share buttons (“onSocialMediaShareClicked”) with the name of the social media as argument

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:


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:


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:


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


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.


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.


(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


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:

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 :


  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

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 

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:


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.