B4A Library Printing and Pdf creation - Erel    
May 18, 2020   
(55 reactions)This is an Android 4.4+ (API 19+) library.
Its two main features are:
1. Creating Pdf documents with the PdfDocument object.
2. Printing with the Printer object.
Lets start with PdfDocument.
Dim pdf As PdfDocument
pdf.Initialize
pdf.StartPage(595, 842) 'A4 size
pdf.Canvas.DrawLine(2, 2, 593 , 840, Colors.Blue, 4)
pdf.Canvas.DrawText("Hello", 100, 100, Typeface.DEFAULT_BOLD, 30 / GetDeviceLayoutValues.Scale , Colors.Yellow, "CENTER")
pdf.FinishPage
Dim out...
B4A Class [B4X] PDF Generator - B4X Cross Platform - Class 100% B4X Code - spsp    
Jan 3, 2024   
(57 reactions)Hi,
This class cPDF.bas (version 0.6 - 2024-01-03) generate PDF File with limited fonctionnalities (but enough for me)
Add pages with different paper size (use constants or custom size)
PDF...
link:
Hi, did you have any luck on succeeding adding utf8 support in your class?
this is an important pr...
link:
I need some help to achieve this.
Hi, did you have any luck on succeeding adding utf8 support in ...
link:
Hello, I made several adjustments to the cPDF class so that it is also compatible with iOS...
B4A Code Snippet [B4X] Open PDF - Lucas Siqueira    
Feb 19, 2025   
(9 reactions)
Sub OpenPDF(dirFile As String, nameFile As String)
Try
#If B4A
' Platform...
' Configure the Intent to open the PDF
Dim docIntent As Intent
docIntent...)
docIntent.SetType("application/pdf")
docIntent.Flags = Bit.Or(1, 2) '...) = False Then
Log("iOS - Error: PDF file not found in " & dirFile &... DocumentInteraction to open the PDF
Dim docInteraction As DocumentInteraction
docInteraction...
B4A Tutorial [B4XDaisyUIKit] Beautiful, High-Performance PDF Rendering Made Simple (100% Beginner Friendly!) - Mashiane    
Aug 4, 2026   
(13 reactions)Hi B4X Community,
Rending PDFs natively on Android can be a daunting task, requiring complex... on the outstanding work of DonManfred, who wrapped Bartosz Schiller's popular AndroidPdfViewer and..., set up its properties, load a PDF, and trap its key events.
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
' Declare our custom view component
Private pdfViewer...)
pdfViewer.Initialize(Me, "pdfViewer")
' 2. Programmatically add it to your root...
B4A Code Snippet [B4X] [B4Xpages] PDF to Image (B4XBitmap) - Star-Dust    
Aug 2, 2023   
(10 reactions)I often needed to turn a PDF into an image, most of the time to have it printed on a thermal... an image with Windows / Android / iOs from a PDF file
NB. For Windows it is necessary to download.../android/forum/threads/pdfrenderer-v0-10-beta-create-your-own-pdf-viewer.49103/
...
link: I often needed to turn a PDF into an image, most of the time to have it printed on a thermal...
B4A Example WebViewSharePDF - aeric    
Feb 20, 2025   
(8 reactions)There are some examples on this forum for
1. saving Webview content as Bitmap,
2. creating PDF file using Printing library and
3. opening or sharing the PDF file to WhatsApp using FileProvider library
but I don't see combination of these code
so I have made a lot of trials and errors and
finally come out with a working example.
GitHub: https://github.com/pyhoon/WebViewSharePDF-B4A...
B4A Question Find out if the user's device has a PDF viewer? - Sergey_New    
Apr 28, 2023Please tell me how to find out if there is a PDF viewer on the user's device?...
B4A Question How to insert Image in pdf file as 1.pdf? - Olaan    
Jul 6, 2025For this line code as belows, Is there way inserting Image to be a part of 1.pdf, or not?
printer.PrintHtml("job", $"<img src="${WebViewAssetFile("smiley.png"...
link: Here is my the lastest project which is attached. there is still error code...
link: I think Teddybear's strategy may be done.(Merge pdfs)
https://www.b4x.com/android/forum/threads...
link: - This line is not related to PDFs
- No. You need to edit a PDF first (and save again) to use it in...
B4A Library [B4X][B4XLIB] WebViewPdfExport - Segga    
May 8, 2026   
(16 reactions)Generates a full-content PDF from your WebView. No print dialogs. Automatically opens the system... PdfPrint.jar is based on brettwold's gist, enhanced with a completion callback for silent PDF generation.
Usage
Dim pdfExport As WebViewPdfExport
pdfExport.Initialize(myWebView)
Wait For (pdfExport.ExportAndShare("Report.pdf", "Share Report")) Complete (success As Boolean)
or...
link: That is excellent. Solved my problem of webview to pdf instability issue. Thank you Segga!...
B4A Library HtmlToPdf - FabioC6    
Mar 22, 2019   
(16 reactions)Hello everybody,
I've created this library that converts an html file (or string) to a pdf... an example attached to this thread.
PalmoHtmlToPdf
Events:
Finished (Success As Boolean...
link: . Does it create a PDF in your DirRootExternal that you can open?
Yes, this working perfectly...
link: but need to know from you if it is working or not. Does it create a PDF in your DirRootExternal...
link: named LogoUseyyyymmdd_hhmmss.pdf in your DirRootExternal. Allow/select the required permissions when...
Page: 1  
2  
3  
4  
5  
6  
7