i3Factory World

Your Iphone, iPad & Android Application Factory

Browsing Posts tagged pdf

HTML(5) Approach
The final technique is something that is emerging now, especially thanks to the great improvements in term of stability and speed introduced by the latest version of iOS for the in-app web views. A couple of good examples of this approach are the Ars Technica app (link) and the Bloomberg Businessweek+ magazine (link).

The concept is quite simple: html and css are common and powerful techniques to layout a page on screen: why not leverage the skills developed by many web designers to make a magazine that perfectly fits with the iPad?
The core block at the base of this approach is the UIWebView Cocoa Touch object: with this view we can load any kind of html document, loaded locally or remotely, and layout it in the page at an adequate speed (but not the fastest) and without surprises. Besides we can get rid of the overlay
technique, as the web view is capable of displaying images, playing movies and of course execute javascript based widgets. Also this component provides a two way interaction between the javascript world and the objective-c runtime (and in fact this justifies the existence of extension languages
such as Objective-J, provided with the Cappuccino framework: http://cappuccino.org/). Finally the web view is highly respondent to user interactions, and some features like text selection and dictionary lookup come for free.
The open-source world is highly active in this area: projects like Baker (www.bakerframework.com), Siteless (www.siteless.org), Laker (www.lakercompendium.com) and pugpig (pugpig.com) make publicly available this kind of solution.

Sincerely we don’t know if this will be the final solution for everybody. Of course a publisher that already invested in setting up a web site (but not in Flash!), and this is quite common between newspapers, will be able to port most of the layout and contents to the iPad, and sometimes this can
be achieved with an adaption of the CMS output views to provide files that can be easily fed to the app.

Careful must be given to don’t push this behavior at its extremes: don’t forget in fact that web page rendering requires an inner engine and at the end any intermediate layer will require resources and extra time. Sometimes, and this is particularly evident with the first generation of the iPad, content
updates following user interaction are not very reactive. So it is not recommended to transform every single aspect of the magazine app into web based content: clearly in this way you’re helping all javascript developers not skilled with objective-c, but
a performance penalty will be visible.

As an example, the toolbar typical of all magazine apps used to access extra features (sharing, table of contents, home page, etc.) should always be done using the native Cocoa Touch component and not an html+css solution.

However if the publisher accepts to convert his design flow to a web based one and you, as developer, prefer to base your work on consolidated and easy to manipulate methodologies, this one should be your first choice to be taken in consideration.

Conclusions
We hope this article gives a good overview of the major techniques used to render pages in a magazine, newspaper or e-book. It could be we have not mentioned some technique we’re not aware of, in such case dear reader any feedback from you is welcome!

About the author: Carlo Vigiani
He is an electronics engineer and software developer, located in Italy. He is CTO and co-founder of new startup i3Factory.com, active in the development of iOS, Android and Win Mobile apps, with special focus on publishing, tourist and music apps.

Source: www.icodermag.com

01/2012

Pages Pre-Rendered by images
This technique is heavily used inside the highly interactive magazines published using the Adobe Digital Solutions environment: well known examples are the Condé Nast magazines (Wired is one of the most famous examples).
The way these magazines are implemented starts with the well known suite of Adobe Digital Publishing tools, In Design in primis. These tools are used by many publishers around the world and the latest versions offer the pos sibility to export the project, other than in the ubiquitous pdf format, in a package suited for distribution through iPad. The output of these files can be tested using the free app Adobe Content Viewer downloadable from the App Store, but of course the final branded app, together with the server infrastructure required to serve the contents, requires a higher tier license.

What characterizes this kind of magazines is that at the moment of project creation all pages are pre-rendered as jpeg or png images and then special effects are overlaid.
This means that the core section of the magazine reader is essentially an image viewer. Sure these images will span an area slightly larger than the iPad screen, so they will be embedded inside a scroll view, but they are still images. All in all technically the choice is not bad: the iPad is quite better in rendering images than PDF files, as the required calculations needed to transform the pdf data in bitmaps is completely skipped here, while the CPU will just need to decompress the image and send it to the graphics hardware. Exactly as we did in the PDF case, we can apply the overlay technique to over impose somecontent that requires user interaction on top of the bottom rendering layer.

While this technique is highly efficient from the point of view of rendering time, and is simple to implement as all the page layout complexities have been taken into account and solved by the desktop publishing tools, it offers a few limitations that need to be considered:

•     every single page takes quite more space on disk and download time of this kind of magazines is increased correspondingly; in comparison with a pdf page, the space taken is much more as every pixel of text must be provided in the file and we cannot force high compression ratios if we don’t want to introduce blurring in the text. The pdf page, especially those pages made of text only, is much lighter as the text is not pre-
rendered.

•     zooming or font resizing is not feasible: both pdf and core text redraw the text using vectorial algorithms or per-size font representations, this is not possible to achieve on a static image. This means that the magazine needs to be drawn with specific fonts types and sizes, fonts which are well suited for jpeg compression (no blur) and the screen resolution (132 dpi, not so high; things will be better with the next retina display iPad!)

•     text search, highlight and selection is impossible, unless the digital publishing tool exports together with the pre-rendered pages a full map of text coordinates, something I haven’t seen yet!

Adobe is not alone in publishing this kind of magazines:
there are several custom apps in the market that follow exactly the same approach. It’s not bad but is not leveraging the great publishing frameworks that Apple is offering to its developers. And it has too many limitations if compared with other techniques. For sure a publisher that is mastering the digital publishing tools I mentioned before can take advantage of this approach, as the final quality is undoubtable and the time to market is the shorter, and at the same time allows to provide a content suited for the iPad, and not just a pdf fit on screen.

But I would recommend to all developers that are making custom products and are not using specialized page composition tools to stay away from such methodology.

Source: www.icodermag.com

01/2012

 

CORE TEXT RENDERING
Core Text (short: CT) is another of those technologies developed for the Mac and later ported to iOS.
The Core Text framework is dedicated to text layout and font handling. Just to summarize the capabilities of this framework, consider that is at the base of the desktop publishing revolution that made the Mac famous in this professional sector.
As CG, even CT has a C-based API, even if there are several third-party open source wrappers that pack together the most common functionalities in a high-level Objective-C interface.

CT should not be used to replace web based rendering based on html and css, this is a too complex field that is better to leave to dedicated system components such as then UIWebView instead it can be used to efficiently render some rich text.

CT talks with CG, in fact text rendering is done at the same time of view Quartz based rendering. The two APIs have similar conventions and memory management rules, so the developer already accustomed with Core Foundation programming model will not find an hurdles in understanding the CT API. This gives the possibility to the developer to eventually mix the text rendering and image drawing at the same rendering stage (CT is limited to text only, it has no image drawing capabilities).

The main reason to use Core Text is because it does direct rendering of text on page without any intermediaries. It differs from PDF which consider each page as a whole, it differs from web based techniques as there is no intermediate language (html) or layout interpretation (css) in between, you can write directly on the page. The basic components behind CT are layout objects such as “runs”, which are direct translation of characters
into drawable glyphs, “lines” of characters and “frames”, which correspond to paragraphs. The translation of characters to glyphs is done by “typesetters” and the text to be plotted is provided using attributed strings, which are common strings enriched with attribute informations (font size, color, ornaments).

You will decide to use Core Text for a magazine whose layout will be mostly based on text with standard layout, so it fits well for newspapers also. Probably it’s not the best choice for glamour magazines where graphics layout is changing on every page and could be quite complicated.
A clear advantage of the Core Text based solution is that you don’t need to apply the overlay technique we mentioned in the paragraph dedicated to pdf. With CT you will directly divide your page in frames and each of these frames will contain text (rendered by CT) or multimedia. Essentially you can define the page layout by selecting a size (it can fit the iPad screen or it can be vertical or horizontal scrolling page), then you will decide the size and position of media content in this page and finally you will define the frames (several rectangular frames) that will contain the text. The text frames organization can be of any kind, from compact single column structures, two multicolumn layout or varying size frames. Inside the frames you will render the text and Core Text will help you to manage line breaks for these paragraphs. Then you can easily provide the user the possibility to change font type and size and the same rendering code can be reused to quickly rearrange the text inside the frames.

The page layout representation can be provided in any form decided by the developer together with the publisher, the best choice will be XML (all in all it’s the base of any markup format!) and it will be shipped to the app together with the texts (still XMLs) and the assets in a zip file package.
One limitation of Core Text is that it is a text drawing technology and is not optimized for editing (but we don’t need it at this stage) and user interaction. This means that if we want to provide text highlight or select and copy features we’ll need to implement them by our own; the framework provides us some APIs to facilitate this task but in any case the code to implement these functionalities must be written by the developer to manage every single detail. In any case all these tasks will be greatly simplified in comparison with PDF: here you have full control of the text and its position of screen, while pdf is still an opaque entity hidden behind a complex data structure that you cannot control in its entirety.

Our recommendation is that if you must implement a digital magazine, without extreme layout requirements, some multimedia content and a fast and powerful control of text, using Core Text is the first technology choice to be considered.

An excellent tutorial on the subject is available at this link on Ray Wenderlich blog: http://www.raywenderlich.com/4147/how-to-create-a-simple-magazine-app-with-core-text

Source: www.icodermag.com

01/2012

 

The Magazine is a PDF File
You may like it or not, but should your software house be committed to develop a magazine iPad app, the magazine will be with high probability given to you as a PDF file. As there is no way to “escape” from it, at the end you will need to develop your own pdf reader or integrate some free or  commercial external library.
The reason why pdf is still the dominant format in the e-publishing world is clear: most of the publishers are porting their existing printed  publications on the iPad, and for obvious budget reasons they want to reuse all the investment done in the creation of their issues. You will not be able to escape from the pdf format dictatorship with the exception of two cases: the publication is brand new and only digital, so there are no previous investments to drive the final choice, or the publisher has large budgets and/or is a strong user experience (UX) believer and accepts to allocate the extra budget to recreate a different format for its publications. Both cases are not so uncommon with those publishers that already did the effort to bring their products to the web (with the notable exception of those that did it in Flash!), but the large part of the small and medium publishers will
still be locked to the pdf format.

Unfortunately the pdf is not the best way to port a magazine in the iPad. And this for several reasons:

•     printed magazines page size is usually larger than the iPad screen: this means that when the page fits to the screen, all characters appear smaller and then something readable in the printed paper could become unreadable without zoom; but zoom is not always efficient and in particular it’s not loved by readers that may lose their “orientation” inside the page.

•     printed magazines pages have not the same aspect ratio of the iPad screen: this means that a page that fits in the screen will be bordered by top/bottom or left/right empty stripes.

•     often printed page layouts are optimized for facing pages, e.g. a panorama picture which is spread between two pages; when the device is kept in portrait orientation, these graphical details will be lost, instead if the device is kept in landscape you will be able to appreciate the two-pages layout but characters will be too small to be read comfortably.

•     as these files are not optimized for digital, normally the outlines (table of contents) and annotations (links to pages or external resources) are not exported; this means that even if your pdf reader code is aware of this information, in the majority of cases it is not available and then you will need to define a different way to provide it.

•     the official pdf format supports multimedia content; unfortunately the iOS is not able to manage it, so all interactive content must be provided  outside the pdf file.

The page rendering is achieved in iOS (and OSX too) through the Quartz 2D API, provided within the Core Graphics framework (shorted with CG). Quartz 2D is the two-dimensional drawing engine on which are based many (but not all) of the drawing capabilities of iOS. The
PDF API is a subset of the huge CG API. This API is “old fashioned” and is not based on Objective-C but on pure
old C; besides all memory management rules will follow the Core Foundation (CF) rules which are different from Obj-C one: this means that special attention must be provided to avoid memory leaks, as each PDF page manipulation can take several megabytes and leaks will easily trigger the memory watchdog, thus force quitting your app.

be immediate to render a PDF page, by following these basic steps:

1. get the CG reference to the pdf page to be drawn;
2. get the current graphics context for the view that will contain the page;
3. instruct Quartz to draw the pdf page to the context.

As you can see, apart the required steps needed by the drawing model of Quartz, the full rendering is accomplished by the system and you don’t need to have any knowledge of the data format of a pdf file. So for you the pdf rendering processor is just a black box, and this is clear when you
see that all CG data structures are in fact opaque and their inner contents can be accessed only via API.
But a valid pdf magazine reader cannot limit itself to rendering, so you will be required to support zoom. Now as your maximum zoom level can be theoretically very high (don’t forget that characters in the pdf file are like fonts in the computer, they will never lose in precision even for
extreme zoom-ins), it is impossible to render the full zoomed page in a canvas much higher than the device screen:
here we have pixels, not vectors, and it would be immediate to crash the app because all the memory has gone away for one page only. So you will be forced to introduce tiling techniques that will limit the effective rendering to the visible part of the page, not always an easy task.

More difficult is document parsing: this is required if you want to extract outlines, annotations, do some text search and highlight. In such case apart a few meta data extraction functions, what the API gives you is a set of functions that will allow you to explore the data structures inside the document. You will not be able to get any information from the file if you don’t explore the data tree correctly and if you don’t follow the specs of the PDF document.
This is worsened by the many versions the PDF specs got in the years and by the fact that many publishers still use old software that exports the  content in the old formats.
I have developed a general purpose PDF explorer, this was part of a commitment of a client that asked me to develop a general purpose PDF reader; but as it is really hard to apply all the specs of the PDF official reference, my suggestion is to concentrate on the most used features and test them with many documents. As I said before, CG navigates the data tree but it doesn’t interpret it for us!

The last section of this part, long explanation but required given the importance of the topic, is how to provide multimedia content on top of a PDF file: all in all the iPad is a so versatile device that we cannot limit ourselves to simple page rendering. By adding extra content to the printed page you can leverage the device characteristics and still taking benefit on the investment done in the magazine creation.

There are many reasons to justify this choice: e.g. a printed advertisement can offer a video instead of a static picture, or a printed link to a web page can be replaced by an active link to a web view, or finally we can show the current weather using an html5 widget. As I previously said it is not recommended to introduce all this content inside the pdf file: it will not be rendered by Quartz and you will still be forced to traverse the data tree to extract the CG object reference for further manipulation. Finally not all publishers are aware of these functionalities or their digital publishing software is too old to fully support them.

So the best solution is based on the “overlay technique”.
This methodology consists in representing the pages in two layers:

•     the bottom layer (“rendering layer”) will contain the PDF rendering, so it will contain the bitmap image of the page;
•     the top layer (“overlay layer”) will draw all overlays and is sensible to user touches.

The overlay layer is typically made of UIKit components, so we’ll add a UIWebView for html widgets, we’ll introduce a UIScrollView to display a gallery of sliding images, or we’ll add a Media Player view for video execution. Typically the overlay descriptions are provided on a separate file, e.g. an xml, json or plist, and they will be packed together with the pdf file and all assets (movies, images, html files, music
files) in a zip file.
The app will download the zip file, will unpack it and then for each page it will use the pdf page to fill the rendering layer, and the overlay information associated to that page to build the overlay layer.
Note that this technique can be applied also in the other rendering techniques we’ll talk about in the next paragraphs, in such case it allows to overcome many of the pdf format limitations. The major requirement for the deve loper is to define a suitable format, follow all page zoom
and rotations with a corresponding overlay transformation and finally provide the publisher with the instruments and
guidelines required to easily create such overlays.

source: www.icodermag.com

01/2012

 

The platform i3F editorial rests on four foundation pillars:

  1. Development and reading documents in PDF format
  2. The use of web services and network queue
  3. The infrastructure for the Apple In App Purchase
  4. Web services using the editor

Let’s see in detail.

PDF Reader

The basis of the reading of the documents is the PDF Reader. To understand the work that is behind this technology, we begin by making reference to that IOS provides its developers.
PDF support and ‘native support within the framework Quartz, the 2D graphics framework installed in Mac OS X and successfully brought in IOS. To understand the importance of PDF in operating systems from Apple, suffice it to say that PDF is not ‘seen as any output format, but in fact any view graphics in Mac OS X and IOS can’ be reproduced as a PDF, which in fact turns out to be the prince format for printing based on Quartz. This explains why ‘is in Mac OS X support for PDF in Ios, both inbound and outbound, and’ natural and does not require the installation of external software (as is the case in Windows, where the input requires ‘installation of Adobe Reader, the output requires the use of appropriate plug-in).

That said, this’ does not mean that things are easy. In fact, the support provided by iOS is essentially limited to the possibility ‘to’ read ‘and understand a PDF file, but only to the functions of rendering on paper or video, while the interpretation of all other data (outline, thumbnails, annotations, etc. .) and ‘left to the programmer.
The PDF reader that comes with the app produced by i3F Editorial and ‘continuous work in progress, subject to continuous improvements and support of new possibilities’. Currently it offers the following features’ base:
– Support for iPhone and iPad
– Fast rendering of the page in portrait format (horizontal) and landscape (vertical, two-page spread), with caching for faster performance
– No limit on the number of pages supported (or at least no limit in addition to any provided by the platform IOS)
– Completely based on the rendering engine of IOS, so no surprises in the transition of the application across several operating system versions
– Loading thumbnails in multi-threading
– Mini-thumbnail (style iBooks)
– Function scrubbing of the page (with display of page number and / or thumbnail)
– Pre-loading outline (table of contents with all its hierarchical structure) and the comments (link)
– Intra-document annotation (jump page), and to external links
– In addition to standard support of external links (http:and mailto: within the application, any other url patterns to other app installed by the user, eg skype:) support links owners to stream video directly by the JPA and for displaying photo galleries, and this ‘means that the publisher will be’ able to create multimedia packages (PDF + multimedia) simply by defining the links within its graphical tool that generates the PDF, without having to weigh and implement all the technical complications due to the inclusion of media files directly into PDF (Recall that Quartz does not support these types of files, effectively ruling out this information.) Support for these links and ‘gradually increasing.
– Search function tests in multi-threading (ie the use of the document is not locked)
– Save the last page viewed (auto-bookmarks)

Library management

The interface defined by the library i3F Editorial is based on some commonly accepted standard templates (eg shelf covers iBooks style, window style or covers in the App Store), although i3F Editorial is a software package but a team of designers and developers able to implement any request is made by the user. The iPad and ‘a formidable creative platform, so they are well liked editors who want to bring this creativity’ even within applications.
What is ‘common hand and’ the technical aspect behind this approach. Currently, the composition of the publisher of the archive, and library users, are contained in files (in various formats, depending on the complexity ‘of the archive, ranging from XML to JSON actual SQLite database to , the most ‘complex). The files can be managed entirely by the editor through our web platform and can be installed on servers hosted by the owners or i3factory (which in turn uses deemed reliable provider ‘). At any time the publisher and ‘capable of varying the composition of its stock and make it instantly with a single click, after pre-testing always possible publication through our applications.
Once the file is defined, the application tries to start the last update was available. From this moment on, each publication can ‘overcome several states in the shop (if paid), to download (for free or if already’ purchased) to be installed, to read. The passage of these states and ‘carried out safely and fully multi-threaded: that’ means that you can ‘interact with the application (or even suspend it if the download) without having to wait for the download of the entire package. In addition, the media can be packaged into a single file – in this case, however, ‘the download time will be’ more ‘long – or can be downloaded on demand (this is where the media are considered optional to the use of the product).

In App Purchase

Following the latest news ‘introduced by Apple in the rules for approval of applications and content for a fee, we provide as a single solution for the purchase of In App Purchase, namely the ability’ to purchase publications via App Store (remember that these transactions Apple holds 30% of the price charged to the customer).
In any case i3factory and ‘willing to provide solutions to purchase additional wholesale App Purchase, based on external websites provided by the publisher. These solutions are not provided as standard and should be agreed from time to time, this peche ‘need’ from time to time consider all the complex ‘due to the security of transactions and payments made via the web. I3F does not make any kind of support on different forms of payment from the App Store, which will then be dealt with by the customer: in such cases will deal i3F ‘integration within the application only.

Web services for the publisher

The publisher will be ‘able to manage the archive of publications via web interface, based on standard Web 2.0 methodologies. This interface will allow ‘:
– The inclusion of new publications
– The definition of links and multimedia content loading
– Archive management (edit, delete, categorize and tested)
– The ability ‘to temporarily remove from sale certain publications
– Anti-hacking encrypted transactions
Recall that due to the presence of In App Purchase, sale prices and any content will be replicated within the service iTunesConnect Apple. By regulation we can not provide solutions that automate this task.
The entire package will be ‘provided in self-installing package based on PHP and requires the minimum server software support and which we believe is standard in the grand total’ of the equipment required to a publisher.

Dear Publishers,

finally we made a system that allows you to publish magazines, books, newspapers,catalogs or any publication at no cost to each new issue or for every new player.

We cater to small publisher as the major publishing house, after having tested our prototypes, and after more than one year of development, i3Factory® is pleased to introduce a software system that allows you to publish your own issues without expensive investments on the App Store .

Through Apple’s App Store, Android Market or Amazon App Store,  your audience market will become the world’s online market, then the possibility of reaching readers around the world.

The costs of printing paper are more and more high and not allow the publisher of large print runs, and then plan to reach a geographically more wide.

With our publishing system, the costs of printing are canceled; readers browse your publication on the iPad tablet (and iPhone) and the cost for new publications will be always null.

We note that the experience of reading a magazine on the iPad and far more satisfactory experience of reading the same publication on paper.

 

SOME FEATURES

  1. Your Own Universal Application will be published on Apple® App Store;
  2. Unlimited publications from PDF files;
  3. No infrastructures costs: Host the publications on your own Internet or Intranet servers. Have 100% control and autonomy on your content;
  4. Offer your readers & audience the best mobile/tablet browsing experience with high definition texts and images, Videos and so much more;
  5. Wide audience: you pubblications will be ready Wold Wide;
Magazine using i3Factory editorial

 

 

ADVANTAGES

  • Economy of Scale: Buy one time license and create as many mobile publications as you wish in a just few clicks!
  • Earnings:Editors can offer prublication for free or not free.
  • Easy-to-use: Easily publish your magazione or publications from your  PDFs. i3Factory Editorial® technology automatically exports your links and your bookmarks from your PDF to your iPad & iPhone App.
  • Mobility: Consult your  publications offline , once downloaded the publication will be avaiable for  read it without you need any tipe of online connections.
  • Fast Download: all operation works on wifi or 3G data connections, Give your audience a great experience; with an internet connection the pages are immediately available as you flip through the document.
  • Sustainable Development: Go green. With i3Factory Editorial® all your publications have a positive carbon balance sheet. Help preserve our environment, save paper, reduce printing, save the trees and help decrease green house gases!
  • Personalization: Create your “Own Graphic interface” for your readers and a table of content for quick navigation.
  • Security: Host your publications on your own Internet or Intranet servers. Stay in full control of your interactive publications and your content (archives, subscription, sales campaign …).
  • Multimedia Content: Add clickable zones (go to page or links to websites) inside your interactive publication and/or PDF , HTML5. Engage readers withInteractivity & Videos from inside the pages of your publication.
  • Performance: You can find what you want in the blink of an eye.
  • Technology: i3Factory is a certified Application Factory. We are up to date with the latest technological developments, hence allowing us to provide you with the most high-performing tool on the market today.

    Be on the cutting edge of technology!

COSTS

Obviously prices will vary with respect to the need of the publisher, which normally requires some “customization”.

The starting price for our solution starts from 900 euros for small publishers, a solution that contains all the features necessary for most small-medium-sized publishers that starts from 1500 euros up to a maximum of € 5000 for medium and big publishers.

More Information on packages you can find on this editorial on this page:

New editorial system for iPad, iPhone & Android

or  direct on  i3F Editorial web site (http://i3factory.com/editorial)


 

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close