Delphi-PRAXiS
Seite 3 von 6     123 45     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   iOS MobileApps @ Apple App Store (https://www.delphipraxis.net/174521-mobileapps-%40-apple-app-store.html)

arnof 17. Jul 2013 13:28

AW: MobileApps @ Apple App Store
 
Zitat:

Zitat von Mavarik (Beitrag 1221840)
Zitat:

Zitat von arnof (Beitrag 1221814)
TMS habe ich schon getestet und es bringt ja einiges an mehr Möglichkeiten: z.B. Mails, PDF's usw. die sonst nicht direkt mit XE4 gehen.

PDF?

Mavarik

PS.: Waiting for Review (seit 7 Tagen)


echt geht das mit einer XE4 Komponente:

http://www.tmssoftware.com/site/img/...Controller.png

Welche ist das denn, bin ich blind 8-)

Mavarik 17. Jul 2013 13:54

AW: MobileApps @ Apple App Store
 
Zitat:

Zitat von arnof (Beitrag 1221844)
echt geht das mit einer XE4 Komponente:

http://www.tmssoftware.com/site/img/...Controller.png

Welche ist das denn, bin ich blind 8-)

emm.... Mit PDF geht, meinte ich ein PDF zu erzeugen, nicht das "Umblättern" usw..

Mavarik

arnof 17. Jul 2013 15:37

AW: MobileApps @ Apple App Store
 
Zitat:

Zitat von Mavarik (Beitrag 1221845)

emm.... Mit PDF geht, meinte ich ein PDF zu erzeugen, nicht das "Umblättern" usw..

Mavarik

Preisfrage: wie erzeugst Du eine PDF mit Bordmitteln ?

Phoenix 17. Jul 2013 15:39

AW: MobileApps @ Apple App Store
 
Zitat:

Zitat von arnof (Beitrag 1221856)
Zitat:

Zitat von Mavarik (Beitrag 1221845)
emm.... Mit PDF geht, meinte ich ein PDF zu erzeugen, nicht das "Umblättern" usw..
Mavarik

Preisfrage: wie erzeugst Du eine PDF mit Bordmitteln ?

http://developer.apple.com/library/i...ratingPDF.html

Mavarik 17. Jul 2013 15:46

AW: MobileApps @ Apple App Store
 
Zitat:

Zitat von Phoenix (Beitrag 1221857)

OK! Du warst zwar schneller, aber ich habe ein Delphi Beispiel ;-)

Delphi-Quellcode:
procedure TForm6.Button1Click(Sender: TObject);
var
  pdfContext  : CGConTextRef;
  Path        : CFStringRef;
  URL         : CFURLRef;
  myDictionary : CFMutableDictionaryRef;
  PageRect    : CGRect;
  Filename,
  Title,
  Creator     : String;
  DPI         : Integer;
begin
  DPI := 72;
  PageRect.origin.x := 0;
  PageRect.origin.y := 0;
  PageRect.size.width := 8*DPI;
  PageRect.size.height := 11*DPI;


  Filename := GetHomePath + PathDelim + 'Documents' + PathDelim+'MyPDF.PDF';
  path := CFStringCreateWithCString (NIL, MarshaledAString(utf8Encode(Filename)),kCFStringEncodingUTF8);
  url := CFURLCreateWithFileSystemPath (Nil, path, kCFURLPOSIXPathStyle, false);
  CFRelease(path);

  // This dictionary contains extra options mostly for 'signing' the PDF
  myDictionary := CFDictionaryCreateMutable(NIL, 0,NIL,NIL);
