You need to call Image.scaleToFit() (or a similar method) giving the
image size in 72dpi. The original image will retain the full
information, and the viewer will display/print the image properly
using the full resolution.
--
Actually, catching exceptions is not expensive (creating them is),
and in almost all cases using
new URL(string)
is not going to throw an exception. See http://www.ibm.com/
developerworks/library/j-perf07303.html
The file references you use are only applicable they use a direct
filename. Th
The toURL() method in Image is needlessly complicated and restrictive.
Rather than checking if the string starts with various prefixes, a
better solutions would be to either just call new URL(string) and
trap an InvalidURLException, or minimally check that the string
contains the :/ characte
oken?
Reply-To: Post all your questions about iText here [EMAIL PROTECTED]>
PdfPTable doesn't support using Paragraph as a container for other
objects. You'll have to use PdfPCell.addElement() for each object.
Paulo
- Original Message - From: "robert engels"
&l
If I construct a Paragraph that contains a table, and then add the
paragraph to a table using addCell, the table does not appear.
It seems that PdfTable.addCell(Phrase phrase) does not work properly
- since a Paragraph is a Phrase by inheritance.
Is this a known problem? Is there some other
The implementation is no longer necessary.
A simpler version would just use the initCause() method, and simply
extend RuntimeException.
public class ExceptionConverter extends RuntimeException {
public ExceptionConverter(Exception e) {
super(e);
}
}
---
The nice thing about using getters/setters is that code completion
and reflection based tools work.
but using
worker.getInterfaceProps().put("image_provider",new MyImageProvider());
is not that big a deal.
On May 26, 2007, at 2:23 PM, itext-questions-
[EMAIL PROTECTED] wrote:
Re: [iText-q
The attached files implement the discussed changes.
The DefaultImageProvider is not used since I was uncertain about the
"image_path" usage in cprops. I could not find anything that sets it,
but I am sure it is there for a reason. The original code is left the
startElement() to handle old-s
Having the ImageProvider interface allows for easy custom protocol
handling, and simple embedded image processing.
The code below is what we are doing in our custom 1.4.8 derivation.
Adding get/setImageProvider to HTMLWorker would be a better solution
than using the properties map.
In this w
Using HTMLWorker and dynamically providing images is a bit
cumbersome. Dynamic images are important when reducing maximum memory
uses, and having a catalog of available images for the user to select.
Currently, you need to do something similar to:
class MyImageProvider extends HashMap {
Wow, sometimes you guys really show your maturity level. I am all for
the snippy comment to ignorant questions, but when you clearly just
don't understand the field, you demonstrate YOUR unbelievable ignorance.
You already have a CVS repository. To create a branch is 1 command.
There is no d
Most projects branch the code when changing major releases. I would
like to be able to pull the 1.4 branch from CVS.
Yes, I could just take the 1.4 source tarball, but that doesn't work
if we (someone) wants to produce (and distribute) a new release of an
old version.
Some people cannot swi
The cvs repository doesn't seem to have 1.4 and 2.0 branches?
I would really like to back-port certain fixes to 1.4 (i.e. create
patches against 1.4), but it doesn't seem that the CVS is setup
correctly.
-
Take Surveys.
Sorry for the delay, been out of commission...
I completely understand the desire to not have to maintain fragile/
buggy code related to encryption, but why not use an interfaced based
solution so that those that want to create a smaller distribution can?
Again, I am willing to do that work, a
Paulo,
Maybe there is a better way.
I have 2 motivating factors:
1. Limit the deployment size. The bouncy castle jars are as large as
the iText jar. Maybe a 'thin" BC can be distributed with iText that
only contains the ASN functions? Or just implement the ASN1 functions
in iText?
2. Limi
You would also have to implement the create() method properly to do
the create on the underlying graphics, and create a new wrapper
graphics.
On Mar 2, 2007, at 12:01 PM, robert engels wrote:
> Maybe just create a wrapper PdfGraphics that contains a reference
> to the unde
Maybe just create a wrapper PdfGraphics that contains a reference to
the underlying PdfGraphics and then delegate all methods to it.
Intercept the drawString calls, detect the urls, and then add the
annotations to the pdf.
-
What is the point in wasting my time fixing the code, if there is no
reasonable chance of getting it committed?
Paulo is obviously competent enough to understand the problem, and
the proposed solution.
I have a feeling that there is more too this than meets the eye, as
there is no technical
paul,
I think you misunderstand the JCE system or what I am stating -
although I did not use the term provider correctly in the strictest
sense.
The SUN provider in 1.5 includes significantly more cryptography
algorithms than the 1.4 and prior releases - most importantly it
includes an RS
My point was, if you use the standard Java interfaces, a user that is
running Java 1.3 or 1.4 can install the bouncy castle "provider" jars
and it will work.
A user that is running 1.5 does not need the bouncy castle jars since
the provider is already there.
With the current code, all users
do this as long as there is some reasonable
expectation that it will be accepted.
Thanks,
Robert Engels
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
Curious. Why is there a direct dependency on the bouncy castle jars?
Can't iText use the standard Java encryption packages (which will
locate the needed provider)?
Thanks,
Robert Engels
-
Take Surveys. Earn
It is a trivial change, so submit a patch that allows the 'convert
images to jpeg' to be enabled/disabled. You will need to use
'instance of' in your code.
Probably better though would be to change the drawImage handling so
that if the incoming image would create a mask if the source image h
There is an option on the PdfGraphics2D object to not convert the
images to JPEG.
It would be fairly trivial to modify this class to generate PNG
images (using ImageIO), but I am not certain that PDF supports PNG as
a native format however.
Are you sure that the Distiller is not using JPEG
I wasn't speaking to anyone in particular. Review the logs and check
how many times a day Bruno pleads that people do this...
On Jan 18, 2007, at 3:38 PM, [EMAIL PROTECTED] wrote:
> I have never had to provide a contained code example before and wasn't
> really thinking. Sorry. Geeshh
>
>
> ht
issue.
If you cannot do this, no one should attempt to answer your question.
I am betting however that is doing this, most of you will solve your
own problems, leaving Bruno and others more time to enhance iText or
do whatever else they might enjoy more than wasting time.
Have a nice day
Only certain printers can print PDF directly. If you query the
service, it is probably not a supported format.
If you convert the PDF to PS you will have better luck, but even then
most consumer grade printers do not have a postscript driver.
I think there is a Java PrintService that uses Gho
I think the best option would be to add a 'decimal aligned' in
addition to left,right,center,right aligned.
It shouldn't be too difficult.
First, using desired font:
Determine the width of the largest number, and calculate ((X+1) * the
number of decimal places). This is the right hand offset
Looks like you have no space left on the disk.
On Jan 11, 2007, at 2:38 PM, Jimenez, Roger wrote:
Hi, im trying to include an image inside a pdf the size of the
image is 1.002 kb whe I use the method document.add, the
application throws this exception:
What can be wrogn with my code or the
>>>>>> more
>>>>>> than my physical
>>>>>> memory, it throws out something like "no enough memory for
>>>>>> heap".
>>>>>>
>>>>>> We are going to merge a lot of small pdf fi
Not trivial at all. You would need several things:
1. A Java based renderer that supported a Clip region and when
rendering the PDF could detect if any of the commands would affect
the clipped regions. These commands would need to be tracked, along
with any other commands that might affect
Why are you even updating? If the existing code works, just use the
1.3 version. I would assume you can use the latest patch release 1.3.x.
If you are updating to use new features, then you'll need to do an
audit of the existing code to see what will break.
The easiest way to do this is might
e
specification...
Curious, does Acrobat allow an option 'Save as PDF/A'? or 'Check PDF/
A compliance'?
On Jan 1, 2007, at 6:46 AM, Leonard Rosenthol wrote:
On Dec 31, 2006, at 8:13 PM, robert engels wrote:
What is missing from PDF that you think is required fo
or Reader), than to develop a
proprietary plugin for Adobe Reader to view maps in a proprietary
format.
Happy New Year to all.
On Dec 31, 2006, at 5:59 PM, Leonard Rosenthol wrote:
On Dec 31, 2006, at 5:12 PM, robert engels wrote:
PDF was designed as print/prepress layout format.
PDF
Personally, I think you are heading down the wrong road.
PDF was designed as print/prepress layout format. Over the years they
have continually added more and interactive and multimedia features,
but it still is not a very good document format, and the additional
added complexities have made
eding this through a memory stream and I doubt
> that I
> would actually use it, but I don't feel comfortable with new
> components
> until I have fully exercised them and understand all the options.
>
> Dan
>
> robert engels wrote:
>> You are best to su
to respond.
>
> Any bright ideas or correction of my limited understanding of this
> subject would be greatly appreciated,
> Dan
>
> robert engels wrote:
>> We must be using different english...
>>
>> On Dec 29, 200
We must be using different english...
On Dec 29, 2006, at 5:14 PM, Daniel Essin wrote:
OK let me start over again. I was reading the dump incorrectly
and the
first byte is a %
-
Take Surveys. Earn Cash. Influence the Futu
How can it be 0 length if the first byte is a % ?
On Dec 29, 2006, at 3:53 PM, Daniel Essin wrote:
> The pdf is a 0 length file. There's probably no point in attaching it.
>
> Thanks. What next?
> Dan
>
> robert engels wrote:
>> Why don't you attach the pdf fi
Why don't you attach the pdf file?
On Dec 28, 2006, at 6:21 PM, Daniel Essin wrote:
>
>
> Daniel Essin wrote:
> OK let me start over again. I was reading the dump incorrectly and the
> first byte is a %
>
> So all I have is the problem that the code produces a stream that,
> when
> received by
work on another project that
uses iText for PDF generation.
There are MANY pdf generators that do not generate pdfs that agree
with the specification. It is amazing.
On Dec 28, 2006, at 1:20 PM, Paulo Soares wrote:
- Original Message -
From: "robert engels" <[EM
line 199 of PRTokenizer
int idx = str.indexOf("%PDF-1.");
is unnecessarily restrictive. We have encountered otherwise valid
PDFs (that Adobe Reader is able to open).
The line can be changed to
int idx = str.indexOf("%PDF-");
with no adverse affects.
We have found some PDF
close() calls channel.close() and set the channel variable to null.
The problem is that when the finalizer is eventually run, it will
also call close(), but now channel is = null, so an NPE is generated.
The code should be
if(channel!=null)
channel.close();
---
iText uses a memory mapped file. You may not enough enough contigiuos
address space to map a file that large.
iText needs to be changed to support a simple RandomAccessFile and
then it would work.
Doesn't matter anyway, since two 1.6 gig files would be larger than 2
gig...
On Dec 18, 2006
The final merged.
On Dec 18, 2006, at 2:31 AM, Davy Lee wrote:
>
> Dear Paulo,
> even for two 2G pdf file, do u have a better sosution to merge them,
> sometimes I don't need to modify the pages, sometime I do.
>
> btw, the 2G limitation is for the original pdf file or for the
> finnal merged
>
Image.setTransparency().
On Dec 12, 2006, at 12:37 PM, MCC wrote:
Thanks Robert,
Are these options supported with iText?
Mike
On 12/12/06, robert engels <[EMAIL PROTECTED]> wrote:
You need to make sure the background on the TIFF is transparent -
otherwise the watermark will not show t
You need to make sure the background on the TIFF is transparent -
otherwise the watermark will not show through.
I think a simpler and better performing result would be to use a
somewhat transparent watermark, and print the watermark on top.
On Dec 12, 2006, at 11:57 AM, MCC wrote:
>
>
> I
Currently if you use the PdfGraphics2D.drawImage() obtained from the PdfContentByte any image 'drawn' is converted to RGB.The supplied simple patch optimizes this so that binary images will be stored as G4 compressed images.This is important not so much in file size, but many readers can optimize t
Actually, I checked the archives and answered my own question...
seems Bruno asks that patches be posted to the mailing list.
On Dec 12, 2006, at 9:16 AM, robert engels wrote:
> Are the patches posted to the sourceforge site reviewed by anyone? Is
> this the proper way of suggesting c
Are the patches posted to the sourceforge site reviewed by anyone? Is
this the proper way of suggesting changes / fixing bugs? Should I
open a related issue?
Thanks,
Robert Engels
-
Take Surveys. Earn Cash. Influence the
many apps write to this gcs interleaved with
the original gc. If all the apps behaved as well as yours this wouldn't
be an issue.
> -Original Message-----
> From: Robert Engels [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 12, 2005 4:42 PM
> To: Paulo Soares; itext-ques
---
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Robert Engels
> Sent: Wednesday, October 12, 2005 4:20 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] iText bug?
> Importance: High
>
> I believe discovered a bug in the i
can
control this in our code, it is difficult with using third-party libraries with
iText to render their output as pdf.
Thanks,
Robert
Engels
53 matches
Mail list logo