Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

How add UIimage

More
IP: 192.168.0.70 12 years 5 months ago #4281 by superpisu
How add UIimage was created by superpisu
i try to add Uiimage to pdf i found this in doc :

bool Page_addAnnotBitmap( PDF_PAGE page, CGImageRef bitmap, bool has_alpha, const PDF_RECT *rect )

but in PDFIOS.h

bool Page_addAnnotBitmap( PDF_PAGE page, PDF_MATRIX matrix, CGImageRef bitmap, bool has_alpha, const PDF_RECT *rect );

you can write me simple code for add image ?
More
IP: 192.168.0.70 12 years 5 months ago #4284 by superpisu
Replied by superpisu on topic How add UIimage
my code :
Code:
PDF_RECT rect; PDFVPage *vpage = [m_view vGetPage:pageno]; PDF_PAGE page = [vpage GetPage]; Page_objsStart(page); PDF_MATRIX mat = [vpage CreateMatrix]; UIImage *ptimg = [UIImage imageNamed:@"test.png"]; rect.bottom=300; rect.top=0; rect.left=0; rect.right=300; Page_addAnnotBitmap(page, mat,ptimg.CGImage, true, &rect); Matrix_destroy(mat); [m_view vRenderPage:pageno]; m_modified = (m_rects_cnt != 0); m_rects_cnt = 0; m_rects_drawing = false; m_status = sta_none; [self refresh]; Document_save(m_doc);
More
IP: 192.168.0.70 12 years 5 months ago #4295 by radaee
Replied by radaee on topic How add UIimage
for Page_addAnnotBitmap, you shall:
--invoke Document_SetCacheData when opened.
--CGImageRef must in RGBA 32-bits format.
More
IP: 192.168.0.70 12 years 5 months ago #4305 by superpisu
Replied by superpisu on topic How add UIimage
not found Document_SetCacheData in ios doc

and image is RGBA 32-bits format
More
IP: 192.168.0.70 12 years 5 months ago #4307 by radaee
Replied by radaee on topic How add UIimage
OK, it seems, we forgot to add this method.
we'll update recently.
More
IP: 192.168.0.131 12 years 5 months ago #4313 by emanuele
Replied by emanuele on topic How add UIimage
Hi,

a new demo version is now available, with Document_created and Document_setCache methods:

www.androidpdf.mobi/download/download-io...56-ios-pdfviewer-171
Time to create page: 0.371 seconds
Powered by Kunena Forum