Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Text position problem when inserting text to PDF.

Text position problem when inserting text to PDF.

2006-08-10       - By Paulo Soares

 Back
The media box doesn't start at 0,0. There's nothing wrong with it but you
must adjust the position.

Paulo

-- -- Original Message -- --
From: "SeungHyun Park" <enzen.dark@(protected)>
To: <itext-questions@(protected)>
Sent: Thursday, August 10, 2006 7:46 AM
Subject: [iText-questions] Text position problem when inserting text to PDF.


> Hello.
>
>
>
> I have used iText to handle existing PDF files.
>
>
>
> I have developed a program to insert text to existing PDF files.
>
>
>
> My program works very well while I have inserted  text  to many PDF.
>
>
>
>
>
>
>
> But, I face strange problem.
>
>
>
> I found a PDF file where text cannot be inserted. Actually text may be
> inserted to outside of page.
>
>
>
> When I debug it, my code is correct and iText extracts correct page size
> but
> the text is inserted to wrong position that is different for me to assign.
>
>
>
>
>
> I wrote test code and it is as the following; (I use iTextsharp 3.1.0.0
> and
> 3.1.3.0.)
>
> ============================================================
>
>    Private Sub Test1()
>        Dim SourceFileName As String = Environment.CurrentDirectory &
> "\test.pdf"
>        Dim OutputFileName As String = Environment.CurrentDirectory &
> "\test_output.pdf"
>
>
>        FontFactory.RegisterDirectories()
>
>        Dim reader As New PdfReader(SourceFileName)
>        Dim Stamp As New PdfStamper(reader, New FileStream(OutputFileName,
> FileMode.Create))
>
>        Dim oFont As Font = FontFactory.GetFont("Gulim",
> BaseFont.IDENTITY_H,
> True, 30)
>
>        Dim oLayer As PdfContentByte = Stamp.GetOverContent(1)
>
>        oLayer.BeginText()
>
>        oLayer.SetFontAndSize(oFont.BaseFont, 30)
>
>        oLayer.ShowTextAligned(PdfContentByte.ALIGN_LEFT, "Test Text", 10,
> 10, 0)
>
>        oLayer.EndText()
>
>        Stamp.Close()
>        reader.Close()
>
>    End Sub
>
> =============================================================
>
> It works well with many PDF files but it does not with the special PDF
> file.
>
>
>
> I cannot see the text when I assign the position to (10, 10) but I can see
> it when I assign (10, 1000) at above code. but its position is not  to
> want to
> insert.
>
>
>
>
>
> Its producer string is Adobe Acrobat 7.0AC PDFScanib v 1.2.2  and its
> version is PDF 1.6.
>
> It may be created by Acrobat 7 and scanner.
>
>
>
>
>
> Finally I attach the strange PDF file  for your testing.
>
>
>
>
>
>
>
>
>
> If you could take a few minutes to answer my questions, I would really
> appreciate it.
>
>
>
>
>
>
>
> Best regards,
>
>
>
> S. H. Park
>


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --


> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --


> __ ____ ____ ____ ____ ____ ____ ____ ____ ____
> iText-questions mailing list
> iText-questions@(protected)
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions

©2008 junlu.com - Jax Systems, LLC, U.S.A.