#1 2012-03-09 11:34:30

gkovacs
Member
Registered: 2012-03-09
Posts: 3

Layers

Hello,
first: big thanks for the pdf library, it's super!

Do you plan to implement pdf layers support ?

If not, could you give some hint where I should be looking at the source code to insert a mechanism like
AddLayer, SelectLayer  so the following drawing would draw to that selected layer?

Thank you.

Offline

#2 2012-03-09 12:59:35

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,255
Website

Re: Layers

There is no plan for layer supports by now.

PDF Layers are called Optional Content within the PDF specifications. This is a feature that was added as of PDF-1.5 (Acrobat 6.) A layer is identified by an identifier and a title. Only the layer title is visible to the end-user of the PDF document. Layers can be structured as a tree or as a hierarchy of layers.

See http://blog.amyuni.com/?p=215
This article has some sample input.

The current format used is PDF 1.13 (Acrobat 4 revision).
It will therefore need to change the revision number if layers are used.

So you'll have to create the corresponding dedicated classes in SynPDF.pas, to handle Optional Content and manage them over a page, in a similar way of TPDFImage implementation.
Each layer object could have its own TPDFCanvas, to write some content on.

Offline

Board footer

Powered by FluxBB