[iText-questions] merge pdf's with bookmarks

2011-02-17 Thread xi...@gmx.com


  
  
Hello, 

I merged 3 PDFs using iTextSharp lib, one  with bookmarks and two
without bookmarks. The result is a pdf without any bookmark. Is that
normal? 

Can I merge PDF's without lossing bookmarks?

Thank you ;)


  


--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] merge pdf's with bookmarks

2011-02-18 Thread xi...@gmx.com


  
  
Thank you !!! I was looking with the words "merge" and "join" and I
did not found it ! I'm a iText beginner and that's my first try.

Thank you both for your answers ;)

Al 18/02/2011 09:44, En/na 1T3XT BVBA ha escrit:

  
      Op 17/02/2011 19:33, [email protected]
  schreef:
  

Hello, 

I merged 3 PDFs using iTextSharp lib, one  with bookmarks and
two without bookmarks. The result is a pdf without any bookmark.
Is that normal? 

Can I merge PDF's without lossing bookmarks?
  
  Yes, that's explained in the book, more specifically in section
  7.2.4 titled "Concatenating documents with bookmarks".
  

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
  

___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php

  


--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

[iText-questions] modify pdf objects with iText

2011-03-24 Thread xi...@gmx.com


  
  
Hi,

I would like to know if is possible to modify pdf object and re-save
the pdf with changes.

The purpose is change the path of a link in a pdf collection.

I did the following test, but i don't know how to continue: (code in
vb.net)=


    obj = reader.GetPdfObject(numObj)

    If TypeOf obj Is PdfDictionary Then
    str = obj.ToString
                    If InStr(1, str, "/Filespec") Then
                        '  how to read the object content

                    end if
    End If

The pdf object is like this:

35 0 obj
<>

and I need to change the pdfpath.  Is it possible with iText ?

Thanks ;)


  


--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] modify pdf objects with iText

2011-03-25 Thread xi...@gmx.com


  
  
