In addition to the error Keith found there is another one. You've missed
to include the second last line of coding in the if clause with the
special handling for images with different dpi values.
***
'if images have a different resolution (dpi value) for
x and y the scaling considers it
If img.DpiX <> 0 And img.DpiY <> 0 And img.DpiX <>
img.DpiY Then
img.ScalePercent(100)
Dim percentX As Integer = (PageSize.A4.Width *
100) / img.Width
Dim percentY As Integer = (PageSize.A4.Height() *
100) / img.Height()
scaling is missing java: img.scalePercent(percentX,
percentY);
'img.setWidthPercentage(0)
img.WidthPercentage = 0
Else
***
Best regards
Benjamin
Von: Keith O <kuujinbo.mail.l...@googlemail.com>
An: Post all your questions about iText here
<itext-questions@lists.sourceforge.net>
Datum: 14.12.2011 16:42
Betreff: Re: [iText-questions] Antwort: Re: Converting Fax Tiff to
PDF
On Wed, Dec 14, 2011 at 3:59 PM, Hugh McLaughlin <h...@kmcnetwork.com>
wrote:
> Thanks for the response and offer. I have attached the code in a text
file. I'm not sure if it is a Java to C# to Vb.Net problem or a possible
difference between the iText and the iTextSharp port. Since I'm pretty
new to the whole iText scene, I'm still chasing my tale little bit with
the differences.
Took a quick look - in the attachment you instantiated the document
object with a Rectangle with the following parameters:
0, 0, 1700, 2200
That's not an A4 PageSize, like your original example. If you want
that page size, you need to change your scaling logic to meet
**those** page dimensions. I.e. replace all occurences of
"PageSize.A4.Width" and "PageSize.A4.Height" with the document's page
width and height.
------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits?
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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
____________________________________________________________________
Viessmann IT Service GmbH
Geschäftsführer: Dirk Klöckner, Dr. Harald Dörnbach
Sitz der Gesellschaft: Allendorf (Eder) - Registergericht:
AG Marburg (Lahn) - HRB 5324 - USt-IdNr.: DE258558424
____________________________________________________________________
------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits?
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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