Convert BLOB in RTF Format to BLOB in PDF Format
Hi
I am having a BLOB in database in RTF format and I want to convert this to BLOB in PDF format. Can this be done ?
Thanks
Jamith
i fear not with pl/sql only.
You will need a external tool, in example:
http://www.freedownloadscenter.com/Best/rtf2pdf-font.html
Similar Messages
-
Hi,
Is there a way to build a utility program which accepts HTML file and converts it to RTF Format. I do not wish to install or purchase any 3rd party software. Please suggest.
Regards,
MuraliWrite or find an HTML parser; define the required mapping from input to output; and implement it. There is no RTF library built into Java so you will have to find or write that too.
-
How to convert BLOB data into string format.
Hi,
I have problem while converting blob data into string format.
for example,
Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
will get me the first 4000 byte of BLOB .
When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
declare
my_var CLOB;
BEGIN
for x in (Select X from T)
loop
my_var:=dbms_lob.substr(x.X,32767,1)
end loop
return my_var;
I comfortably convert 32k BLOB field to string.
My problem is how to convert blob to varchar having size more than 32K.
Please help me to resolve this,
Thanx in advance for the support,
NileshNilesh,
. . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
-- resulting string:
☺AW(⌂özßHAA
Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
Regards,
Noel -
How can I convert a large BLOB to a varchar within Oracle? I tried to fetch the BLOB field to put into a VARCHAR2 field, but, if I select more than 4000, It is throwing an error - ORA:06502 PL/SQL: numeric or value error: raw variable length too long.
Here is the query I executed for the blob datatype conversion in crystal reports and works fine but I am losing half of the document. If I put 4001, I get the error message above.
SELECT package_id,
(dbms_lob.substr(STORED_DOCS(IMPORT_PACKAGE_STORE. STORED_DOCUMENT),4000)) as stored
FROM
IMPORT_PACKAGE_STORE
where package_id=1
Here's the function STORED_DOCS...
create or replace function STORED_DOCS(B BLOB)
return clob is
c clob;
n number;
begin
if (b is null) then
return null;
end if;
if (length(b)=0) then
return empty_clob();
end if;
dbms_lob.createtemporary(c,true);
n:=1;
while (n+32767<=length(b)) loop
dbms_lob.writeappend(c,32767,utl_raw.cast_to_varchar2(dbms_lob.substr(b,32767,n)));
n:=n+32767;
end loop;
dbms_lob.writeappend(c,length(b)-n+1,utl_raw.cast_to_varchar2(dbms_lob.substr(b,length(b)-n+1,n)));
return c;
end;
My question is: Is there any way to fetch more than 4000 char BLOB field into a VARCHAR2 field.?dhanu !! wrote:
Hi,
I have a table with a column type blob. This column has a file contents which is either encoded in utf-8 or utf-16 format. When the encoding is utf-16, if query the database and try access the column contents by converting blob data into clob (or blob to varchar)How do you check this? Is there any other column in the table which stores this information?
- I do not see any valid data in the query result. All I get is inverted "?" and boxes suggesting invalid data.Most probably database and client character set mismatch or your client is not able to render the required font? -
Converting BLOB to HEX and HEX to BLOB
Hi!
I have a table that stores pictures as BLOB. Due to some project rules, I need to be able to convert this image to a CLOB (represented as a HEX String) and, after that, I need to convert this HEX String back to BLOB.
I already created the function that converts BLOB to HEX. See below:
CREATE OR REPLACE FUNCTION blob_to_hex (blob_in IN BLOB)
RETURN CLOB
AS
v_clob CLOB;
v_varchar VARCHAR2(32767);
v_start PLS_INTEGER := 1;
v_buffer PLS_INTEGER := 32767;
BEGIN
DBMS_LOB.CREATETEMPORARY(v_clob, TRUE);
FOR i IN 1..CEIL(DBMS_LOB.GETLENGTH(blob_in) / v_buffer)
LOOP
v_varchar := DBMS_LOB.SUBSTR(blob_in, v_buffer, v_start);
DBMS_LOB.WRITEAPPEND(v_clob, LENGTH(v_varchar), v_varchar);
v_start := v_start + v_buffer;
END LOOP;
RETURN v_clob;
END blob_to_hex;But, I´am having some difficulties to convert the HEX CLOB back to BLOB.
Does anybody know how could I do this?
Thanks a lot!!!
Registry this procedure
first create directory BLOB_DIR
CREATE OR REPLACE DIRECTORY
BLOB_DIR AS 'C:\temp';
CREATE OR REPLACE PROCEDURE BLOB_LOAD(filename varchar2)
AS
lBlob BLOB;
lFile BFILE := BFILENAME('BLOB_DIR', filename);
BEGIN
INSERT INTO O_CONTRACT_IMAGES
(CONTRACT_NO,CONTRACT_Year,CONTRACT_blob)
VALUES (1,2, empty_blob())
RETURNING CONTRACT_blob INTO lBlob;
DBMS_LOB.OPEN(lFile, DBMS_LOB.LOB_READONLY);
DBMS_LOB.OPEN(lBlob, DBMS_LOB.LOB_READWRITE);
DBMS_LOB.LOADFROMFILE(DEST_LOB => lBlob,
SRC_LOB => lFile,
AMOUNT => DBMS_LOB.GETLENGTH(lFile));
DBMS_LOB.CLOSE(lFile);
DBMS_LOB.CLOSE(lBlob);
COMMIT;
END;
Edited by: Hossam Kasem on 20-Apr-2011 05:56 -
How to convert blob data into clob using plsql
hi all,
I have requirement to convert blob column into clob .
version details
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
DECLARE
v_blob temp.blob_column%TYPE;------this is blob data type column contains (CSV file which is inserted from screens)
v_clob CLOB; --i want to copy blob column data into this clob
v_warning NUMBER;
BEGIN
SELECT blob_column
INTO v_blob
FROM temp
WHERE pk = 75000676;
DBMS_LOB.converttoclob (dest_lob => v_clob,
src_blob => v_blob,
amount => DBMS_LOB.lobmaxsize,
dest_offset => 1,
src_offset => 1,
blob_csid => 1, -- what is the use of this parameter
lang_context => 1,
warning => v_warning
DBMS_OUTPUT.put_line (v_warning);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLCODE);
DBMS_OUTPUT.put_line (SQLERRM);
END;I am not getting what is the use of blob_csid , lang_context parameters after going the trough the documentation .
Any help in this regard would be highly appreciated .......
Thanks
Edited by: prakash on Feb 5, 2012 11:41 PMPost the 4 digit Oracle version.
Did you read the Doc for DBMS_LOB.CONVERTTOCLOB? - http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_lob.htm
The function can convert data from one character set to another. If the source data uses a different character set than the target you need to provide the character set id of the source data.
The blob_csid parameter is where you would provide the value for the source character set.
If the source and target use the same character set then just pass zero. Your code is passing a one.
>
General Notes
You must specify the character set of the source data in the blob_csid parameter. You can pass a zero value for blob_csid. When you do so, the database assumes that the BLOB contains character data in the same character set as the destination CLOB.
>
Same for 'lang_context' - your code is using 1; just use 0. It is an IN OUT
>
lang_context
(IN) Language context, such as shift status, for the current conversion.
(OUT) The language context at the time when the current conversion is done.
This information is returned so you can use it for subsequent conversions without losing or misinterpreting any source data. For the very first conversion, or if do not care, use the default value of zero. -
Hello Friends,
We have a requirement, we need to convert BLOB value as file and store it on unix box. Can we have only PLSQL for copying BLOB into a file and storing? Does it works for all the kinds of files with huze amout of data say 50 MB of data (or even more some times ) thi files are like .doc, .jpeg, .bmp, .pdf , .zip ...etc.
Please give your suggestion on solving this.
I will be thankful if you could give code snippet for this.
Regards
SravanThank You. We are using UTL_FILE.put_raw procedure to write to a file .
We found it is working fine for .doc, .pdf, .jpeg.
The same procedure failing while uploading .bmp files.
Could you please tell is it required to handle different files differently? If so how do we differentiate these.
Thank you again. -
Can a doc. in Pages5.1 (using MAVERICKS) be converted to RTF format?
Can a doc. in Pages5.1 (using MAVERICKS) be converted to RTF format? I want to save it and email it.
methodios wrote:
Thanks, will try
PS You may well still have Pages 4 (in Applications/iWork). That will of course export to RTF.
If you have images, I think it creates RTFD, which may not always be readable on other platforms.
http://en.wikipedia.org/wiki/Rich_Text_Format_Directory -
Problem in converting AppleWorks into RTF
Hi!
I have a bunch of .cwk files (AppleWorks) that I need to convert into RTF format.
In the script I use I have a proble with the following code:
tell application "AppleWorks"
activate
open MonFichier
save MonFichier in file (dossier & name_Fich & ".rtf") as file type "RTF" using translator "RTF"
close MonFichier saving no
end tell
After execution I end up with a brand new file with .rtf extension but that is not a RTF file. If I try to open it with Textedit it does not open. Strangely enough, if I open the cwk file manually and save it as RTF manually, everything is fine....
Can someone help me on this?
PascalHello Pascal,
I think you're seeing the known problem of AppleScript 2.0 used with some old program such as AppleWorks 6.
Briefly, AW6's translator name parameter must be in plain string not Unicode text while all text literal is Unicode text in AppleScript 2.0.
A workaround is to use data literal of class TEXT. Something like the following code.
--CODE
tell application "AppleWorks 6"
open MonFichier
tell document 1
save in file (dossier & name_Fich & ".rtf") using translator «data TEXT525446» -- "RTF"
close saving no
end tell
end tell
--END OF CODE
cf.
A relevant topic:
Script failing to translate AW to DOC
http://discussions.apple.com/thread.jspa?threadID=1650891&tstart=0
Hope this may help,
Hiroto -
Convert doc to rtf or doc to html
Is there any approach to convert the doc files to html or rtf format? The appache poi just provides the read facilities not the converting facilities.
It's not the problem to convert from rtf to html using XSL transformation.
But what about doc to rtf. Probably there already written solutions using poi or smth. else?Two projects that spring to mind are Apache POI and Apache FOP.
POI:
http://jakarta.apache.org/poi/index.html
FOP:
http://xmlgraphics.apache.org/fop/
Either way, you are in for some tough development if you want to do this using Java, and you might want to consider switch to a more suitable platform such as .NET. Word documents are highly microsoft specific so you will want to use a microsoft platform to work with them for the least amount of headaches and risks. -
XML Publisher report output in RTF format does not display full page
Hi,
We have one XML Publisher report, the output of report in RTF format is not getting displayed in Full Page in normal way (MS Word -->View menu --> Print layout) but we can see full page display when we do MS Word -->View menu --> Outline.
Appreciate your valuable inputs on this.
Is this a template issue or any profiles needs to be set.
Thanks
VijayDo you have any header and footer on your template?
If you have any header and footer then try to adjust it as of to display full page.
Thanks
Yasar -
How to Page Break in RTF Format
Hello XML Gurus,
We are changing the reports from Oracle Reports to XML.
For this, We are using RTF template.
Can you Please let me know, how to put Page Breaks in RTF format.
Your reply will be much appreciated.
Regards
GanesanPut this where you want the page break :
<?split-by-page-break:?> -
Generating BIP report in RTF format generates blank report
Hi all,
When generating a BIP report in RTF format the report output is blank!?
If I run the report in any other format the report displays the data correctly.
We're running siebel 8.1.1.2 and BIP 10.1.3.4.1.
When looking at the size of the report when the 'File Download' window appears it seem like the report contains data as the size is 62KB, compared to the pdf format which do display data is 20KB. The output generates the amount of pages that is needed for the report, but all pages are blank.
The report is an activity List report with just one for-each statement in it.
Has anybody come across the same?
Regards,
HakanHi alka,
To invoke Word automatically, use command
line options DESTYPE=CACHE,
DESFORMAT=RTF and MIMETYPE=application/msword.
This is an example URL: http://webserver:80/cg-bin/rwcgi60.exe?module
=test.rdf&userid=scott/tiger@mydb&
destype=cache&desformat=rtf&mimetype=application/msword&server=myrepserver
1. Check the appropriate mimetype setting for Word by Starting Windows Explorer,
choose View -> Options from the menu, go to the File Type tab, find Microsoft
Word Document in this list, click Edit, and get the value for Content Type
(MIME). This is the value that needs to be used in the MIMETYPE command line
option, and it will typically be application/msword, but may differ on
different machines.
null -
i am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?
When you make a DNG that's like making another raw file, so you will need to convert the DNG file just like your original raw. Don't use the Save button in the raw converter. That's just a link to the DNG converter. Normally you would click Open instead and then save in the editor as a jpg or other image format of your choice.
-
How to upload a PDF file and convert it to OTF format
We have come across rquirements like converting OTF to PDF but my requirement is to read a PDF file in SAP and convert it to OTF format for printing.
Can anyone please help me with the Function Modules to do so.Hello,
Try the following FM:
CONVERT_OTF Convert SAP documents (SAPScript) to other types.
Example:
CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
Hope this helps.
Reward if helpful.
Regards,
Vasanth
Maybe you are looking for
-
Is it possible to change the Global Lockout Message to include the time duration?
Hi Everyone, Is it possible to edit the error messages that portal returns? Are they stored in a table we can just modify? Or are they secured? The one specifically that a client would like to change is: the error message related to the global lockou
-
Error while initializing OIM API in 11G
I am trying to deploy a webservice exposing some of the OIM API's in 11G[11.1.1.5]. I am using the OIMClient API to initialize the API's. The following code works fine when I run with in the eclipse but doesnt work when it is deployed on the weblogic
-
How can put photo comment in Facebook in safari or other browser, am using ipad 4 and this was working perfectly but unfortunately it's not working now..the attach photo feature is there but can't attach, please help me in this
-
Been given an iphone 4 by a friend and need to unlock so can use my own SIM
I was given an iphone 4 by a friend but upon putting my SIM in, I realised he'd not unlocked the phone! He isn't able to unlock the phone via his contract (he has a new iphone) because the IMEI isn't showing on his account and it tries to unlock his
-
Plugin Process and Webkitplugin Agent
Hi everybody. I use Snow Leopard 10.6.8 with Safari 5.1. Watching videos needing Flash Player, I would observe the process Webkitplugin Agent, often seizing 50%, 60% of the CPU. Yesterday in Activity Monitor I noticed during a live video streaming,