Quantcast
Channel: Comments on: Generating a PDF-document with some plsql: as_pdf_mini => as_pdf3
Viewing all 84 articles
Browse latest View live

By: souluran

$
0
0

Hi, Anton.
My Oracle database has characterset = AMERICAN_AMERICA.CL8MSWIN1251. I do upload the query result that contains Russian text in pdf using your package as_pdf3.

begin
as_pdf3.init;
as_pdf3.query2table( ‘select * from HWI_ZAV’, p_headers => as_pdf3.tp_headers( ‘LOC_NAME’, ‘PODR_NAME’));
as_pdf3.save_pdf;
end;

PDF file is created successfully, but Russian characters in it are displayed as “????????.”
How do I get Russian characters in the proper encoding, so that they are displayed properly?
P.s.:Sorry for my english ))


By: Anton Scheffer

$
0
0

The default PDF fonts don’t contain the Russian characters. So you have to load a font containing those characters with as_pdf3.load_ttf_font( … )

By: souluran

$
0
0

Thank you, Anton, you helped me. It’s really works!

By: arkad

$
0
0

Hi Anton!
Many thanks for the script.
There is a small error in line 585
if utl_raw.length (t_raw)> 32778
when using the downloaded PDF Fonts and sufficiently large PDF generated file an exception occurs.
if utl_raw.length (t_raw)> 32698 solves the problem
with best regards Arkady

By: milk

$
0
0

Hi Anton,
how to write endless reports?
I want to print a receipt at the cash register on roll paper.

thank you

By: milk

$
0
0

Hi Anton!
my last post disappeared so I repeat the question.
How to print a report to a printer with roll.
Something like accounts in store, the report is always one page.
The page size depends on the number of rows in the report.

Thank you.

By: Anton Scheffer

$
0
0

That’s not how PDF works. You can’t do that with as_pdf3

By: roel

$
0
0

Hi Anton, is it possible to mix landscape and portrait pages in one document?


By: Anton Scheffer

$
0
0

@Roel
No, it’s not possible to mix landscape and portrait pages in one document.

By: Hojjat

$
0
0

Tanks for your script;
can i used for Arabic language with windows-1256 charset?

By: Anton Scheffer

$
0
0

@Hojjat
as_pdf3 can be used with windows-1256 character set, but I don’t know if that character set supports Arabic characters.
But you have to use a font which supports that character set.
But it doesn’t support right to left direction.

By: Miki

$
0
0

Hi Anton
Can I create a barcode in the reports?
I tried with some fonts but without success.

By: Anton Scheffer

$
0
0

I have no barcodefonts, so I’ve never tried it myself.

By: Michelle

$
0
0

Hi Anton, Great package, works great! I have a question about preserving image resolution for images with 300 ppi or more. It seems if I use an image with 72 ppi or less, the image is small enough to be scaled properly wheb using the put_image procedure parameters. If I use an image with >72 ppi it becomes distorted and grainy – is there any way to control the resolution of the images? Or is a 300 ppi image too ‘big’ to use?

By: Anton Scheffer

$
0
0

This package doesn’t do any resolution conversions. But maybe the problem is in the image format itself, and reads the package the format for high resolution images not correctly.


By: Alan Lawlor

$
0
0

Anton

Many thanks for a wonderful piece of code. I am attempting to design some code which creates a PDF document from data in our database (this is no problem) and also outputs a PNG image embedded in a BLOB in a database table. The PNG image happens to be a captured signature.

When I output it, the PNG image is output 3 times side-by-side, each copy being a part of the image with white lines interlaced.

When I use a simple PNG image, it displays fine. The problem only occurs when using a PNG image captured by the signature software.
I compared a working PNG image with a non-working PNG image and the first different I found was in IHDR image header in the PNG file. The color type in a working PNG image is 02 (an RGB triple) and the non-working one is 06 (RGB followed by alpha sample).
From my research of this, it seems to indicate that this means it is a PNG with transparency, which is only supported in later versions of the PDF specification.
I see that yours is based on the PDF-1.3 specification and that the parse_png function only really seems to cater for color types 00-04, and has a simple “else” for others.

My question is, given your knowledge of translation of PNG attributes at the start of the file to object/image attributes required to describe the image encoding in PDF, what attributes might require changing to match the format of a transparent PNG? If the answer is too complex to outline/answer here, can you direct me to some web sources which might help with this translation ?

Thanks !
Alan

By: Anton Scheffer

$
0
0

@Alan. Sorry I can’t help you with that.

By: michelle

$
0
0

Hi Anton,

I have resolved my resolution issues – it was indeed the image.

I have another question now – I am using this package to create a pdf which then I in a brower using wpg_docload.downloadfile().

I call finish_pdf (changed it to public) to create the temp lob and then I call a procedure I wrote to display to pdf to the browser:

here are the guts:

owa_util.mime_header( nvl(v_mime,’application/octet’), FALSE );
htp.p(‘Content-Length: ‘ || DBMS_LOB.GETLENGTH(g_pdf_doc));
htp.p(‘Content-Transfer-Encoding: binary’);
–File that will be used by the broswer is the users does a “Save as”
htp.p(‘Content-Disposition: inline; filename=’ || p_filename );
owa_util.http_header_close;
WPG_DOCLOAD.DOWNLOAD_FILE(g_pdf_doc);

After calling wpg_docload.downloadfile, I check V$TEMPORARY_LOBS and I see that the cache_lobs column is increasing in number – that is, the session is generating this temp lob is not being released.

I only have this issue when I call wpg_docload.downloadfile(). If I don’t call this then the temp lob (s) are being released and cache_lobs = 0.

I have tried calling dbms_lob.freetemporary(g_pdf_doc) after downloading the file but it doesn’t change anything.

Is is possible that wpg_docload.downloadfile is creating the temp lob and not freeing it??

Any suggestions?

Thanks,
Michelle

By: Saeed

$
0
0

Dear,

Thank you for sharing your code.
Could you add to support right to left direction(e.g Arabic or Persian Languages)?

Regards,
Saeed.

By: Zouhaier

$
0
0

Hi ANTON,
Thank you for the useful script,
can I embed SVG using as_pdf3 ?

Viewing all 84 articles
Browse latest View live