Vectors are good - just wasn't sure what you were trying to accomplish.

The problem is that you've exceed the maximum size of a standard PDF page 
(200in in each direction).   You can try using the UserUnits key on the Page 
dictionary to extend the page size large enough for your content.  You can try 
to apply an appropriate CTM in order to get it to render correctly.  You can 
break it across multiple pages.

Leonard

-----Original Message-----
From: Jan Mikelson [mailto:[email protected]] 
Sent: Friday, January 20, 2012 9:23 AM
To: [email protected]
Subject: Re: [iText-questions] Acrobat Reader fails to properly display large 
iText pdf

Hey Leonard,

thanks for the quick reply. 

We know that the exported vector graphics have indeed very strange dimensions, 
but this is intended, since this is the figure of a data matrix with 40 columns 
and about 6000 rows. Other pdf viewers display the figure as expected. 
We want the figure to be vector graphics for further scaling or printing. Do 
you suggest to combine it with raster data (is it even possible? how would this 
work?)? 

Thanks

Jan

Concerning the "imageConsumer": 
This is just a class providing a Java Swing Component and a dimension. 

On Fri, 2012-01-20 at 05:44 -0800, Leonard Rosenthol wrote:
> I don't know what an "imageConsumer" is, but the values that it is giving you 
> are pretty crazy!
> 
> For example, the page in the provided document is 860x65220(!!).   So you are 
> getting a VERY LONG page.
> 
> And then looking at the drawing instructions, they too are VERY strange also 
> with coordinates into the 65000.
> 
> I assume that this is all incorrect - so I would go back and figure out why 
> you have such strange values.
> 
> Also, I see NO raster data associated wih this page - only vector drawing 
> instructions.
> 
> Leonard
> 
> -----Original Message-----
> From: Jan Mikelson [mailto:[email protected]]
> Sent: Friday, January 20, 2012 7:55 AM
> To: [email protected]
> Subject: [iText-questions] Acrobat Reader fails to properly display 
> large iText pdf
> 
> Hi all,
> 
> I have a question concerning pdf creation using iText. We use iText in a Java 
> project to create pdf files. We observed, that if the created pdf file is 
> large (e.g. 4 MB), Adobe Acrobat Reader fails to display it properly. All 
> other pdf reader such as Document Viewer on Ubuntu or Preview on Mac work 
> just fine. 
> Adobe Acrobat Reader usually displays the pdf only after changing the 
> resolution in the picture display properties and even then it cuts off the 
> top of the document. This has been observed on ubuntu 11.04 and Windows 7. 
> This is the code we use to create the pdf files:
> 
> 
> //Code begin
> Component component = imageConsumer.getComponent(); Dimension 
> imageSize = imageConsumer.getImageSize();
> 
> Document document = new Document(new 
> RectangleReadOnly(imageSize.width,
> imageSize.height));
> 
> //exportFile is the file name as a String PdfWriter writer = 
> PdfWriter.getInstance(document, new FileOutputStream(exportFile));
> 
> document.open();
> 
> PdfContentByte contByte = writer.getDirectContent(); Graphics2D 
> graphics = contByte.createGraphics(imageSize.width,
> imageSize.height);
> 
> //this only scales the image
> double sx = 1.0 * imageSize.width / component.getWidth(); double sy = 
> 1.0 * imageSize.height / component.getHeight();
> 
> graphics.scale(sx, sy);
> component.printAll(graphics);
> graphics.dispose();
> 
> document.close();
> 
> //Code end
> 
> I attached a sample pdf with the above described behavior. 
> I would like to know, whether this is a known problem and is due to the 
> implementation of iText, a flawed implementation of our code or a bug or 
> problem in the Adobe Acrobat Reader.
> 
> Any help is greatly appreciated
> 
> 
> 
>   
> ----------------------------------------------------------------------
> -------- Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft 
> developers is just $99.99! Visual Studio, SharePoint, SQL - plus 
> HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you 
> subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> 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



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just 
$99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style 
Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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

Reply via email to