B4A Library PDFjetB4A

warwound

Expert
Licensed User
Longtime User
PDFjet is a PDF creator library so you can create PDFs.
That applies to both open source and paid for versions.

Modifying existing PDFs is supported only in the commercial version.

Martin.
 

flandersdl

Member
Licensed User
Longtime User
I just found your library today and can only download version 5.07. Only a couple of the examples still work in either b4a or b4j. So it seems that the new version had broken your wrapper.
I am going to download you compiled open source to continue testing.
 

warwound

Expert
Licensed User
Longtime User
@flandersdl

Thanks for reporting that the latest version of PDFjet does not work with the b4a and b4j libraries.
I've made a note to look at an update but can't promise anything soon, i'm rather busy with other things for a while.
 

flandersdl

Member
Licensed User
Longtime User
No worries for me. I am still in the early stages of the program. Whenever you get to it will work for me.
 

johndb

Active Member
Licensed User
Longtime User
Is there any update as to when the library will be updated for the new PDFjet version?
Not to sound pushy or anything Just curious

Thanks,

John
 

warwound

Expert
Licensed User
Longtime User
Is there any update as to when the library will be updated for the new PDFjet version?
Not to sound pushy or anything Just curious

Thanks,

John

I'll be too busy with work for the rest of this month to look at an update - i've made a note on my calendar to look at it in Feb.
 

peacemaker

Expert
Licensed User
Longtime User
FAQ says:
  • Cyrillic and Greek do not require embedded fonts.
But sample is http://pdfjet.com/java/examples/example-06.html and shows that font is to be embedded.
And free version does not have Font.Initialize4 method...
Good lib , but useless, for national letters :-(.
 

peacemaker

Expert
Licensed User
Longtime User
Martin,
Does free version contain the method ?
B4X:
PDFjetPDF1.AddPage
Or only in paid version ?

After adding a new page i always get java.lang.NullPointerException...
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Greetings.

I am testing the library modifying the sample app provided by Martin. I am trying to just print 10 lines. This is the code:

B4X:
Dim PDFPage As PDFjetPage
    PDFPage.Initialize(PDFjetPDF1, PDFjetConstants1.PageSize.Letter_LANDSCAPE) '.A4_PORTRAIT)
   
    Dim PDFFont1 As PDFjetFont
    PDFFont1.Initialize(PDFjetPDF1, PDFjetConstants1.CoreFont.TIMES_ROMAN)
   
   For i = 1 To 10
        PDFPage.PrintLn2("This is thePDFjetTextLine object, it should be rendered at point (10, 10) on the PDF page. i = " & i )
    Next

I get a blank page. What is wrong with the code?

Any and all help is welcomed.

Thank you.

Sandy
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Greetings.

This code works, but why not just the PrintLn2?

B4X:
    Dim PDFPage As PDFjetPage
    PDFPage.Initialize(PDFjetPDF1, PDFjetConstants1.PageSize.Letter_LANDSCAPE) '.A4_PORTRAIT)
   
    Dim PDFFont1 As PDFjetFont
    PDFFont1.Initialize(PDFjetPDF1, PDFjetConstants1.CoreFont.TIMES_ROMAN)
   
    Dim PDFTextLine As PDFjetTextLine
    PDFTextLine.Initialize(PDFFont1)
    'PDFTextLine.SetPosition(10, 10+PDFFont1.GetHeight)
    For i = 1 To 10
        PDFTextLine.SetPosition(10, i*(10+PDFFont1.GetHeight))
        PDFTextLine.SetText("This is the PDFjetTextLine object, it should be rendered at point x=10, y= " & (i*(10+PDFFont1.GetHeight)))
        PDFTextLine.DrawOn(PDFPage)
        'PDFPage.PrintLn
        'PDFPage.Print("test print " & i)
        'PDFPage.PrintLn
    Next

Any help is welcome.

Sandy
 

peacemaker

Expert
Licensed User
Longtime User
RU text i have to print by bitmap-lines :-( no UTF-8 font to be embedded :-(
 

peacemaker

Expert
Licensed User
Longtime User
Non-latin symbols for PDF require a Unicode font to be embedded into the PDF file.
This lib allows only 3 or 4 asian Unicode fonts without embedding, but they look terrible.
So, i print text on Bitmap by a canvas and assemble PDF from such Bitmap lines :-(
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Thank you, peacemaker.

Yours is truly a universal solution. Good to know for potential development in the future. My target market, international, will only include Latin symbols in 4 languages initially...

I am new to this pdfview wonderful library (thank you, Martin). My question remains why the PrintLn2 or the Print does not work in my post above? I get a blank page.

Best regards.

Sandy
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…