//                                             @kCFTypeDictionaryKeyCallBacks,
//                                             @kCFTypeDictionaryValueCallBacks);
  Title  := 'kCGPDFContextTitle';
  Creator := 'kCGPDFContextCreator';
  CFDictionarySetValue(myDictionary, @Title, CFSTR('My PDF File'));
  CFDictionarySetValue(myDictionary, @Creator, CFSTR('Mavarik'));

  // Create our PDF Context with the CFURL, the CGRect we provide, and the above defined dictionary
  pdfContext := CGPDFContextCreateWithURL(url, @pageRect, CFDictionaryRef(myDictionary));
  CFRelease(url);

  // Done creating our PDF Context, now it's time to draw to it
  // Starts our first page
  CGContextBeginPage (pdfContext, @pageRect);

    // Draws a black rectangle around the page inset by 50 on all sides
  CGContextStrokeRect(pdfContext, CGRectMake(50, 50, pageRect.size.width - 100, pageRect.size.height - 100));

  CGContextSelectFont (pdfContext, 'Helvetica', 16, kCGEncodingMacRoman);
  CGContextSetTextDrawingMode (pdfContext, kCGTextFill);
  CGContextSetRGBFillColor (pdfContext, 0, 0, 0, 1);
  CGContextShowTextAtPoint (pdfContext, 100, 100, 'Hallo World PDF1', strlen('Hallo World PD1'));
  CGContextShowTextAtPoint (pdfContext, 100, 200, 'Hallo World PDF2', strlen('Hallo World PD2'));
  CGContextShowTextAtPoint (pdfContext, 200, 300, 'Hallo World PDF3', strlen('Hallo World PD3'));
  CGContextEndPage (pdfContext);

  // We are done with our context now, so we release it
  CGContextRelease (pdfContext);
  CFRelease(MyDictionary);

    {
    // This code block will create an image that we then draw to the page
    const char *picture = "Picture";
    CGImageRef image;
    CGDataProviderRef provider;
    CFStringRef picturePath;
    CFURLRef pictureURL;

    picturePath = CFStringCreateWithCString (NULL, picture,
                                             kCFStringEncodingUTF8);
    pictureURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), picturePath, CFSTR("png"), NULL);
    CFRelease(picturePath);
    provider = CGDataProviderCreateWithURL (pictureURL);
    CFRelease (pictureURL);
    image = CGImageCreateWithPNGDataProvider (provider, NULL, true, kCGRenderingIntentDefault);
    CGDataProviderRelease (provider);
    CGContextDrawImage (pdfContext, CGRectMake(200, 200, 207, 385),image);
    CGImageRelease (image);
    // End image code

    // Adding some text on top of the image we just added
    CGContextSelectFont (pdfContext, "Helvetica", 16, kCGEncodingMacRoman);
    CGContextSetTextDrawingMode (pdfContext, kCGTextFill);
    CGContextSetRGBFillColor (pdfContext, 0, 0, 0, 1);
    const char *text = "Hello World!";
    CGContextShowTextAtPoint (pdfContext, 260, 390, text, strlen(text));
    // End text
    }
    // We are done drawing to this page, let's end it
    // We could add as many pages as we wanted using CGContextBeginPage/CGContextEndPage

    Webbrowser1.Navigate('file://'+GetHomePath + PathDelim + 'Documents' + PathDelim+'MyPDF.PDF');
end;

Grüsse Mavarik :coder:

Union 17. Jul 2013 16:17

AW: MobileApps @ Apple App Store
 
Und das geht auf iOS? Sieht nach OSX aus...

Phoenix 17. Jul 2013 17:09

AW: MobileApps @ Apple App Store
 
Die API listet Apple als
Zitat:

Drawing and Printing Guide for iOS
.

fgsoftware 17. Jul 2013 19:44

AW: MobileApps @ Apple App Store
 
Zitat:

Diese gravierenden Änderungen von iOS7 zu 6 hat wohl niemand voraussehen können.
Nö, Apple hat ja auch die Jahre zuvor nichts neues rausgebracht.

He, hab gerade festgestellt, dass ja im Dezember Weihnachten ist. Damit hab ich gar nicht gerechnet. War doch erst im Jahr zuvor, und im Jahr vor dem Jahr....


Zitat:

TMS habe ich schon getestet und es bringt ja einiges an mehr Möglichkeiten: z.B. Mails, PDF's usw. die sonst nicht direkt mit XE4 gehen.
Genau das ärgert mich.:evil: Wieso bekommt Emba das nicht hin?

:) Hey, vielleicht kauft Emba das ja von den TMS-Jungs ein.

:pale: Wenns mit dem TMS Combos besser läuft, hat Emba die Entwicklung für Firemonkey iOS ja abgeschlossen und bringt mit der nächsten Version die Unterstützung für Android.

Union 17. Jul 2013 20:54

AW: MobileApps @ Apple App Store
 
[QUOTE=fgsoftware;1221877]
Zitat:

Diese gravierenden Änderungen von iOS7 zu 6 hat wohl niemand voraussehen können.
Naja, in die Zukunft kann man nicht schauen. Aber ich wollte mit einer nächsten FM Version doch gerne, dass meine Anwendungen unter dem jeweiligen OS und deren Version automatisch nativ aussehen. Das sollte wohl auch kein Problem sein, wenn man nichts an den Standardstyles herumgeschraubt hat.

Mavarik 17. Jul 2013 22:42

AW: MobileApps @ Apple App Store
 
Zitat:

Zitat von Union (Beitrag 1221862)
Und das geht auf iOS? Sieht nach OSX aus...

Ja funktioniert...


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:42 Uhr.
Seite 3 von 6     123 45     Letzte »    

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz