Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Combine Two PDF Documents in Memory 6 years 6 months ago #12889

  • jersaw
  • jersaw's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
I am trying to combine two PDF documents in memory on Android. I have a premium license, but when I call Document.ImportStart(), it always returns null for the ImportContext.
Both documents I am trying to combine are opened using the OpenMem() function. They are still both open when I call ImportStart(). Both documents open correctly; it is only when trying to combine them that I have this issue.

Please Log in or Create an account to join the conversation.

Combine Two PDF Documents in Memory 6 years 6 months ago #12899

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
you can't import documents using OpenMem() because it's read only, that's why ImportStart always returns null ImportContext.
I suggest you to open them using OpenStream and PDFMemStream.

Something like that :
PDFMemStream m_mem_stream = new PDFMemStream(YOUR_BYTE_ARRAY);
int ret = doc_dst.OpenStream(m_mem_stream, "");

Please Log in or Create an account to join the conversation.

Last edit: by Davide.
  • Page:
  • 1
Powered by Kunena Forum