Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Garbled copy text from a pdf file created by qp
  FAQ FAQ  Forum Search   Register Register  Login Login

Garbled copy text from a pdf file created by qp

 Post Reply Post Reply
Author
Message
verysharp View Drop Down
Beginner
Beginner


Joined: 04 Jun 12
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote verysharp Quote  Post ReplyReply Direct Link To This Post Topic: Garbled copy text from a pdf file created by qp
    Posted: 08 Jun 12 at 11:38AM
part code for create pdf file using quickpdf library 7.26:
TempHDC := QuickPDF.getCanvasDC(width,heigth);
HandleFile := GetEnhMetaFile(PAnsiChar(FileName));//get the handle of the emf file
EnumEnhMetaFile(TempHDC,HandleFile,@EnumProc,nil,Rect(0,0,width,height));
LoadFromCanvasDC(72,0);
...
I used TextOutW function in EnumProc to draw word on TempHDC,but then,the word can't be recognised by any other application.
why it like this? 
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 08 Jun 12 at 11:44AM
Can you please post a link to the PDF that is being created and a little more of the source code for EnumProc showing what functions you are using.  What also could be helpful is if you could save the EMF file to disk and provide a link that we can download and see what is happening.

Andrew.
Back to Top
verysharp View Drop Down
Beginner
Beginner


Joined: 04 Jun 12
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote verysharp Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jun 12 at 7:21AM
the emf is created by extracting from spl file create by printer.
when printing a document,there will be a spl file and shd file in the printer temp folder.
And I don't know how to post a link.Cry
part code in EnumProc function as blow:
function EnumProc(DC:HDC;lpTable:PHANDLETABLE;MetaRecord:PENHMETARECORD;obj,lpData:Integer):Integer;
begin
if MetaRecord.iType = EMR_EXTTEXTOUTW then
begin
...//get the value of TextStr,if write TextStr to TXT file, The Word is displayed fine;
TextOutW(DC,left,top,TextStr);
end;
  PlayEnhMetafileRecord(DC,lpTable^,MetaRecord^,obj);
...
end;


Edited by verysharp - 11 Jun 12 at 7:22AM
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jun 12 at 9:13AM
You could use a service such as  http://www.filedropper.com/ or  http://www.mediafire.com/ 

Andrew.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store