Re: [evince] Ink Annotations Toy Implementation





On Thu, Dec 11, 2014 at 7:35 AM, jose aliste gmail com <jose aliste gmail com> wrote:


On Thu, Dec 11, 2014 at 5:12 AM, Daniel Sim <Daniel Sim 2010 pem cam ac uk> wrote:
>
> I don't think you need extensions to PDF, but of course I don't know your
> goals. I would imagine that
> using the /AP section of an ink annotation you can do whatever you want, but

From a quick reading of the PDF spec 1.7 it seems the /AP section just
contains the same entries as in a regular Ink Annot. Not quite what I
wanted -- I wanted to add a *new* entry called InkWidths, an array of
array of reals, whose lengths matches that of InkList, that specifies
how thick the ink is at each segment.

mmm. /AP stands for Appearance Stream, AFAIK, you can put any DRAWING command there...which will be similar to a sequence of cairo commands, including commands to change the width of the line. 
 
Actually, here is a pdf that "seems" to implement variable width for ink annotations. Whatever commands there, you could mimic them in order to get your desired width change according with the pressure. 

http://www.pdfill.com/example/pdf_ink_new.pdf


 

In Xournal, you get very nice inks using this feature and a
pressure-sensitive tablet! But yea, it would't make sense to do this
as a start.

Do you know, by any chance, how PDF readers are supposed to handle
unknown Dict entries?
They don't. 
 

> I haven't try it though. In any case, iI think it would be
> best to first implement things that conform to the PDF spec. If you still
> want to do extensions, I guess they can be saved as metadata together with
> the file (this of course may cause problems when copying the file.. or send
> it) or just doing a sort of PDF + json or whatever you like (but in two
> files could be simpler for evince)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]