You should really do some reading in the PDF Reference, but here's a  
quicky (simplified!) explanation.

There are three parts to Optional Content (aka layer) in a PDF - the  
actual definitions in each content stream, the document-level naming/ 
organization of the groups (OCG's) and the per-page "Properties" that  
link the two together.   Since iText copies the streams intact when  
it copies pages, the first part is already moved over.  The document- 
level objects are NOT copied (and/or merged), however - that would  
need to be implemented.   The properties are PARTIALLY copied - the  
static elements go, but the "rebinding" can't happen due to the lack  
of document objects.

So for you to implement this, you'd need to understand the global  
objects to be copied (that's pretty easy) and then as part of the  
page copying code - rebind the properties.  That's the harder part.

Leonard

On Feb 14, 2008, at 6:08 AM, Paulo Soares wrote:

> When there's no answer:
>
> 1 - We didn't understand the question.
> 2 - We're too busy to answer.
> 3 - We've already answered.
> 4 - We don't have the time to explain a solution.
> 5 - We don't have the time to implement a solution (sometimes it's
> easier than to explain).
> 6 - It's not currently our priority (it doesn't mean it's forgotten,
> just not for now).
>
> In this case it's 4, 5 and 6.
>
> Paulo
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On
>> Behalf Of Stefan Burkard
>> Sent: Thursday, February 14, 2008 10:58 AM
>> To: itext-questions@lists.sourceforge.net
>> Subject: [iText-questions] Repost: PDF merging with layers
>>
>> hi all
>>
>> sorry, but I repost this since there were no further answers...
>>
>> ------------------------------------------------
>>
>> in my case this would be quite clear: I'd like to have all layers  
>> that
>> appear in any source document copied to the target document (with the
>> same visibility settings).
>>
>> if a layer name appears in multiple documents, the contents of all  
>> the
>> same named layers should be merged together in the target
>> document under
>> the same layer name. the visibility should be "visible" if any of the
>> merged layers with the same name is visible in its source document.
>>
>> so I know what to do, how can I do this? and what do you mean
>> with "The
>> layers themselves are already copied"? is this already
>> implemented in itext?
>>
>> thanks a lot
>> stefan
>>
>>
>> Paulo Soares wrote:
>>>> The problem is how to conciliate the various ways to
>> control the layers
>>>> and the layer's names that are present in different
>> documents. The
>>>> layers themselves are already copied. It's more a
>> problem of what to do
>>>> rather than how to do it.
>>>>
>>>> Paulo
>>>>
>>>>>> -----Original Message-----
>>>>>> From: [EMAIL PROTECTED]
>>>>>> [mailto:[EMAIL PROTECTED] On
>>>>>> Behalf Of Stefan Burkard
>>>>>> Sent: Friday, February 01, 2008 2:55 PM
>>>>>> To: itext-questions@lists.sourceforge.net
>>>>>> Subject: [iText-questions] plans for PDF merging with layers?
>>>>>>
>>>>>> Hi all
>>>>>>
>>>>>> I searched the list about the "missing feature" to merge PDF
>> documents
>>>>>> without loosing the layers of them.
>>>>>>
>>>>>> I found several threads about this and there were also
>> statements
>> that
>>>>>> this feature is planned, but not scheduled.
>>>>>>
>>>>>> I even found a thread on this list with java-code to implement
>> exactly
>>>>>> this, but I don't know how much more work this code
>> needs to get it
>>>>>> running...
>>>>>>
>>>>>> Question: Are there any concrete plans to implement
>> this in the
>> next 3
>>>>>> months into iText?
>>>>>>
>>>>>> And can anybody give me a hint about how this would be done?
>> Would one
>>>>>> "just" need to read all layers, recreate them in the new
>>>>>> document and is
>>>>>> then able to copy the PDF content layer by layer?
>>>>>> Or would one have to recreate the layers in the new
>> document and then
>>>>>> copy every single object to it's layer in the new document?
>>>>>>
>>>>>> Thanks
>>>>>> Stefan
>
>
> Aviso Legal:
> Esta mensagem é destinada exclusivamente ao destinatário. Pode  
> conter informação confidencial ou legalmente protegida. A  
> incorrecta transmissão desta mensagem não significa a perca de  
> confidencialidade. Se esta mensagem for recebida por engano, por  
> favor envie-a de volta para o remetente e apague-a do seu sistema  
> de imediato. É proibido a qualquer pessoa que não o destinatário de  
> usar, revelar ou distribuir qualquer parte desta mensagem.
>
> Disclaimer:
> This message is destined exclusively to the intended receiver. It  
> may contain confidential or legally protected information. The  
> incorrect transmission of this message does not mean the loss of  
> its confidentiality. If this message is received by mistake, please  
> send it back to the sender and delete it from your system  
> immediately. It is forbidden to any person who is not the intended  
> receiver to use, distribute or copy any part of this message.
>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ 
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to