Print Page | Close Window

Garbled copy text from a pdf file created by qp

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2297
Printed Date: 29 Jan 26 at 1:20PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Garbled copy text from a pdf file created by qp
Posted By: verysharp
Subject: Garbled copy text from a pdf file created by qp
Date 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? 



Replies:
Posted By: AndrewC
Date 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.


Posted By: verysharp
Date 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;


Posted By: AndrewC
Date Posted: 11 Jun 12 at 9:13AM
You could use a service such as  http://www.filedropper.com/ - http://www.filedropper.com/  or   http://www.mediafire.com/ - http://www.mediafire.com/  

Andrew.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk