You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Münzenmaier (JIRA)" <ji...@apache.org> on 2011/09/03 15:18:09 UTC

[jira] [Created] (PDFBOX-1113) Pdfbox ReplaceString works but the result is unreadable

Pdfbox ReplaceString works but the result is unreadable
-------------------------------------------------------

                 Key: PDFBOX-1113
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1113
             Project: PDFBox
          Issue Type: Bug
          Components: FontBox, PDModel
    Affects Versions: 1.6.0, 1.5.0, 1.4.0
         Environment: Windows, Eclips 3.5, Adobe Reader 9
            Reporter: Andreas Münzenmaier


with a PDF document containing text like this:
TEST:	«TEST0123»
TEST BOLD:	«TEST0123»
TEST:	«TEST012345678901234567890»

used the following test code

frist problem :
the "ABCDEF" ist not show in the PDF. ( Will try to attach the PDF)

second:
the «TEST012345678901234567890» isn't replaced at all ( not critical...)

###############################################
import junit.framework.TestCase;
import org.apache.log4j.Logger;
import org.apache.pdfbox.examples.pdmodel.ReplaceString;

public class testPdfReplaceTest extends TestCase  {

	final Logger log = Logger.getLogger( this.getClass() );
	public void testPdfMod() throws Exception
	{

		String in = "test/TEST.pdf";
		
		ReplaceString x;
		
		ReplaceString r = new ReplaceString();
						
		r.doIt(in, "tmp/ok1.pdf", "«TEST0123»", "TEST0123");   // OK
	
		r.doIt(in, "tmp/fail1.pdf", "«TEST0123»", "ABCDEFG");   // FAILES SCRAMBELD
		r.doIt(in, "tmp/fail2.pdf", "«TEST012345678901234567890»", "TEST0123");   // FAILES, string not replaced
		
		
	}
}

##################################

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (PDFBOX-1113) Pdfbox ReplaceString works but the result is unreadable

Posted by "Andreas Münzenmaier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Münzenmaier updated PDFBOX-1113:
----------------------------------------

    Attachment: fail1.pdf

the unreadable fonts

> Pdfbox ReplaceString works but the result is unreadable
> -------------------------------------------------------
>
>                 Key: PDFBOX-1113
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1113
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox, PDModel
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0
>         Environment: Windows, Eclips 3.5, Adobe Reader 9
>            Reporter: Andreas Münzenmaier
>         Attachments: TEST.pdf, fail1.pdf, ok1.pdf, sample.java
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> with a PDF document containing text like this:
> TEST:	«TEST0123»
> TEST BOLD:	«TEST0123»
> TEST:	«TEST012345678901234567890»
> used the following test code
> frist problem :
> the "ABCDEF" ist not show in the PDF. ( Will try to attach the PDF)
> second:
> the «TEST012345678901234567890» isn't replaced at all ( not critical...)
> ###############################################
> import junit.framework.TestCase;
> import org.apache.log4j.Logger;
> import org.apache.pdfbox.examples.pdmodel.ReplaceString;
> public class testPdfReplaceTest extends TestCase  {
> 	final Logger log = Logger.getLogger( this.getClass() );
> 	public void testPdfMod() throws Exception
> 	{
> 		String in = "test/TEST.pdf";
> 		
> 		ReplaceString x;
> 		
> 		ReplaceString r = new ReplaceString();
> 						
> 		r.doIt(in, "tmp/ok1.pdf", "«TEST0123»", "TEST0123");   // OK
> 	
> 		r.doIt(in, "tmp/fail1.pdf", "«TEST0123»", "ABCDEFG");   // FAILES SCRAMBELD
> 		r.doIt(in, "tmp/fail2.pdf", "«TEST012345678901234567890»", "TEST0123");   // FAILES, string not replaced
> 		
> 		
> 	}
> }
> ##################################

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (PDFBOX-1113) Pdfbox ReplaceString works but the result is unreadable

Posted by "Andreas Münzenmaier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Münzenmaier updated PDFBOX-1113:
----------------------------------------

    Attachment: TEST.pdf

input sample file

