[iText-questions] controlling page breaks (not how to insert a new page)

2009-01-09 Thread Jeff Glatz
hi!

i'm working with the chapter/section abstractions to generate a working
marketing plan PDF for our marketing group.

sections will not be more than a page (PageSize.LETTER) in length, and i
have a requirement that equates to "if a section crosses page
boundaries, start the section on a new page".

what is the best approach to detecting this? about the only thing i can
find related to page breaks is "how do i start a new page"...

thanks!
jeff

"This email message, including any attachments, is for the sole use of the 
intended recipients and may contain confidential and privileged information.  
Unauthorized use, disclosure or distribution of this email is strictly 
forbidden.  If you have received this message in error, please reply to the 
above sender notifying them of this error, and then kindly delete the message."


--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] Marked Content

2009-01-09 Thread Leonard Rosenthol
I can't answer the iText specific implementation questions, but here are a few 
answers about tagged PDF in general.

Tags can be ANYTHING you want - you are NOT restricted to the tags that are 
listed in the PDF reference - though use of the standard tags will mean greater 
support for screen readers, content extraction, etc.

Tags can be as "low level" as bold/emphasis or they can be an entire artifact 
or figure.  Up to you how much/little you wish to tag.

For tables, you don't need to include the lines of the table - just the text 
(and don't forget to get the subparts of the table - headers, cells, etc.) 
though you can certainly include them if you want.

Leonard

From: David Thielen [mailto:da...@windward.net]
Sent: Thursday, January 08, 2009 1:55 PM
To: itext
Subject: [iText-questions] Marked Content

Hi;

I'm diving into the Marked Content and have a couple of questions.


1)  Does it work with ColumnText? It looks like it should but better to ask.

2)  It looks like what we do is pass in the formatting via html commands. 
Is there any restriction on this or is it pretty much all html?

3)  Do we need to pass in character formatting like  or can Acrobat 
figure that out based on the settings of the text we render?

4)  Is there a way to tell it the lines we draw are for a table? Or do we 
just specify that in the  part and it will ignore the lines?

Thanks - dave



David Thielen
303-499-2544 x1185
720-352-0676 (cell)

Must watch - Cubicle War

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

[iText-questions] Marked Content

2009-01-09 Thread David Thielen
Hi;

 

I'm diving into the Marked Content and have a couple of questions.

 

1)  Does it work with ColumnText? It looks like it should but better
to ask.

2)  It looks like what we do is pass in the formatting via html
commands. Is there any restriction on this or is it pretty much all
html?

3)  Do we need to pass in character formatting like  or can
Acrobat figure that out based on the settings of the text we render?

4)  Is there a way to tell it the lines we draw are for a table? Or
do we just specify that in the  part and it will ignore the
lines?

 

Thanks - dave 

 

 

 

David Thielen
303-499-2544 x1185
720-352-0676 (cell)

 

Must watch - Cubicle War  

 

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

[iText-questions] Column wise text

2009-01-09 Thread Gau

Hello,

I am want the text in the pdf as divided in columns. 
The structure is that the pdf has..
Sections--> each section has columns-->each column rows
If there is only one column in a sections, things are fine, but if there are
more than one, I am not able to put the text in those columns.
I am taking the values from xml which has schema like ..


 
 name
   last name 
  
  
 Email id
   Ph No. 
  


   
I iterate thru this loop and get the values of the row items one by one.
My problem is, I am not able to place the text in two columns(as in above
example) as I get the values one by one in the loop. What should I use? If I
use Table object, I can add one cell and at the next iteration, how can I
place the text in next cell?
Please help. Also, pls suggest if there is any other alternative.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Column-wise-text-tp21375449p21375449.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] Finding / Removing Object from PDF

2009-01-09 Thread Claas Jäger


Claas Jäger wrote:
> Thanks for the reply.
> 
> 1T3XT info wrote:
>>> Now I am trying to remove th 2 objects from the PDF file using iText. My 
>>> problem is that 1.) i am not possible to find these objects using iText 
>>> and
>> What if you compare the bytes? You have those bytes in Pattern_only.pdf
>> If the pattern is identical for all PDFs, then you could try to find 
>> that pattern in a stream in the other PDFs.
>>
> I will try to analyse the stream contents and to identify the pattern 
> that way, thanks for the tip.
> 

I tried to get the stream content with code like this:

SNIP==
  int strIdx = -1;
  for (int i = 0; i < reader.getXrefSize(); i++)
  {
   PdfObject pdfobj = reader.getPdfObject(i);
   if (pdfobj != null) {
if (pdfobj.isStream()) {
 strIdx++;
 PdfStream pdfStream = (PdfStream)pdfobj;
 FileOutputStream fos = new FileOutputStream(streamFileName);
 pdfStream.writeContent(fos);
}
   }
  }
SNIP==

But all the output files are empty afterwards. Am i accessing the 
streams in a wrong way ?? I do not believe that they are really empty...

Maybe my approach to get the content in the PDF is wrong ? Hints and 
pointers greatly appreciated...

-- 
Mit freundlichen Grüßen / Regards

Claas Jäger

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] Finding / Removing Object from PDF

2009-01-09 Thread 1T3XT info
Claas Jäger wrote:
> I was afraid that that would be the answer ;)

I can't promise anything, but if I have the time,
I'll write you an example. But if you follow the mailing list,
you know that it can take a while; for instance: solving the
getPageNumber() problem posted by Dominic a while ago took over
a month, not because it was a difficult problem, but because
I didn't find the time to start looking at it.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] Finding / Removing Object from PDF

2009-01-09 Thread Claas Jäger
Thanks for the reply.

1T3XT info wrote:
> Claas Jäger wrote:
>> I have a PDF file wich, if converted that way, has an enormous size (> 
>> 80MB). I figured out that the elements that make th PS so huge are 1.) a 
>> pattern used on the page to simulate grey background on a certain area 
>> and 2.) a transparent layer above that pattern.
> 
> Is there no way to prevent that these patterns are added?
> Maybe if you change something earlier in the workflow,
> you can avoid this problem.

Unluckily i can not change the fact that the pattern is added, as that 
part is done from another vendor, who is not willing to adopt the workflow.

>> Now I am trying to remove th 2 objects from the PDF file using iText. My 
>> problem is that 1.) i am not possible to find these objects using iText 
>> and
> 
> What if you compare the bytes? You have those bytes in Pattern_only.pdf
> If the pattern is identical for all PDFs, then you could try to find 
> that pattern in a stream in the other PDFs.
> 
I will try to analyse the stream contents and to identify the pattern 
that way, thanks for the tip.

>> 2.) since i do not know which is the object to remove i can't do it.
> 
> Once you know where to find that pattern. Use killIndirect (maybe
> you'll have to replace the object with a smaller stream).

I will try it that way, ince i figured out if i can identify the stream.

> It's probably possible to achieve what you want with iText,
> but it will demand plenty of programming.

I was afraid that that would be the answer ;)

I will report here if i found a solution to this.

-- 
Mit freundlichen Grüßen

Claas Jäger

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php