Thank you very mutch for your answer, that's just what I was looking
for. But I've a problem with the line:

 if (dict.getType() == PdfName.FILESPEC) {
the Visual Studio return me that error:
 'iTextSharp.text.pdf.PdfDictionary'does
  not contain a
  definition of 'getType' andfound no extension method 'getType' accepting a first argument of type'iTextSharp.text.pdf.PdfDictionary' (are
  you missing a directive use or an
  assembly reference?)

I did it in vb.net and in c# and I've the same error. 

The rest of the code works perfectly and does what I need.

There may be differences between iText or iTextSharp i not right this line?
  
  I'm using iTextSharp 5.0.6 and VS 2008.
  
  


Al 24/03/2011 18:25, En/na Mark Storer ha escrit:

  Specifically, the manipulatePdf function: 
  
PdfDictionary action = ""
PdfDictionary f = action.getAsDict(PdfName.F);
f.put(PdfName.F, new
PdfString("http://itextpdf.com:8080/book/request");

Your code is presumably looping through every object in the PDF, looking
for one that contains the string "/Filespec".  That could work, but you
don't know if the file specification is its own object, or part of
something else.  File speicifcation dictionaries are not required to be
top level objects, so just because you see /FileSpec doesn't mean you
know now to it out of your "obj".

You say this is a link in a PDF collection.  In THIS PARTICULAR CASE, it
sounds like you can safely use that technique.  As soon as your PDFs
start coming from different sources, or the file isn't part of a
collection, all bets are off.

To generalize your code a little more, I suggest the following... You'll
have to forgive my Java, I no speaky VB.net.

   if (obj.isDict()) {
 PdfDictionary dict = (PdfDictionary) obj;
 if (dict.getType() == PdfName.FILESPEC) {
   PdfString oldSpec = dict.getAsString(PdfName.F);
   String specStr = oldSpec.toString();
   String newSpecStr = modifySpecStrSomehow(specStr);
   dict.put(PdfName.F, new PdfString( newSpecStr );
 }
   }
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




	From: 1T3XT BVBA [mailto:[email protected]] 
	Sent: Thursday, March 24, 2011 8:53 AM
	To: [email protected]
	Subject: Re: [iText-questions] modify pdf objects with iText
	
	
	Op 24/03/2011 15:38, [email protected] schreef: 

		Hi,
		
		I would like to know if is possible to modify pdf object
and re-save the pdf with changes.
		


	This is an example that shows how to replace an URL:
http://1t3xt.be/?124
	If you want to know more about the structure and the content of
the objects, you need to read ISO-32000-1.
	




  


--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] modify pdf objects with iText

2011-03-25 Thread xi...@gmx.com


  
  
Thanks for the sample, but, i think that in my case the best is read
the xref because I dont know how mutch links exists and they aren't
named and positioned in the Acroforn array so I can not read with GetFieldItem() function.

Al 24/03/2011 16:52, En/na 1T3XT BVBA ha escrit:

  
  
  Op 24/03/2011 15:38, [email protected]
  schreef:
  

Hi,

I would like to know if is possible to modify pdf object and
re-save the pdf with changes.
  
  
  This is an example that shows how to replace an URL: http://1t3xt.be/?124
  If you want to know more about the structure and the content of
  the objects, you need to read ISO-32000-1.
  

  


--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] modify pdf objects with iText

2011-03-25 Thread xi...@gmx.com


  
  
Thank you very mutch for your answer, that's just what I was looking
for. But I've a problem with the line:

 if (dict.getType() == PdfName.FILESPEC) {
the Visual Studio return me that error:
 'iTextSharp.text.pdf.PdfDictionary'does

  not contain a
  definition of 'getType' and found no extension method 'getType' accepting a first argument of type'iTextSharp.text.pdf.PdfDictionary' (are

  you missing a directive use or an
  assembly reference?)

I did it in vb.net and in c# and I've the same error. 

The rest of the code works perfectly and does what I need.

There may be differences between iText or iTextSharp?
  or  is not right this line?
  
  I'm using iTextSharp 5.0.6 and VS 2008.

Al 24/03/2011 18:25, En/na Mark Storer ha escrit:

  Specifically, the manipulatePdf function: 
  
PdfDictionary action = ""
PdfDictionary f = action.getAsDict(PdfName.F);
f.put(PdfName.F, new
PdfString("http://itextpdf.com:8080/book/request");

Your code is presumably looping through every object in the PDF, looking
for one that contains the string "/Filespec".  That could work, but you
don't know if the file specification is its own object, or part of
something else.  File speicifcation dictionaries are not required to be
top level objects, so just because you see /FileSpec doesn't mean you
know now to it out of your "obj".

You say this is a link in a PDF collection.  In THIS PARTICULAR CASE, it
sounds like you can safely use that technique.  As soon as your PDFs
start coming from different sources, or the file isn't part of a
collection, all bets are off.

To generalize your code a little more, I suggest the following... You'll
have to forgive my Java, I no speaky VB.net.

   if (obj.isDict()) {
 PdfDictionary dict = (PdfDictionary) obj;
 if (dict.getType() == PdfName.FILESPEC) {
   PdfString oldSpec = dict.getAsString(PdfName.F);
   String specStr = oldSpec.toString();
   String newSpecStr = modifySpecStrSomehow(specStr);
   dict.put(PdfName.F, new PdfString( newSpecStr );
 }
   }
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 



  


--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Call a java Class from VB.NET

2011-04-18 Thread xi...@gmx.com


  
  
Why don't you use itextSharp ? it is better to call from vb.net.

http://sourceforge.net/projects/itextsharp/



Al 18/04/2011 17:17, En/na John Williams ha escrit:

  
  
  
  
  
I would like to use iText integrated with
  vb.net 2010.  Is
  there a way to use vb.net to call an IText Java Class?  I
  would be writing the
  class In eclipse.
  


  


--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev___
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php