> Pdfbox ReplaceString works but the result is unreadable
> -------------------------------------------------------
>
>                 Key: PDFBOX-1113
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1113
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox, PDModel
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0
>         Environment: Windows, Eclips 3.5, Adobe Reader 9
>            Reporter: Andreas Münzenmaier
>         Attachments: TEST.pdf, fail1.pdf, ok1.pdf, sample.java
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> with a PDF document containing text like this:
> TEST:	«TEST0123»
> TEST BOLD:	«TEST0123»
> TEST:	«TEST012345678901234567890»
> used the following test code
> frist problem :
> the "ABCDEF" ist not show in the PDF. ( Will try to attach the PDF)
> second:
> the «TEST012345678901234567890» isn't replaced at all ( not critical...)
> ###############################################
> import junit.framework.TestCase;
> import org.apache.log4j.Logger;
> import org.apache.pdfbox.examples.pdmodel.ReplaceString;
> public class testPdfReplaceTest extends TestCase  {
> 	final Logger log = Logger.getLogger( this.getClass() );
> 	public void testPdfMod() throws Exception
> 	{
> 		String in = "test/TEST.pdf";
> 		
> 		ReplaceString x;
> 		
> 		ReplaceString r = new ReplaceString();
> 						
> 		r.doIt(in, "tmp/ok1.pdf", "«TEST0123»", "TEST0123");   // OK
> 	
> 		r.doIt(in, "tmp/fail1.pdf", "«TEST0123»", "ABCDEFG");   // FAILES SCRAMBELD
> 		r.doIt(in, "tmp/fail2.pdf", "«TEST012345678901234567890»", "TEST0123");   // FAILES, string not replaced
> 		
> 		
> 	}
> }
> ##################################

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (PDFBOX-1113) Pdfbox ReplaceString works but the result is unreadable

Posted by "Andreas Münzenmaier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Münzenmaier updated PDFBOX-1113:
----------------------------------------

    Attachment: sample.java

sample code

> Pdfbox ReplaceString works but the result is unreadable
> -------------------------------------------------------
>
>                 Key: PDFBOX-1113
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1113
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox, PDModel
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0
>         Environment: Windows, Eclips 3.5, Adobe Reader 9
>            Reporter: Andreas Münzenmaier
>         Attachments: TEST.pdf, fail1.pdf, ok1.pdf, sample.java
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> with a PDF document containing text like this:
> TEST:	«TEST0123»
> TEST BOLD:	«TEST0123»
> TEST:	«TEST012345678901234567890»
> used the following test code
> frist problem :
> the "ABCDEF" ist not show in the PDF. ( Will try to attach the PDF)
> second:
> the «TEST012345678901234567890» isn't replaced at all ( not critical...)
> ###############################################
> import junit.framework.TestCase;
> import org.apache.log4j.Logger;
> import org.apache.pdfbox.examples.pdmodel.ReplaceString;
> public class testPdfReplaceTest extends TestCase  {
> 	final Logger log = Logger.getLogger( this.getClass() );
> 	public void testPdfMod() throws Exception
> 	{
> 		String in = "test/TEST.pdf";
> 		
> 		ReplaceString x;
> 		
> 		ReplaceString r = new ReplaceString();
> 						
> 		r.doIt(in, "tmp/ok1.pdf", "«TEST0123»", "TEST0123");   // OK
> 	
> 		r.doIt(in, "tmp/fail1.pdf", "«TEST0123»", "ABCDEFG");   // FAILES SCRAMBELD
> 		r.doIt(in, "tmp/fail2.pdf", "«TEST012345678901234567890»", "TEST0123");   // FAILES, string not replaced
> 		
> 		
> 	}
> }
> ##################################

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (PDFBOX-1113) Pdfbox ReplaceString works but the result is unreadable

Posted by "Andreas Münzenmaier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Münzenmaier updated PDFBOX-1113:
----------------------------------------

    Attachment: ok1.pdf

the file that is ok

> Pdfbox ReplaceString works but the result is unreadable
> -------------------------------------------------------
>
>                 Key: PDFBOX-1113
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1113
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox, PDModel
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0
>         Environment: Windows, Eclips 3.5, Adobe Reader 9
>            Reporter: Andreas Münzenmaier
>         Attachments: TEST.pdf, fail1.pdf, ok1.pdf, sample.java
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> with a PDF document containing text like this:
> TEST:	«TEST0123»
> TEST BOLD:	«TEST0123»
> TEST:	«TEST012345678901234567890»
> used the following test code
> frist problem :
> the "ABCDEF" ist not show in the PDF. ( Will try to attach the PDF)
> second:
> the «TEST012345678901234567890» isn't replaced at all ( not critical...)
> ###############################################
> import junit.framework.TestCase;
> import org.apache.log4j.Logger;
> import org.apache.pdfbox.examples.pdmodel.ReplaceString;
> public class testPdfReplaceTest extends TestCase  {
> 	final Logger log = Logger.getLogger( this.getClass() );
> 	public void testPdfMod() throws Exception
> 	{
> 		String in = "test/TEST.pdf";
> 		
> 		ReplaceString x;
> 		
> 		ReplaceString r = new ReplaceString();
> 						
> 		r.doIt(in, "tmp/ok1.pdf", "«TEST0123»", "TEST0123");   // OK
> 	
> 		r.doIt(in, "tmp/fail1.pdf", "«TEST0123»", "ABCDEFG");   // FAILES SCRAMBELD
> 		r.doIt(in, "tmp/fail2.pdf", "«TEST012345678901234567890»", "TEST0123");   // FAILES, string not replaced
> 		
> 		
> 	}
> }
> ##################################

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira