Wonder is it possible to edit pdf on the go?

 Here's a cross platform solution that works on your phone without internet connection. Fxreader pdf editor that knows how to make it.



No way?! Useful book about pdf format


PDF format is binary. It can be interpreted as text instructions. And a set of binary data blocks attached.


Something similar to html with base64 based blobs for media files.


Various libraries provide a high level interface to construct the content of PDF pages. When you need to see the picture, or download a file. The commands are interpreted and the binary version is being provided. To generate a picture binary format can be fed through a rendering engine. Which translates the command inside into canvas actions, like shift position here, set a color like that, add this text, insert that image. Quite similar to OpenGL commands, or HTML5 canvas, or any other graphics low level library.


An obvious disadvantage is that during the PDF generation,
high level parts, like a paragraph of text, are split into primitive operations. fxreader pdf editor handles separate parts, you see how your data is transformed to make it editable. Usually each word is a separate display commands group. Any non standard symbol, or one with a different font goes into a separate group as well. Like Latex consists of (L) and (atex). So it is not easy to edit the word Latex with a single command change.


What makes a book good? It must be thought through, with an idea of simplifying understanding new concepts, getting to the read information during practical experiments with ease. Ideally the concepts should be split into independent blocks based on exploring and learning.


What happens when the topic is being explored using some programming language library and tutorials. Anytime an error is encountered - the first thought is check materials in the order:


-read through the example (perhaps missed some line)

-read through other examples (perhaps, it has been addressed in the advanced topic)

-read through API reference (ok, maybe some comment mentions non trivial behaviour)

-google error, check stack overflow, github issues (either hit and run, or get drowned in the swamp of finding a workaround without understanding the underlying concepts)

-git grep on source code of the project (some test cases, or the method usage around might provide the clue; funny gitlab forbids git grep without authorization; yet it is one the strongest functions of git project structure)

-read reference on the underlying concepts that the library is implementing (basically return to some theory, unless it is not present, or partial;)

-check the underlying library behaviour step by step (gdb, ipdb, any other debugger, prints)

-talk to someone experienced (either it is a group mate, colleague; or author of the library; in theory grate, but without established relationship or a clear bounty/offer for the effort - might be a dead end too)

-improvise, write from scratch (focus on a problem at hand, with some solution, without a responsibility for consequences; wait till the customer stops paying for the result; or wait till the program crashes without any reason; or let it be that way;) fxreader pdf editor does not force to reinvent the wheel. You know from the start how to convert your data and get the result.


What are the benefits of the book? Speaking of O’Reilly ones for programming languages. It is easy to see the concepts, they are separated from practical examples. The author is objective, and attentive to details.


What might be missing in the book. The practical side quite often gets wild. In a sense, that business needs do not wait, many issues can not be resolved perfectly within a reasonable time span. As a result people deviate in the approach, as well as understanding what is important and what is not. Getting paid is a common goal. As of technical quality of implementation - it varies.


For example, if you check google chrome pdf files. They do not exhibit one-to-one mapping of text. Instead it uses hex encoding of letters.
Another question is how many variations are present to render HTML as PDF. It is one of the problems ahead. Provide interpretation of those files in a typical WhatYouSeeIsWhatYouGet (WYSIWYG) approach.

P.S.
[1] Developing with PDF: Dive Into the Portable Document Format Leonard Rosenthol; Format 218 pages, ebook Published October 15, 2013 by O'Reilly Media ISBN 9781449327873
[2] https://github.com/Hopding/pdf-lib
[3] https://github.com/ArtifexSoftware/mupdf
[4] https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf

Comments