Forum Replies Created
-
AuthorPosts
-
in reply to: BufferedImage via ImageIO not schow in firefox preview February 13, 2015 at 08:54#29430
In the servlet code I would try also to return a content lengths in HTTP header.
For that, you would probably need to print image to a ByteArrayOutputStream, measure resulting byte array length, set headers and only after that send it to HTTP output stream.
in reply to: HTML entities not rendered in PDF February 16, 2015 at 12:13#29338<div class="box-a"> <div class="logo-a"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="LOGO"/></div> <section> <div class="pro-img"><img src="<?php echo $src[0]; ?>" alt="Product" /></div> <div class="voucher-sec"> <h2>Product Name: <?php echo $ttt=$item;?></h2> <h2><b>Order Id:</b> <?php echo $orderid; ?></h2> </div> </section> <h2 class="part-a">Coupon Code:in reply to: HTML entities not rendered in PDF February 16, 2015 at 12:58#29339There is no HTML entities in the code above.
Constructs like
<?php echo $src[0]; ?>are to be substituted with HTML by a PHP runtime before the document is passed to PD4ML.in reply to: General questions / FAQ February 19, 2015 at 10:31#26972Hi,
I’m actually using your library (v3.9.4 Pro) in my professionnal context to
generate some pdf.Thus, I’ve tried to build unit test to ensure the non regression of our
pdf.I’ve got an issues regarding the size of generated byte from windows and
linux.The size of the file is always greater on Linux than on Windows but I can’t
figure out why.When I compare my two files (the one generated from Linux vs the one
generated from windows) using a pdf comparaison tools I can’t see
differences whereas when I’m comparing using binary tools I see few
differences :The size of lenght on linux is greater by 13.
Their is always differences on the first stream.
Their is always differences on the xref.
Their is always differences on the number return by the starxref.I’d like to know if you are able to oriente me and help me solving this
issues.Best regards,
in reply to: General questions / FAQ February 19, 2015 at 14:43#26991Sometime I need to insert external media objects such as pictures into PDF document (I use tags library). And some of these objects might be PDF or TIFF images so
tag can’t be used.
Is there some solution?
Thank you in advance!in reply to: Trouble understanding differencies between Linux and Windows February 19, 2015 at 14:58#29620There is a minor difference in diagnostics data of the PDFs (encapsulated to the first PDF content object):
% PD4ML version: 394 Pro DMS % JDK version: 1.7.0_51 % OS version: Linux 3.2.0-76-generic-pae % File encoding: UTF-8 % insets: java.awt.Insets[top=0,left=0,bottom=0,right=0] % size: java.awt.Dimension[width=595,height=842] % ttf: java: % pro version % PD4ML version: 394 Pro DMS % JDK version: 1.7.0_71 % OS version: Windows 7 6.1 % File encoding: UTF-8 % insets: java.awt.Insets[top=0,left=0,bottom=0,right=0] % size: java.awt.Dimension[width=595,height=842] % ttf: java: % pro version
The difference explains also a shift in the object offset table (XREF).
Also the documents should differ in DOCIDs – unique document identifiers.
Probably a better way to compare the documents would be to use PD4Document API to collect metadata (i.e. number of pages) and to extract particular page content.
PD4Document doc1 = new PD4Document(new URL("file:o:/work/testdata/testsuite/pdf/doc5enc.pdf"), password); int pagenum = doc1.getNumberOfPages(); String content = doc1.getPageContent(1); String outlines = doc1.dumpOutlines(); String author = doc1.getAuthor()in reply to: How to embedd PDF? February 19, 2015 at 15:05#29667You can embed PDFs only as an attachment using
<pd4ml:attachment>tag.Some species of TIFFs (Fax) are supported by PD4ML directly, so a regular
tag can be used.
If not, there is a way to implement a custom resource loader to convert a TIFF to PNG, GIFF or JPEG on a fly.
in reply to: Trouble understanding differencies between Linux and Windows February 19, 2015 at 15:11#29621Thanks a lot for your answer.
We actually already override the following elements :
parametreDefaut.put(PD4Constants.PD4ML_DOCUMENT_DATE, (new LocalDateTime(0,1,1,0,0,0)).toString());
parametreDefaut.put(PD4Constants.PD4ML_IDS_AS_DESTINATIONS, “SIGEF”);
System.setProperty(“pd4ml.document.id”, “0123456789abcdef”);Can you tell us how to override the OS and the JDK ? And what do you use to decode the “pdf content object” ?
Best regards,
in reply to: Trouble understanding differencies between Linux and Windows February 19, 2015 at 15:29#29622To decompress entire PDF you may use
http://sourceforge.net/projects/multivalent/java -Xmx192m -cp Multivalent20060102.jar tool.pdf.Uncompress -exact file.pdf
If a particular page is needed to be decoded:
PD4Document doc1 = new PD4Document(new URL("file.pdf"), password); String content = doc1.getPageContent(1);For the time being it is not possible to disable JDK/OS diag output. But we could add the switch in the next versions.
in reply to: Trouble understanding differencies between Linux and Windows February 19, 2015 at 15:55#29623Thanks for all your informations again.
Could you add the switch for those elements in the next versions :
callParameters.append( “% PD4ML version: ” + getVersion() + “n” );
callParameters.append( “% JDK version: ” + System.getProperty( “java.version” ) + “n” );
callParameters.append( “% OS version: ” + System.getProperty( “os.name” ) + ” ” );
callParameters.append( System.getProperty( “os.version” ) + “n” );It’s actually all we need to ensure our long terme binary comparaison and non regression on our file.
Furthermore, are you able to tell me when the next version will be available ?
Best regards,
in reply to: General questions / FAQ February 20, 2015 at 08:06#26992Let’s say I have some main layout which has footer and header.
After it (on additional page) I want to add some attachments as a pictures.
Here is an example:
<pd4ml:page.header><br /> <h1>Header</h1><br /> </pd4ml:page.header><br /> <pd4ml:page.footer height="50"><br /> <h1>Footer</h1><br /> </pd4ml:page.footer><br /> <div>CONTENT</div><br /> <pd4ml:page_break /><br /> <img src="../attachment.jpg" />And I want that new page (after page_break) won’t have any footer or header.
Is it possible?
P.S. I use PD4ML tags libraryin reply to: HTML/CSS rendering issues February 20, 2015 at 08:09#26993Is it possible to fit image’s width and height to layout’s width/height?
<img src="../" width="100%" height="100%" />
doesn’t help – width works fine but height not – if image too heigh it is splitted into different pages.in reply to: Problems with bullets in list, RTF file February 20, 2015 at 08:43#29662I checked in OpenOffice and indeed the issue doesn’t appear there. Unfortunately our clients use Microsoft Office. Thanks for your response and I will waiting for a solution.
in reply to: Problems with bullets in list, RTF file February 20, 2015 at 08:51#29663Just-released v395 should solve the issue.
in reply to: Add/remove header or footer on fly February 20, 2015 at 09:38#29670It is possible to override header and footer with blank ones in-place:
<h1>Header</h1> <h1>Footer</h1> <div>CONTENT</div> <!-- reset header and footer; takes effect after a page break --> <img src="../attachment.jpg" />
or to apply header/footer to particular page ranges with scope attribute of and
-
AuthorPosts
