tangs7 / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

Trouble saving to disk #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I was making a script with Flash CS3 and want to save the pdf file to my
hardisk, also I was using MDM ZINC software to do this, but when I save the
file without images everything works fine, but when I put images, have the
problem because when i try to open the final pdf file the acrobat tells me
in message that the file is corrupted, can you help me?

Original issue reported on code.google.com by tah...@cantv.net on 17 Sep 2007 at 3:12

GoogleCodeExporter commented 9 years ago
Hi,

Can you please post some files so that I can give it a try ?
Otherwise can you post some code ?

Thanks ;)

Thibault

Original comment by thibault.imbert on 17 Sep 2007 at 10:18

GoogleCodeExporter commented 9 years ago
Ok but it`s only i will post but works if you have the MDM ZInc Software
so please i want it goto to:

http://www.multidmedia.com

IF YOU GET INSIDE THE PAGE, P0LEASE GO TO THE SUPPORT AREA AND GET THE LINK
DOCUMENTATION, IN THE API, YOU WILL FIND THE FILESYSTEM SUBJECT, THERE YOU HAVE 
THE
FOUR OPTIONS TO SAVE FILE TO THE DISK

PLEAE TELL ME AND IF YOU HAVE THE ZINC SOFTWARE I WILL SEND YOU THE FILES.

DO YOU HAVE SOME ONE TO TRANSLATE THE DOCUMENTATION TO SPANISH FOR YOU, FOR 
FREE? I
CAN DO THAT IF YOU LIKE, AND COLABORATE WITH THE ALIVE SOFTWARE AND OTHER IF 
YOU LIKE

Original comment by tah...@cantv.net on 18 Sep 2007 at 1:56

GoogleCodeExporter commented 9 years ago
Hi there,
I hope you still reading this, since the last post is from Sep 17 2007.

I have similar problem with alivePDF 1.4.4 and MDM Zinc 3.0 
I use alivePDF with Flash CS3 (AS3) 

Without an image added to the PDF everything work fine, here my example code:

// zinc lib
import mdm.*;

// alive lib
import org.alivepdf.pdf.PDF;
import org.alivepdf.images.ImageFormat;
import org.alivepdf.drawing.DashedLine;
import org.alivepdf.display.*
import org.alivepdf.layout.*;
import org.alivepdf.colors.*;
import org.alivepdf.transitions.Transition;
import org.alivepdf.fonts.FontFamily;
import org.alivepdf.transitions.Dimension;
import org.alivepdf.display.PageMode;
import org.alivepdf.fonts.Style;
import org.alivepdf.viewing.*;
import org.alivepdf.saving.Download;
import org.alivepdf.saving.Method;
import org.alivepdf.drawing.Blend;
import org.alivepdf.drawing.Caps;
import org.alivepdf.drawing.Joint;

//flash lib
import flash.utils.ByteArray;

mdm.Application.init(this, onInit);

function onInit():void {
        // start application...

    // create a simple PDF
    var myPDF:org.alivepdf.pdf.PDF = new org.alivepdf.pdf.PDF ( Orientation.PORTRAIT,
Unit.MM, Size.A4 );

    myPDF.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE ); 
    myPDF.setTitle("Test PDF Sheet");

    myPDF.addPage();
    myPDF.setFont( FontFamily.ARIAL, Style.BOLD );
    myPDF.setFontSize ( 24 );
    myPDF.addText ('Test PDF Sheet with alivePDF and ZINC', 25, 30);

    var pdfByteBuffer:ByteArray = myPDF.save ( Method.LOCAL);   
    // saves the new pdf in the same dir as the exe is. 
    mdm.FileSystem.saveFile("ZincPDFTest.pdf",pdfByteBuffer.toString());            

}

Put this code in the timeline 
(follow the instructions for installation etc on MDM Zinc Homepage)

if i add the line:
myPDF.addImage ( imgStripes, 0, 30, 0, 0, ImageFormat.JPG, 100, 1 );

after my "addText" line.

the application crashes and no pdf is written.
befor i used ZINC I used the same creation code from above with AIR 1.1
only the writing file stuff was different and taken form your example.
Within Air everythink works fine PDF with my text and image was flawless 
created.

Original comment by tohkli...@googlemail.com on 24 Jul 2008 at 2:26

GoogleCodeExporter commented 9 years ago
exactly the same issue for me too.

thanks D

Original comment by hucklebo...@gmail.com on 6 Apr 2009 at 3:00