android - how to create a pdf document with bitmap use pdfium? -


i have tried pdfium produce pdf in android4.3. have not idea how add bitmap fpdf_page. test source code:

int main(){   fpdf_initlibrary();   fpdf_document  ppdfdoc = fpdf_createnewdocument();   //insert   fpdf_page pdf_page = fpdfpage_new(ppdfdoc,0,500,600);   fpdf_pageobject  object = fpdfpageobj_newimgeobj(ppdfdoc);     //add bitmap object.   //what should here????     fpdfpage_generatecontent(pdf_page);   fpdfpage_insertobject(pdf_page, object);    int fd = open("/sdcard/temp.pdf",o_rdwr|o_creat);   if (fd < 1)   {     printf("cannot write file descriptor. %d : error:%d", fd,errno);   }   writepdf(ppdfdoc,fd);   fpdf_destroylibrary();   return 0; } 

thank you!!

there fpdfimageobj_setbitmap can used set fpdf_bitmap image object.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -